All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/3] Make 2-byte access to bpf_sk_lookup->remote_port endian-agnostic
@ 2022-03-17 16:58 Jakub Sitnicki
  2022-03-17 16:58 ` [PATCH bpf-next 1/3] bpf: Treat bpf_sk_lookup remote_port as a 2-byte field Jakub Sitnicki
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Jakub Sitnicki @ 2022-03-17 16:58 UTC (permalink / raw)
  To: bpf
  Cc: netdev, Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
	kernel-team, Ilya Leoshkevich, Heiko Carstens, Vasily Gorbik

This patch set is a result of a discussion we had around the RFC patchset from
Ilya [1]. The fix for the narrow loads from the RFC series is still relevant,
but this series does not depend on it. Nor is it required to unbreak sk_lookup
tests on BE, if this series gets applied.

To summarize the takeaways from [1]:

 1) we want to make 2-byte load from ctx->remote_port portable across LE and BE,
 2) we keep the 4-byte load from ctx->remote_port as it is today - result varies
    on endianess of the platform.

[1] https://lore.kernel.org/bpf/20220222182559.2865596-2-iii@linux.ibm.com/

Jakub Sitnicki (3):
  bpf: Treat bpf_sk_lookup remote_port as a 2-byte field
  selftests/bpf: Fix u8 narrow load checks for bpf_sk_lookup remote_port
  selftests/bpf: Fix test for 4-byte load from remote_port on big-endian

 net/core/filter.c                             | 20 +++++++++++++++++--
 .../selftests/bpf/progs/test_sk_lookup.c      | 13 ++++++++----
 2 files changed, 27 insertions(+), 6 deletions(-)

-- 
2.35.1


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

end of thread, other threads:[~2022-03-18 15:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-17 16:58 [PATCH bpf-next 0/3] Make 2-byte access to bpf_sk_lookup->remote_port endian-agnostic Jakub Sitnicki
2022-03-17 16:58 ` [PATCH bpf-next 1/3] bpf: Treat bpf_sk_lookup remote_port as a 2-byte field Jakub Sitnicki
2022-03-18  1:22   ` Martin KaFai Lau
2022-03-18 15:22     ` Jakub Sitnicki
2022-03-17 16:58 ` [PATCH bpf-next 2/3] selftests/bpf: Fix u8 narrow load checks for bpf_sk_lookup remote_port Jakub Sitnicki
2022-03-17 16:58 ` [PATCH bpf-next 3/3] selftests/bpf: Fix test for 4-byte load from remote_port on big-endian Jakub Sitnicki
2022-03-18  1:23 ` [PATCH bpf-next 0/3] Make 2-byte access to bpf_sk_lookup->remote_port endian-agnostic Martin KaFai Lau

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.