Home
last modified time | relevance | path

Searched refs:BPF_STMT (Results 1 – 17 of 17) sorted by relevance

/linux-6.12.1/samples/seccomp/
Dbpf-helper.h46 BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_ALLOW)
48 BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_KILL)
140 BPF_STMT(BPF_LD+BPF_W+BPF_ABS, LO_ARG(idx))
144 BPF_STMT(BPF_LD+BPF_W+BPF_ABS, LO_ARG(idx)), \
145 BPF_STMT(BPF_ST, 0), /* lo -> M[0] */ \
146 BPF_STMT(BPF_LD+BPF_W+BPF_ABS, HI_ARG(idx)), \
147 BPF_STMT(BPF_ST, 1) /* hi -> M[1] */
184 BPF_STMT(BPF_LD+BPF_MEM, 0), /* swap in lo */ \
187 BPF_STMT(BPF_LD+BPF_MEM, 1), \
189 BPF_STMT(BPF_LD+BPF_MEM, 1)
[all …]
Dbpf-direct.c115 BPF_STMT(BPF_LD+BPF_W+BPF_ABS, syscall_nr), in install_filter()
118 BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_ALLOW), in install_filter()
121 BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_ALLOW), in install_filter()
124 BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_ALLOW), in install_filter()
126 BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_ALLOW), in install_filter()
131 BPF_STMT(BPF_LD+BPF_W+BPF_ABS, syscall_arg(0)), in install_filter()
133 BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_KILL), in install_filter()
136 BPF_STMT(BPF_LD+BPF_W+BPF_ABS, syscall_arg(0)), in install_filter()
141 BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_ALLOW), in install_filter()
142 BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_TRAP), in install_filter()
[all …]
Ddropper.c31 BPF_STMT(BPF_LD+BPF_W+BPF_ABS, in install_filter()
34 BPF_STMT(BPF_LD+BPF_W+BPF_ABS, in install_filter()
37 BPF_STMT(BPF_RET+BPF_K, in install_filter()
39 BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_ALLOW), in install_filter()
46 struct sock_filter kill = BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_KILL); in install_filter()
Duser-trap.c93 BPF_STMT(BPF_LD+BPF_W+BPF_ABS, in user_trap_syscall()
96 BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_USER_NOTIF), in user_trap_syscall()
97 BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_ALLOW), in user_trap_syscall()
/linux-6.12.1/lib/
Dtest_bpf.c3067 BPF_STMT(BPF_LD | BPF_IMM, 1),
3068 BPF_STMT(BPF_MISC | BPF_TAX, 0),
3069 BPF_STMT(BPF_LD | BPF_IMM, 2),
3070 BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0),
3071 BPF_STMT(BPF_ALU | BPF_NEG, 0), /* A == -3 */
3072 BPF_STMT(BPF_MISC | BPF_TAX, 0),
3073 BPF_STMT(BPF_LD | BPF_LEN, 0),
3074 BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0),
3075 BPF_STMT(BPF_MISC | BPF_TAX, 0), /* X == len - 3 */
3076 BPF_STMT(BPF_LD | BPF_B | BPF_IND, 1),
[all …]
/linux-6.12.1/tools/testing/selftests/seccomp/
Dseccomp_bpf.c394 BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW), in TEST()
427 BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW), in TEST()
464 BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW), in TEST()
502 BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW), in TEST()
525 BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW), in TEST()
550 BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW), in TEST()
586 BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_LOG), in TEST()
608 BPF_STMT(BPF_RET|BPF_K, 0x10000000U), in TEST_SIGNAL()
630 BPF_STMT(BPF_RET|BPF_K, 0x90000000U), in TEST_SIGNAL()
651 BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_KILL), in TEST_SIGNAL()
[all …]
Dseccomp_benchmark.c169 BPF_STMT(BPF_LD|BPF_W|BPF_ABS, offsetof(struct seccomp_data, nr)), in main()
170 BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW), in main()
177 BPF_STMT(BPF_LD|BPF_W|BPF_ABS, offsetof(struct seccomp_data, args[0])), in main()
178 BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW), in main()
/linux-6.12.1/tools/include/uapi/linux/
Dfilter.h48 #ifndef BPF_STMT
49 #define BPF_STMT(code, k) { (unsigned short)(code), 0, 0, k } macro
/linux-6.12.1/tools/perf/bench/
Dsched-seccomp-notify.c52 BPF_STMT(BPF_LD|BPF_W|BPF_ABS, in user_notif_syscall()
55 BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_USER_NOTIF), in user_notif_syscall()
56 BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW), in user_notif_syscall()
/linux-6.12.1/include/uapi/linux/
Dfilter.h48 #ifndef BPF_STMT
49 #define BPF_STMT(code, k) { (unsigned short)(code), 0, 0, k } macro
/linux-6.12.1/tools/testing/selftests/net/
Dtoeplitz.c290 BPF_STMT(BPF_LD + BPF_B + BPF_ABS, SKF_AD_OFF + SKF_AD_PKTTYPE), in __set_filter()
292 BPF_STMT(BPF_LD + BPF_B + BPF_ABS, off_proto), in __set_filter()
294 BPF_STMT(BPF_LD + BPF_H + BPF_ABS, off_dport), in __set_filter()
296 BPF_STMT(BPF_RET + BPF_K, 0), in __set_filter()
297 BPF_STMT(BPF_RET + BPF_K, 0xFFFF), in __set_filter()
326 BPF_STMT(BPF_RET + BPF_K, 0), in set_filter_null()
Dgro.c148 BPF_STMT(BPF_LD + BPF_H + BPF_ABS, ethproto_off), in setup_sock_filter()
150 BPF_STMT(BPF_LD + BPF_B + BPF_ABS, ipproto_off), in setup_sock_filter()
152 BPF_STMT(BPF_LD + BPF_B + BPF_ABS, opt_ipproto_off), in setup_sock_filter()
154 BPF_STMT(BPF_LD + BPF_H + BPF_ABS, dport_off), in setup_sock_filter()
156 BPF_STMT(BPF_LD + BPF_H + BPF_ABS, dport_off + optlen), in setup_sock_filter()
158 BPF_STMT(BPF_RET + BPF_K, 0xFFFFFFFF), in setup_sock_filter()
159 BPF_STMT(BPF_RET + BPF_K, 0), in setup_sock_filter()
Dpsock_fanout.c115 BPF_STMT(BPF_LD | BPF_B | BPF_ABS, 80), /* ldb [80] */ in sock_fanout_set_cbpf()
116 BPF_STMT(BPF_RET | BPF_A, 0), /* ret A */ in sock_fanout_set_cbpf()
/linux-6.12.1/tools/testing/selftests/net/lib/
Dcsum.c498 BPF_STMT(BPF_LD + BPF_B + BPF_ABS, SKF_AD_OFF + SKF_AD_PKTTYPE), in __recv_prepare_packet_filter()
500 BPF_STMT(BPF_LD + BPF_B + BPF_ABS, off_nexthdr), in __recv_prepare_packet_filter()
502 BPF_STMT(BPF_LD + BPF_H + BPF_ABS, off_dport), in __recv_prepare_packet_filter()
504 BPF_STMT(BPF_RET + BPF_K, 0), in __recv_prepare_packet_filter()
505 BPF_STMT(BPF_RET + BPF_K, 0xFFFF), in __recv_prepare_packet_filter()
/linux-6.12.1/samples/bpf/
Dtracex5_user.c25 BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_ALLOW), in install_accept_all_seccomp()
/linux-6.12.1/Documentation/networking/
Dcdc_mbim.rst251 BPF_STMT(BPF_LD|BPF_B|BPF_ABS, SKF_AD_OFF + SKF_AD_VLAN_TAG_PRESENT),
255 BPF_STMT(BPF_LD|BPF_H|BPF_ABS, SKF_AD_OFF + SKF_AD_VLAN_TAG),
260 BPF_STMT(BPF_LD|BPF_H|BPF_ABS, 2 * ETH_ALEN),
263 BPF_STMT(BPF_RET|BPF_K, (u_int)-1), /* accept */
264 BPF_STMT(BPF_RET|BPF_K, 0), /* ignore */
/linux-6.12.1/include/linux/
Dfilter.h505 ((struct sock_filter) BPF_STMT(CODE, K))