bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND] test_verifier #13 fails on arm64: "retval 65507 != -29"
@ 2019-07-01 11:54 Paolo Pisati
  2019-07-01 21:51 ` Yonghong Song
  0 siblings, 1 reply; 11+ messages in thread
From: Paolo Pisati @ 2019-07-01 11:54 UTC (permalink / raw)
  To: Daniel Borkmann
  Cc: Alexei Starovoitov, Martin KaFai Lau, Song Liu, Yonghong Song, bpf

Full failure message:

...
#13/p valid read map access into a read-only array 2 FAIL retval 65507 != -29 
verification time 14 usec
stack depth 8
processed 14 insns (limit 1000000) max_states_per_insn 0 total_states 2
peak_states 2 mark_read 1
...

this on 5.2-rc6, arm64 defconfig + CONFIG_BPF* enabled (full config here [1]).
Any idea what could be wrong?

1: http://paste.ubuntu.com/p/tXXFGCPwbp/
-- 
bye,
p.

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [PATCH 0/2] Fold checksum at the end of bpf_csum_diff and fix
@ 2019-07-11  9:31 Paolo Pisati
  2019-07-11  9:31 ` [PATCH 1/2] bpf: bpf_csum_diff: fold the checksum before returning the value Paolo Pisati
  0 siblings, 1 reply; 11+ messages in thread
From: Paolo Pisati @ 2019-07-11  9:31 UTC (permalink / raw)
  To: --in-reply-to=,
	Alexei Starovoitov, Daniel Borkmann, Martin KaFai Lau, Song Liu,
	Yonghong Song, David S . Miller, Shuah Khan, Jakub Kicinski,
	Jiong Wang
  Cc: netdev, bpf, linux-kselftest, linux-kernel

From: Paolo Pisati <paolo.pisati@canonical.com>

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(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-07-11 23:47 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-01 11:54 [RESEND] test_verifier #13 fails on arm64: "retval 65507 != -29" Paolo Pisati
2019-07-01 21:51 ` Yonghong Song
2019-07-10 10:02   ` Paolo Pisati
2019-07-10 22:52     ` Andrii Nakryiko
2019-07-10 22:54       ` Andrii Nakryiko
2019-07-10 23:14         ` Andi Kleen
2019-07-11  9:40           ` [PATCH 0/2] [RESEND] Fold checksum at the end of bpf_csum_diff and fix Paolo Pisati
2019-07-11  9:40             ` [PATCH 1/2] bpf: bpf_csum_diff: fold the checksum before returning the value Paolo Pisati
2019-07-11  9:40             ` [PATCH 2/2] bpf, selftest: fix checksum value for test #13 Paolo Pisati
2019-07-11 23:47               ` Andrii Nakryiko
2019-07-11  9:31 [PATCH 0/2] Fold checksum at the end of bpf_csum_diff and fix Paolo Pisati
2019-07-11  9:31 ` [PATCH 1/2] bpf: bpf_csum_diff: fold the checksum before returning the value Paolo Pisati

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).