LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH bpf 0/2] Use __aligned_u64 in UAPI fields
@ 2018-05-27 11:28 Eugene Syromiatnikov
  0 siblings, 0 replies; only message in thread
From: Eugene Syromiatnikov @ 2018-05-27 11:28 UTC (permalink / raw)
  To: netdev
  Cc: linux-kernel, Martin KaFai Lau, Daniel Borkmann,
	Alexei Starovoitov, David S. Miller, Jiri Olsa, Ingo Molnar,
	Lawrence Brakmo, Andrey Ignatov, Jakub Kicinski, John Fastabend,
	Dmitry V. Levin

Hello.

It was discovered during strace development that struct bpf_map_info and
struct bpf_prog_info now have different layouts of i386/compat and x86_64.
Since it's already broken and bpf syscall has no separate compat (as
far as I can see), and the affecting change was introduced recently (in
Linux 4.16), it's proposed to change the layout of these structures
on 32-bit architectures by using __aligned_u64.

In order to somewhat future-proof from this problem in future, an
approach similar to the one implemented in RDMA subsystem recently
is proposed: use __aligned_u64 consistently throughout the UAPI header.

Eugene Syromiatnikov (2):
  bpf: fix alignment of netns_dev/netns_ino fields in
    bpf_{map,prog}_info
  bpf: enforce usage of __aligned_u64 in the UAPI header

 include/uapi/linux/bpf.h       | 30 +++++++++++++++---------------
 tools/include/uapi/linux/bpf.h | 30 +++++++++++++++---------------
 2 files changed, 30 insertions(+), 30 deletions(-)

-- 
2.1.4

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-05-27 11:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-27 11:28 [PATCH bpf 0/2] Use __aligned_u64 in UAPI fields Eugene Syromiatnikov

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