linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next v3 0/4] bpf: Support kernel function call in 32-bit ARM
@ 2022-11-26  9:45 Yang Jihong
  2022-11-26  9:45 ` [PATCH bpf-next v3 1/4] bpf: Adapt 32-bit return value kfunc for 32-bit ARM when zext extension Yang Jihong
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Yang Jihong @ 2022-11-26  9:45 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, colin.i.king, 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 supports bpf fkunc in 32-bit ARM for EABI.
3. Patch3 is used to add test cases to cover some parameter scenarios
   states by AAPCS.
4. Patch4 fix a comment error.

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_test5:OK
  #1/12    kfunc_call/kfunc_call_test6:OK
  #1/13    kfunc_call/kfunc_call_test_ref_btf_id:OK
  #1/14    kfunc_call/kfunc_call_test_get_mem:OK
  #1/15    kfunc_call/kfunc_syscall_test:OK
  #1/16    kfunc_call/kfunc_syscall_test_null:OK
  #1/19    kfunc_call/destructive:OK

---
Changes since v2:
  - Remove patches to adjust sk size check for CO_RE in 32-bit arch.
  - Add check of kfunc's return value in insn_def_regno.
  - Adjust is_reg64 for insn_def_regno.
  - The check of CONFIG_AEABI is moved from emit_kfunc_call to
    bpf_jit_supports_kfunc_call.
  - Fix a comment error in fixup_kfunc_call.

Yang Jihong (4):
  bpf: Adapt 32-bit return value kfunc for 32-bit ARM when zext
    extension
  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
  bpf: Fix comment error in fixup_kfunc_call function

 arch/arm/net/bpf_jit_32.c                     | 137 ++++++++++++++++++
 kernel/bpf/verifier.c                         |  46 +++++-
 net/bpf/test_run.c                            |  18 +++
 .../selftests/bpf/prog_tests/kfunc_call.c     |   3 +
 .../selftests/bpf/progs/kfunc_call_test.c     |  52 +++++++
 5 files changed, 252 insertions(+), 4 deletions(-)

-- 
2.30.GIT


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

end of thread, other threads:[~2022-12-07  8:53 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-26  9:45 [PATCH bpf-next v3 0/4] bpf: Support kernel function call in 32-bit ARM Yang Jihong
2022-11-26  9:45 ` [PATCH bpf-next v3 1/4] bpf: Adapt 32-bit return value kfunc for 32-bit ARM when zext extension Yang Jihong
2022-11-28  1:57   ` Alexei Starovoitov
2022-11-28 12:40     ` Yang Jihong
2022-11-28 16:41       ` Alexei Starovoitov
2022-12-03  2:58         ` Yang Jihong
2022-12-03 16:40           ` Alexei Starovoitov
2022-12-05  1:19             ` Yang Jihong
2022-12-07  8:49               ` Yang Jihong
2022-12-02  4:11   ` kernel test robot
2022-11-26  9:45 ` [PATCH bpf-next v3 2/4] bpf: Add kernel function call support in 32-bit ARM for EABI Yang Jihong
2022-11-26  9:45 ` [PATCH bpf-next v3 3/4] bpf:selftests: Add kfunc_call test for mixing 32-bit and 64-bit parameters Yang Jihong
2022-11-26  9:45 ` [PATCH bpf-next v3 4/4] bpf: Fix comment error in fixup_kfunc_call function Yang Jihong

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