All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf v2 0/5] bpf: Support kernel function call in 32-bit ARM
@ 2022-11-07  9:20 ` Yang Jihong
  0 siblings, 0 replies; 24+ messages in thread
From: Yang Jihong @ 2022-11-07  9:20 UTC (permalink / raw)
  To: ast, daniel, andrii, martin.lau, song, yhs, john.fastabend,
	kpsingh, sdf, haoluo, jolsa, illusionist.neo, linux, davem,
	edumazet, kuba, pabeni, mykolal, shuah, benjamin.tissoires,
	memxor, asavkov, delyank, bpf, linux-arm-kernel, linux-kernel,
	netdev, linux-kselftest
  Cc: yangjihong1

1. Patch1 is dependent patch to fix zext extension error in 32-bit ARM.
2. Patch2 and patch3 solve the problem that the bpf check fails because
   load's mem size is modified in CO_RE from the kernel and user modes,
   Currently, there are different opinions and a final solution needs to
   be selected.
3. Patch4 supports bpf fkunc in 32-bit ARM for EABI.
4. Patch5 is used to add test cases to cover some parameter scenarios
   states by AAPCS.

The following is the test_progs result in the 32-bit ARM environment:

  # uname -m
  armv7l
  # echo 1 > /proc/sys/net/core/bpf_jit_enable
  # ./test_progs -t kfunc_call
  #1/1     kfunc_call/kfunc_syscall_test_fail:OK
  #1/2     kfunc_call/kfunc_syscall_test_null_fail:OK
  #1/3     kfunc_call/kfunc_call_test_get_mem_fail_rdonly:OK
  #1/4     kfunc_call/kfunc_call_test_get_mem_fail_use_after_free:OK
  #1/5     kfunc_call/kfunc_call_test_get_mem_fail_oob:OK
  #1/6     kfunc_call/kfunc_call_test_get_mem_fail_not_const:OK
  #1/7     kfunc_call/kfunc_call_test_mem_acquire_fail:OK
  #1/8     kfunc_call/kfunc_call_test1:OK
  #1/9     kfunc_call/kfunc_call_test2:OK
  #1/10    kfunc_call/kfunc_call_test4:OK
  #1/11    kfunc_call/kfunc_call_test_ref_btf_id:OK
  #1/12    kfunc_call/kfunc_call_test_get_mem:OK
  #1/13    kfunc_call/kfunc_syscall_test:OK
  #1/14    kfunc_call/kfunc_syscall_test_null:OK
  #1/17    kfunc_call/destructive:OK


Yang Jihong (5):
  bpf: Adapt 32-bit return value kfunc for 32-bit ARM when zext
    extension
  bpf: Adjust sk size check for sk in bpf_skb_is_valid_access for CO_RE
    in 32-bit arch
  libbpf: Skip adjust mem size for load pointer in 32-bit arch in CO_RE
  bpf: Add kernel function call support in 32-bit ARM for EABI
  bpf:selftests: Add kfunc_call test for mixing 32-bit and 64-bit
    parameters

 arch/arm/net/bpf_jit_32.c                     | 142 ++++++++++++++++++
 kernel/bpf/verifier.c                         |   3 +
 net/bpf/test_run.c                            |  18 +++
 net/core/filter.c                             |   8 +-
 tools/lib/bpf/libbpf.c                        |  34 ++++-
 .../selftests/bpf/prog_tests/kfunc_call.c     |   3 +
 .../selftests/bpf/progs/kfunc_call_test.c     |  52 +++++++
 7 files changed, 254 insertions(+), 6 deletions(-)

-- 
2.30.GIT


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

end of thread, other threads:[~2022-11-26  9:47 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-07  9:20 [PATCH bpf v2 0/5] bpf: Support kernel function call in 32-bit ARM Yang Jihong
2022-11-07  9:20 ` Yang Jihong
2022-11-07  9:20 ` [PATCH bpf v2 1/5] bpf: Adapt 32-bit return value kfunc for 32-bit ARM when zext extension Yang Jihong
2022-11-07  9:20   ` Yang Jihong
2022-11-08 23:12   ` Martin KaFai Lau
2022-11-08 23:12     ` Martin KaFai Lau
2022-11-26  9:45     ` Yang Jihong
2022-11-26  9:45       ` Yang Jihong
2022-11-07  9:20 ` [PATCH bpf v2 2/5] bpf: Adjust sk size check for sk in bpf_skb_is_valid_access for CO_RE in 32-bit arch Yang Jihong
2022-11-07  9:20   ` Yang Jihong
2022-11-07  9:20 ` [PATCH bpf v2 3/5] libbpf: Skip adjust mem size for load pointer in 32-bit arch in CO_RE Yang Jihong
2022-11-07  9:20   ` Yang Jihong
2022-11-08  1:22   ` Andrii Nakryiko
2022-11-08  1:22     ` Andrii Nakryiko
2022-11-08  2:44     ` Yang Jihong
2022-11-08  2:44       ` Yang Jihong
2022-11-07  9:20 ` [PATCH bpf v2 4/5] bpf: Add kernel function call support in 32-bit ARM for EABI Yang Jihong
2022-11-07  9:20   ` Yang Jihong
2022-11-07 12:33   ` Russell King (Oracle)
2022-11-07 12:33     ` Russell King (Oracle)
2022-11-08  0:52     ` Yang Jihong
2022-11-08  0:52       ` Yang Jihong
2022-11-07  9:20 ` [PATCH bpf v2 5/5] bpf:selftests: Add kfunc_call test for mixing 32-bit and 64-bit parameters Yang Jihong
2022-11-07  9:20   ` Yang Jihong

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.