Skip to content

Commit fcbb539

Browse files
pranithmpe
authored andcommitted
powerpc: Wire up sys_bpf() syscall
This patch wires up the new syscall sys_bpf() on powerpc. Passes the tests in samples/bpf: #0 add+sub+mul OK #1 unreachable OK #2 unreachable2 OK #3 out of range jump OK #4 out of range jump2 OK #5 test1 ld_imm64 OK #6 test2 ld_imm64 OK #7 test3 ld_imm64 OK #8 test4 ld_imm64 OK #9 test5 ld_imm64 OK #10 no bpf_exit OK #11 loop (back-edge) OK #12 loop2 (back-edge) OK #13 conditional loop OK #14 read uninitialized register OK #15 read invalid register OK #16 program doesn't init R0 before exit OK #17 stack out of bounds OK #18 invalid call insn1 OK #19 invalid call insn2 OK #20 invalid function call OK #21 uninitialized stack1 OK #22 uninitialized stack2 OK #23 check valid spill/fill OK #24 check corrupted spill/fill OK #25 invalid src register in STX OK #26 invalid dst register in STX OK #27 invalid dst register in ST OK #28 invalid src register in LDX OK #29 invalid dst register in LDX OK #30 junk insn OK #31 junk insn2 OK #32 junk insn3 OK #33 junk insn4 OK #34 junk insn5 OK #35 misaligned read from stack OK #36 invalid map_fd for function call OK #37 don't check return value before access OK #38 access memory with incorrect alignment OK #39 sometimes access memory with incorrect alignment OK #40 jump test 1 OK #41 jump test 2 OK #42 jump test 3 OK #43 jump test 4 OK Signed-off-by: Pranith Kumar <[email protected]> [mpe: test using samples/bpf] Signed-off-by: Michael Ellerman <[email protected]>
1 parent d1e66e6 commit fcbb539

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

arch/powerpc/include/asm/systbl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,3 +365,4 @@ SYSCALL_SPU(renameat2)
365365
SYSCALL_SPU(seccomp)
366366
SYSCALL_SPU(getrandom)
367367
SYSCALL_SPU(memfd_create)
368+
SYSCALL_SPU(bpf)

arch/powerpc/include/asm/unistd.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include <uapi/asm/unistd.h>
1313

1414

15-
#define __NR_syscalls 361
15+
#define __NR_syscalls 362
1616

1717
#define __NR__exit __NR_exit
1818
#define NR_syscalls __NR_syscalls

arch/powerpc/include/uapi/asm/unistd.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,5 +383,6 @@
383383
#define __NR_seccomp 358
384384
#define __NR_getrandom 359
385385
#define __NR_memfd_create 360
386+
#define __NR_bpf 361
386387

387388
#endif /* _UAPI_ASM_POWERPC_UNISTD_H_ */

0 commit comments

Comments
 (0)