From: David Miller <davem@davemloft.net>
To: netdev@vger.kernel.org
Cc: daniel@iogearbox.net, ast@kernel.org, john.fastabend@gmail.com
Subject: BPF uapi structures and 32-bit
Date: Tue, 27 Nov 2018 14:25:10 -0800 (PST) [thread overview]
Message-ID: <20181127.142510.717161104715347913.davem@davemloft.net> (raw)
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.
next reply other threads:[~2018-11-28 9:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-27 22:25 David Miller [this message]
2018-11-28 10:34 ` BPF uapi structures and 32-bit 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181127.142510.717161104715347913.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=ast@kernel.org \
--cc=daniel@iogearbox.net \
--cc=john.fastabend@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).