netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* csum_partial() on different archs (selftest/bpf)
@ 2020-11-13 10:36 Björn Töpel
  2020-11-13 11:34 ` Eric Dumazet
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Björn Töpel @ 2020-11-13 10:36 UTC (permalink / raw)
  To: Netdev, bpf; +Cc: Tom Herbert, Anders Roxell, linux-riscv

I was running the selftest/bpf on riscv, and had a closer look at one
of the failing cases:

  #14/p valid read map access into a read-only array 2 FAIL retval
65507 != -29 (run 1/1)

The test does a csum_partial() call via a BPF helper. riscv uses the
generic implementation. arm64 uses the generic csum_partial() and fail
in the same way [1]. arm (32-bit) has a arch specfic implementation,
and fail in another way (FAIL retval 131042 != -29) [2].

I mimicked the test case in a userland program, comparing the generic
csum_partial() to the x86 implementation [3], and the generic and x86
implementation does yield a different result.

x86     :    -29 : 0xffffffe3
generic :  65507 : 0x0000ffe3
arm     : 131042 : 0x0001ffe2

Who is correct? :-) It would be nice to get rid of this failed case...


Thanks,
Björn


[1] https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20201112/testrun/3430401/suite/kselftest/test/bpf.test_verifier/log
[2] https://qa-reports.linaro.org/lkft/linux-mainline-master/build/v5.10-rc3-207-g585e5b17b92d/testrun/3432361/suite/kselftest/test/bpf.test_verifier/log
[3] https://gist.github.com/bjoto/dc22d593aa3ac63c2c90632de5ed82e0

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

end of thread, other threads:[~2020-11-13 17:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-13 10:36 csum_partial() on different archs (selftest/bpf) Björn Töpel
2020-11-13 11:34 ` Eric Dumazet
2020-11-13 13:17   ` Björn Töpel
2020-11-13 12:24 ` Jean-Philippe Brucker
2020-11-13 13:22   ` Björn Töpel
2020-11-13 14:15     ` Al Viro
2020-11-13 14:32       ` Daniel Borkmann
2020-11-13 17:28         ` Al Viro
2020-11-13 12:42 ` Al Viro

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