1. 06 Jun, 2023 1 commit
    • Yonghong Song's avatar
      selftests/bpf: Fix sockopt_sk selftest · 69844e33
      Yonghong Song authored
      Commit f4e45348 ("net/netlink: fix NETLINK_LIST_MEMBERSHIPS length report")
      fixed NETLINK_LIST_MEMBERSHIPS length report which caused
      selftest sockopt_sk failure. The failure log looks like
      
        test_sockopt_sk:PASS:join_cgroup /sockopt_sk 0 nsec
        run_test:PASS:skel_load 0 nsec
        run_test:PASS:setsockopt_link 0 nsec
        run_test:PASS:getsockopt_link 0 nsec
        getsetsockopt:FAIL:Unexpected NETLINK_LIST_MEMBERSHIPS value unexpected Unexpected NETLINK_LIST_MEMBERSHIPS value: actual 8 != expected 4
        run_test:PASS:getsetsockopt 0 nsec
        #201     sockopt_sk:FAIL
      
      In net/netlink/af_netlink.c, function netlink_getsockopt(), for NETLINK_LIST_MEMBERSHIPS,
      nlk->ngroups equals to 36. Before Commit f4e45348, the optlen is calculated as
        ALIGN(nlk->ngroups / 8, sizeof(u32)) = 4
      After that commit, the optlen is
        ALIGN(BITS_TO_BYTES(nlk->ngroups), sizeof(u32)) = 8
      
      Fix the test by setting the expected optlen to be 8.
      
      Fixes: f4e45348 ("net/netlink: fix NETLINK_LIST_MEMBERSHIPS length report")
      Signed-off-by: default avatarYonghong Song <yhs@fb.com>
      Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
      Link: https://lore.kernel.org/bpf/20230606172202.1606249-1-yhs@fb.com
      69844e33
  2. 05 Jun, 2023 1 commit
  3. 03 Jun, 2023 2 commits
  4. 02 Jun, 2023 2 commits
  5. 01 Jun, 2023 5 commits
  6. 31 May, 2023 8 commits
  7. 30 May, 2023 19 commits
  8. 26 May, 2023 2 commits