Skip to content

Fold checksum at the end of bpf_csum_diff and fix

Paolo Pisati bpf linux-kselftest lkml netdev 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v1 Latest posting 2/22 patches 1 replyIn review
  2. v1 posting 1/22 patches 2 repliesSuperseded

Patches in v1 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2bpf: bpf_csum_diff: fold the checksum before returning the valuenet/core/filter.c+1 -10 replies
2/2bpf, selftest: fix checksum value for test #13tools/testing/selftests/bpf/verifier/array_access.c+1 -11 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] [RESEND] Fold checksum at the end of bpf_csum_diff and fix

From: Paolo Pisati <[email protected]>

After applying patch 0001, all checksum implementations i could test (x86-64, arm64 and arm), now agree on the return value.

Patch 0002 fix the expected return value for test #13: i did the calculation manually, and it correspond.

Unfortunately, after applying patch 0001, other test cases now fail in test_verifier:

$ sudo ./tools/testing/selftests/bpf/test_verifier
...
#417/p helper access to variable memory: size = 0 allowed on NULL (ARG_PTR_TO_MEM_OR_NULL) FAIL retval 65535 != 0 
#419/p helper access to variable memory: size = 0 allowed on != NULL stack pointer (ARG_PTR_TO_MEM_OR_NULL) FAIL retval 65535 != 0 
#423/p helper access to variable memory: size possible = 0 allowed on != NULL packet pointer (ARG_PTR_TO_MEM_OR_NULL) FAIL retval 65535 != 0 
...
Summary: 1500 PASSED, 0 SKIPPED, 3 FAILED

And there are probably other fallouts in other selftests - someone familiar should take a look before applying these patches.

Paolo Pisati (2):
bpf: bpf_csum_diff: fold the checksum before returning the
value
bpf, selftest: fix checksum value for test #13

 net/core/filter.c                                   | 2 +-
 tools/testing/selftests/bpf/verifier/array_access.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.17.1