[PATCH bpf-next] selftests/bpf: fexit_sleep: fix stack allocation for arm64

2024-07-15 Thread Puranjay Mohan
Remove the fexit_sleep test from the DENYLIST of arm64. Signed-off-by: Puranjay Mohan --- tools/testing/selftests/bpf/DENYLIST.aarch64 | 1 - tools/testing/selftests/bpf/prog_tests/fexit_sleep.c | 8 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/testing/sel

Re: [PATCH bpf] selftests/bpf: DENYLIST.aarch64: Remove fexit_sleep

2024-07-15 Thread Puranjay Mohan
Alexei Starovoitov writes: > On Mon, Jul 15, 2024 at 9:32 AM Puranjay Mohan wrote: >> >> >> Hi Daniel, Manu >> I was able to reproduce this issue on KVM and found the root cause for >> this hang! The other issue that we fixed is unrelated to this hang and >&

Re: [PATCH bpf] selftests/bpf: DENYLIST.aarch64: Remove fexit_sleep

2024-07-15 Thread Puranjay Mohan
Hi Daniel, Manu I was able to reproduce this issue on KVM and found the root cause for this hang! The other issue that we fixed is unrelated to this hang and doesn't occur on self hosted github runners as they use 48-bit VAs. The userspace test code has: #define STACK_SIZE (1024 * 1024)

Re: [PATCH bpf] selftests/bpf: DENYLIST.aarch64: Remove fexit_sleep

2024-07-12 Thread Puranjay Mohan
Hi Manu, > > I was able to confirm the fix using the artifacts from > https://github.com/kernel-patches/bpf/actions/runs/9905842936 > Thanks > Thanks for testing the fix. This bug has been resolved now but the test still hangs sometimes. Unfortunately, I am not able to reproduce this hang using

Re: [PATCH bpf] selftests/bpf: DENYLIST.aarch64: Remove fexit_sleep

2024-07-11 Thread Puranjay Mohan
Hi, I was able find the root cause of this bug and will send a fix soon! > Unable to handle kernel paging request at virtual address c2a80e68 We are running this test on Qemu with '-cpu max', this means 52-bit virtual addresses are being used. The trampolines generation code has the fol

Re: [PATCH bpf] selftests/bpf: DENYLIST.aarch64: Remove fexit_sleep

2024-07-10 Thread Puranjay Mohan
[SNIP] > > Hm, the latest run actually hangs in fexit_sleep (which is the test right > after > fexit_bpf2bpf). So looks like this was too early. It seems some CI runs pass > on > arm64 but others fail: > >    > https://github.com/kernel-patches/bpf/actions/runs/9859826851/job/27224868398  > (f

Re: [PATCH bpf] selftests/bpf: DENYLIST.aarch64: Remove fexit_sleep

2024-07-08 Thread Puranjay Mohan
Daniel Borkmann writes: > On 7/8/24 5:26 PM, KP Singh wrote: >> On Mon, Jul 8, 2024 at 5:00 PM Puranjay Mohan wrote: >>> >>> Daniel Borkmann writes: >>> >>>> On 7/5/24 4:50 PM, Puranjay Mohan wrote: >>>>> fexit_sleep test runs s

Re: [PATCH bpf] selftests/bpf: DENYLIST.aarch64: Remove fexit_sleep

2024-07-08 Thread Puranjay Mohan
Daniel Borkmann writes: > On 7/5/24 4:50 PM, Puranjay Mohan wrote: >> fexit_sleep test runs successfully now on the CI so remove it from the >> deny list. > > Do you happen to know which commit fixed it? If yes, might be nice to have it > documented in the commit message

Re: [PATCH bpf-next v2] arm64, bpf: Add 12-argument support for bpf trampoline

2024-07-08 Thread Puranjay Mohan
Xu Kuohai writes: > On 7/5/2024 8:53 PM, Puranjay Mohan wrote: >> The arm64 bpf JIT currently supports attaching the trampoline to >> functions with <= 8 arguments. This is because up to 8 arguments can be >> passed in registers r0-r7. If there are more than 8 arguments t

[PATCH bpf] selftests/bpf: DENYLIST.aarch64: Remove fexit_sleep

2024-07-05 Thread Puranjay Mohan
fexit_sleep test runs successfully now on the CI so remove it from the deny list. Signed-off-by: Puranjay Mohan --- tools/testing/selftests/bpf/DENYLIST.aarch64 | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/bpf/DENYLIST.aarch64 b/tools/testing/selftests/bpf

[PATCH bpf-next v2] arm64, bpf: Add 12-argument support for bpf trampoline

2024-07-05 Thread Puranjay Mohan
toring arguments passed on the stack to the arm64 bpf trampoline. This will allow attaching the trampoline to functions that take up to 12 arguments. [1] https://github.com/ARM-software/abi-aa/blob/main/aapcs64/aapcs64.rst#parameter-passing Signed-off-by: Puranjay Mohan --- Changes in V1 -&g

Re: [PATCH bpf-next] arm64, bpf: Add 12-argument support for bpf trampoline

2024-07-04 Thread Puranjay Mohan
On Thu, Jul 4, 2024 at 7:33 PM Puranjay Mohan wrote: > > The arm64 bpf JIT currently supports attaching the trampoline to > functions with <= 8 arguments. This is because up to 8 arguments can be > passed in registers r0-r7. If there are more than 8 arguments then the > 9th a

[PATCH bpf-next] arm64, bpf: Add 12-argument support for bpf trampoline

2024-07-04 Thread Puranjay Mohan
rst#parameter-passing Signed-off-by: Puranjay Mohan --- arch/arm64/net/bpf_jit_comp.c| 113 +-- tools/testing/selftests/bpf/DENYLIST.aarch64 | 2 - 2 files changed, 81 insertions(+), 34 deletions(-) diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/

Re: selftests: ftrace: WARNING: at arch/arm64/kernel/stacktrace.c:112 arch_stack_walk

2024-06-14 Thread Puranjay Mohan
Hi Naresh, Thanks for finding this. On Thu, Jun 13, 2024 at 3:16 PM Naresh Kamboju wrote: > > The following kernel warning noticed on arm64 qemu-arm64 and rk3399-rock-pi-4 > device while running selftests ftrace tests on Linux next-20240613. > > This is always reproducible on qemu-arm64 and rock

Re: [PATCH bpf-next] bpf, arm64: Add support for lse atomics in bpf_arena

2024-05-08 Thread Puranjay Mohan
Puranjay Mohan writes: > When LSE atomics are available, BPF atomic instructions are implemented > as single ARM64 atomic instructions, therefore it is easy to enable > these in bpf_arena using the currently available exception handling > setup. > > LL_SC atomics use loops a

[PATCH bpf-next] bpf, arm64: Add support for lse atomics in bpf_arena

2024-04-26 Thread Puranjay Mohan
/3atomics/and:OK #10/4atomics/or:OK #10/5atomics/xor:OK #10/6atomics/cmpxchg:OK #10/7atomics/xchg:OK #10 atomics:OK Summary: 2/14 PASSED, 0 SKIPPED, 0 FAILED Signed-off-by: Puranjay Mohan --- arch/arm64/net/bpf_jit_comp.c| 48

[PATCH bpf] selftests/bpf: verifier_arena: fix mmap address for arm64

2024-03-22 Thread Puranjay Mohan
The arena_list selftest uses (1ull << 32) in the mmap address computation for arm64. Use the same in the verifier_arena selftest. This makes the selftest pass for arm64 on the CI[1]. [1] https://github.com/kernel-patches/bpf/pull/6622 Signed-off-by: Puranjay Mohan --- tools/testing/sel