netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* BPF uapi structures and 32-bit
@ 2018-11-27 22:25 David Miller
  2018-11-28 10:34 ` Daniel Borkmann
  0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2018-11-27 22:25 UTC (permalink / raw)
  To: netdev; +Cc: daniel, ast, john.fastabend


In the linux/bpf.h UAPI header, we must absolutely avoid any
non-fixed-sized types.

Otherwise we have serious problems on 32-bit.

Unfortunately I discovered today that we have take on two such cases,
sk_msg_md and sk_reuseport_md, both of which start with two void
pointers.

I hit this because test_verifier.c on my sparc64 box was built as
a 32-bit binary and this causes a hundred or so tests to fail, and
many if not all are because of the changing struct layout.

I could built 64-bit but this absolutely should work properly.

But for fully native 32-bit it is even worse, this will really
need to be resolved because llvm/clang is always going to build
the BPF programs with 64-bit void pointers.

I would strongly suggest we try and fix this now if we can.

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

end of thread, other threads:[~2018-12-01 12:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-27 22:25 BPF uapi structures and 32-bit David Miller
2018-11-28 10:34 ` Daniel Borkmann
2018-11-28 19:02   ` David Miller
2018-11-30 23:33     ` Alexei Starovoitov
2018-11-30 23:53       ` Daniel Borkmann
2018-12-01  0:58       ` David Miller

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