/openbmc/linux/samples/seccomp/ |
H A D | bpf-helper.h | 46 BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_ALLOW) 48 BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_KILL) 56 BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, (nr), 0, 1), \ 183 BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, (hi), 0, 5), \ 186 BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, (lo), 0, 2), \ 193 BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, (hi), 0, 3), \ 196 BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, (lo), 2, 0), \ 213 BPF_JUMP(BPF_JMP+BPF_JGT+BPF_K, (hi), 4, 0), \ 215 BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, (hi), 0, 5), \ 218 BPF_JUMP(BPF_JMP+BPF_JGE+BPF_K, (lo), 0, 2), \ [all …]
|
H A D | bpf-direct.c | 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() 125 BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, __NR_exit, 0, 1), in install_filter() 126 BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_ALLOW), in install_filter() 127 BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, __NR_read, 1, 0), in install_filter() 128 BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, __NR_write, 3, 2), in install_filter() 133 BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_KILL), 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 …]
|
H A D | dropper.c | 33 BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, arch, 0, 3), in install_filter() 36 BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, nr, 0, 1), 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()
|
/openbmc/linux/arch/powerpc/net/ |
H A D | bpf_jit_comp64.c | 1026 case BPF_JMP | BPF_JGT | BPF_K: in bpf_jit_build_body() 1028 case BPF_JMP | BPF_JSGT | BPF_K: in bpf_jit_build_body() 1036 case BPF_JMP | BPF_JLT | BPF_K: in bpf_jit_build_body() 1038 case BPF_JMP | BPF_JSLT | BPF_K: in bpf_jit_build_body() 1046 case BPF_JMP | BPF_JGE | BPF_K: in bpf_jit_build_body() 1048 case BPF_JMP | BPF_JSGE | BPF_K: in bpf_jit_build_body() 1056 case BPF_JMP | BPF_JLE | BPF_K: in bpf_jit_build_body() 1058 case BPF_JMP | BPF_JSLE | BPF_K: in bpf_jit_build_body() 1066 case BPF_JMP | BPF_JEQ | BPF_K: in bpf_jit_build_body() 1072 case BPF_JMP | BPF_JNE | BPF_K: in bpf_jit_build_body() [all …]
|
H A D | bpf_jit_comp32.c | 1083 case BPF_JMP | BPF_JGT | BPF_K: in bpf_jit_build_body() 1085 case BPF_JMP | BPF_JSGT | BPF_K: in bpf_jit_build_body() 1093 case BPF_JMP | BPF_JLT | BPF_K: in bpf_jit_build_body() 1095 case BPF_JMP | BPF_JSLT | BPF_K: in bpf_jit_build_body() 1103 case BPF_JMP | BPF_JGE | BPF_K: in bpf_jit_build_body() 1105 case BPF_JMP | BPF_JSGE | BPF_K: in bpf_jit_build_body() 1113 case BPF_JMP | BPF_JLE | BPF_K: in bpf_jit_build_body() 1115 case BPF_JMP | BPF_JSLE | BPF_K: in bpf_jit_build_body() 1123 case BPF_JMP | BPF_JEQ | BPF_K: in bpf_jit_build_body() 1129 case BPF_JMP | BPF_JNE | BPF_K: in bpf_jit_build_body() [all …]
|
/openbmc/linux/arch/mips/net/ |
H A D | bpf_jit_comp64.c | 649 case BPF_ALU | BPF_MOV | BPF_K: in build_insn() 673 case BPF_ALU | BPF_OR | BPF_K: in build_insn() 674 case BPF_ALU | BPF_AND | BPF_K: in build_insn() 675 case BPF_ALU | BPF_XOR | BPF_K: in build_insn() 676 case BPF_ALU | BPF_LSH | BPF_K: in build_insn() 692 case BPF_ALU | BPF_RSH | BPF_K: in build_insn() 694 case BPF_ALU | BPF_ADD | BPF_K: in build_insn() 695 case BPF_ALU | BPF_SUB | BPF_K: in build_insn() 696 case BPF_ALU | BPF_MUL | BPF_K: in build_insn() 697 case BPF_ALU | BPF_DIV | BPF_K: in build_insn() [all …]
|
H A D | bpf_jit_comp32.c | 1478 case BPF_ALU | BPF_MOV | BPF_K: in build_insn() 1508 case BPF_ALU | BPF_OR | BPF_K: in build_insn() 1509 case BPF_ALU | BPF_AND | BPF_K: in build_insn() 1510 case BPF_ALU | BPF_XOR | BPF_K: in build_insn() 1511 case BPF_ALU | BPF_LSH | BPF_K: in build_insn() 1512 case BPF_ALU | BPF_RSH | BPF_K: in build_insn() 1514 case BPF_ALU | BPF_ADD | BPF_K: in build_insn() 1515 case BPF_ALU | BPF_SUB | BPF_K: in build_insn() 1516 case BPF_ALU | BPF_MUL | BPF_K: in build_insn() 1517 case BPF_ALU | BPF_DIV | BPF_K: in build_insn() [all …]
|
/openbmc/linux/arch/parisc/net/ |
H A D | bpf_jit_comp64.c | 652 case BPF_ALU | BPF_MUL | BPF_K: in bpf_jit_emit_insn() 663 case BPF_ALU | BPF_DIV | BPF_K: in bpf_jit_emit_insn() 674 case BPF_ALU | BPF_MOD | BPF_K: in bpf_jit_emit_insn() 771 case BPF_ALU | BPF_MOV | BPF_K: in bpf_jit_emit_insn() 779 case BPF_ALU | BPF_ADD | BPF_K: in bpf_jit_emit_insn() 790 case BPF_ALU | BPF_SUB | BPF_K: in bpf_jit_emit_insn() 801 case BPF_ALU | BPF_AND | BPF_K: in bpf_jit_emit_insn() 808 case BPF_ALU | BPF_OR | BPF_K: in bpf_jit_emit_insn() 815 case BPF_ALU | BPF_XOR | BPF_K: in bpf_jit_emit_insn() 822 case BPF_ALU | BPF_LSH | BPF_K: in bpf_jit_emit_insn() [all …]
|
H A D | bpf_jit_comp32.c | 1162 if (BPF_SRC(code) == BPF_K) { in bpf_jit_emit_insn() 1199 case BPF_ALU | BPF_MUL | BPF_K: in bpf_jit_emit_insn() 1202 case BPF_ALU | BPF_DIV | BPF_K: in bpf_jit_emit_insn() 1205 case BPF_ALU | BPF_MOD | BPF_K: in bpf_jit_emit_insn() 1210 if (BPF_SRC(code) == BPF_K) { in bpf_jit_emit_insn() 1218 case BPF_ALU | BPF_MOV | BPF_K: in bpf_jit_emit_insn() 1219 case BPF_ALU | BPF_ADD | BPF_K: in bpf_jit_emit_insn() 1220 case BPF_ALU | BPF_SUB | BPF_K: in bpf_jit_emit_insn() 1221 case BPF_ALU | BPF_AND | BPF_K: in bpf_jit_emit_insn() 1222 case BPF_ALU | BPF_OR | BPF_K: in bpf_jit_emit_insn() [all …]
|
/openbmc/linux/arch/loongarch/net/ |
H A D | bpf_jit.c | 475 case BPF_ALU | BPF_MOV | BPF_K: in build_insn() 488 case BPF_ALU | BPF_ADD | BPF_K: in build_insn() 507 case BPF_ALU | BPF_SUB | BPF_K: in build_insn() 526 case BPF_ALU | BPF_MUL | BPF_K: in build_insn() 544 case BPF_ALU | BPF_DIV | BPF_K: in build_insn() 563 case BPF_ALU | BPF_MOD | BPF_K: in build_insn() 587 case BPF_ALU | BPF_AND | BPF_K: in build_insn() 606 case BPF_ALU | BPF_OR | BPF_K: in build_insn() 625 case BPF_ALU | BPF_XOR | BPF_K: in build_insn() 647 case BPF_ALU | BPF_LSH | BPF_K: in build_insn() [all …]
|
/openbmc/linux/tools/bpf/ |
H A D | bpf_exp.y | 219 bpf_set_curr_instr(BPF_JMP | BPF_JEQ | BPF_K, 0, 0, $3); } 230 bpf_set_curr_instr(BPF_JMP | BPF_JEQ | BPF_K, 0, 0, $3); } 242 bpf_set_curr_instr(BPF_JMP | BPF_JEQ | BPF_K, 0, 0, $3); } 254 bpf_set_curr_instr(BPF_JMP | BPF_JGE | BPF_K, 0, 0, $3); } 266 bpf_set_curr_instr(BPF_JMP | BPF_JGT | BPF_K, 0, 0, $3); } 279 bpf_set_curr_instr(BPF_JMP | BPF_JGT | BPF_K, 0, 0, $3); } 290 bpf_set_curr_instr(BPF_JMP | BPF_JGT | BPF_K, 0, 0, $3); } 303 bpf_set_curr_instr(BPF_JMP | BPF_JGE | BPF_K, 0, 0, $3); } 314 bpf_set_curr_instr(BPF_JMP | BPF_JGE | BPF_K, 0, 0, $3); } 408 bpf_set_curr_instr(BPF_ALU | BPF_OR | BPF_K, 0, 0, $3); } [all …]
|
H A D | bpf_dbg.c | 223 case BPF_RET | BPF_K: in bpf_disasm() 308 case BPF_JMP_JGT | BPF_K: in bpf_disasm() 316 case BPF_JMP_JGE | BPF_K: in bpf_disasm() 324 case BPF_JMP_JEQ | BPF_K: in bpf_disasm() 344 case BPF_ALU_LSH | BPF_K: in bpf_disasm() 352 case BPF_ALU_RSH | BPF_K: in bpf_disasm() 360 case BPF_ALU_ADD | BPF_K: in bpf_disasm() 368 case BPF_ALU_SUB | BPF_K: in bpf_disasm() 376 case BPF_ALU_MUL | BPF_K: in bpf_disasm() 408 case BPF_ALU_OR | BPF_K: in bpf_disasm() [all …]
|
/openbmc/linux/arch/riscv/net/ |
H A D | bpf_jit_comp32.c | 988 if (BPF_SRC(code) == BPF_K) { in bpf_jit_emit_insn() 1030 case BPF_ALU | BPF_MUL | BPF_K: in bpf_jit_emit_insn() 1033 case BPF_ALU | BPF_DIV | BPF_K: in bpf_jit_emit_insn() 1036 case BPF_ALU | BPF_MOD | BPF_K: in bpf_jit_emit_insn() 1041 if (BPF_SRC(code) == BPF_K) { in bpf_jit_emit_insn() 1048 case BPF_ALU | BPF_MOV | BPF_K: in bpf_jit_emit_insn() 1049 case BPF_ALU | BPF_ADD | BPF_K: in bpf_jit_emit_insn() 1050 case BPF_ALU | BPF_SUB | BPF_K: in bpf_jit_emit_insn() 1051 case BPF_ALU | BPF_AND | BPF_K: in bpf_jit_emit_insn() 1052 case BPF_ALU | BPF_OR | BPF_K: in bpf_jit_emit_insn() [all …]
|
H A D | bpf_jit_comp64.c | 1261 case BPF_ALU | BPF_MOV | BPF_K: in bpf_jit_emit_insn() 1269 case BPF_ALU | BPF_ADD | BPF_K: in bpf_jit_emit_insn() 1280 case BPF_ALU | BPF_SUB | BPF_K: in bpf_jit_emit_insn() 1291 case BPF_ALU | BPF_AND | BPF_K: in bpf_jit_emit_insn() 1302 case BPF_ALU | BPF_OR | BPF_K: in bpf_jit_emit_insn() 1313 case BPF_ALU | BPF_XOR | BPF_K: in bpf_jit_emit_insn() 1324 case BPF_ALU | BPF_MUL | BPF_K: in bpf_jit_emit_insn() 1332 case BPF_ALU | BPF_DIV | BPF_K: in bpf_jit_emit_insn() 1344 case BPF_ALU | BPF_MOD | BPF_K: in bpf_jit_emit_insn() 1356 case BPF_ALU | BPF_LSH | BPF_K: in bpf_jit_emit_insn() [all …]
|
/openbmc/linux/tools/testing/selftests/seccomp/ |
H A D | seccomp_bpf.c | 392 BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW), in TEST() 584 BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_LOG), in TEST() 606 BPF_STMT(BPF_RET|BPF_K, 0x10000000U), in TEST_SIGNAL() 628 BPF_STMT(BPF_RET|BPF_K, 0x90000000U), in TEST_SIGNAL() 649 BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_KILL), in TEST_SIGNAL() 670 BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_KILL), in TEST_SIGNAL() 701 BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, in TEST_SIGNAL() 703 BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_KILL), in TEST_SIGNAL() 742 BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_KILL), in TEST_SIGNAL() 823 BPF_STMT(BPF_RET|BPF_K, kill), in kill_thread_or_group() [all …]
|
/openbmc/linux/arch/arm/net/ |
H A D | bpf_jit_32.c | 1377 case BPF_ALU | BPF_MOV | BPF_K: in build_insn() 1390 case BPF_K: in build_insn() 1404 case BPF_ALU | BPF_ADD | BPF_K: in build_insn() 1406 case BPF_ALU | BPF_SUB | BPF_K: in build_insn() 1408 case BPF_ALU | BPF_OR | BPF_K: in build_insn() 1410 case BPF_ALU | BPF_AND | BPF_K: in build_insn() 1412 case BPF_ALU | BPF_XOR | BPF_K: in build_insn() 1414 case BPF_ALU | BPF_MUL | BPF_K: in build_insn() 1433 case BPF_K: in build_insn() 1456 case BPF_K: in build_insn() [all …]
|
/openbmc/linux/arch/s390/net/ |
H A D | bpf_jit_comp.c | 808 case BPF_ALU | BPF_MOV | BPF_K: /* dst = (u32) imm */ in bpf_jit_insn() 814 case BPF_ALU64 | BPF_MOV | BPF_K: /* dst = imm */ in bpf_jit_insn() 851 case BPF_ALU64 | BPF_ADD | BPF_K: /* dst = dst + imm */ in bpf_jit_insn() 876 case BPF_ALU64 | BPF_SUB | BPF_K: /* dst = dst - imm */ in bpf_jit_insn() 906 case BPF_ALU64 | BPF_MUL | BPF_K: /* dst = dst * imm */ in bpf_jit_insn() 1062 case BPF_ALU64 | BPF_OR | BPF_K: /* dst = dst | imm */ in bpf_jit_insn() 1596 case BPF_JMP | BPF_JGT | BPF_K: /* (dst_reg > imm) */ in bpf_jit_insn() 1600 case BPF_JMP | BPF_JLT | BPF_K: /* (dst_reg < imm) */ in bpf_jit_insn() 1604 case BPF_JMP | BPF_JGE | BPF_K: /* (dst_reg >= imm) */ in bpf_jit_insn() 1608 case BPF_JMP | BPF_JLE | BPF_K: /* (dst_reg <= imm) */ in bpf_jit_insn() [all …]
|
/openbmc/linux/arch/x86/net/ |
H A D | bpf_jit_comp32.c | 1689 case BPF_ALU | BPF_MOV | BPF_K: in do_jit() 1703 case BPF_K: in do_jit() 1718 case BPF_ALU | BPF_ADD | BPF_K: in do_jit() 1720 case BPF_ALU | BPF_SUB | BPF_K: in do_jit() 1722 case BPF_ALU | BPF_OR | BPF_K: in do_jit() 1724 case BPF_ALU | BPF_AND | BPF_K: in do_jit() 1744 case BPF_K: in do_jit() 1758 case BPF_K: in do_jit() 1778 case BPF_K: in do_jit() 1801 case BPF_K: in do_jit() [all …]
|
H A D | bpf_jit_comp.c | 1158 case BPF_ALU | BPF_ADD | BPF_K: in do_jit() 1159 case BPF_ALU | BPF_SUB | BPF_K: in do_jit() 1160 case BPF_ALU | BPF_AND | BPF_K: in do_jit() 1161 case BPF_ALU | BPF_OR | BPF_K: in do_jit() 1162 case BPF_ALU | BPF_XOR | BPF_K: in do_jit() 1207 case BPF_ALU | BPF_MOV | BPF_K: in do_jit() 1221 case BPF_ALU | BPF_MOD | BPF_K: in do_jit() 1222 case BPF_ALU | BPF_DIV | BPF_K: in do_jit() 1288 case BPF_ALU | BPF_MUL | BPF_K: in do_jit() 1314 case BPF_ALU | BPF_LSH | BPF_K: in do_jit() [all …]
|
/openbmc/linux/arch/arm64/net/ |
H A D | bpf_jit_comp.c | 903 case BPF_ALU | BPF_MOV | BPF_K: in build_insn() 908 case BPF_ALU | BPF_ADD | BPF_K: in build_insn() 919 case BPF_ALU | BPF_SUB | BPF_K: in build_insn() 930 case BPF_ALU | BPF_AND | BPF_K: in build_insn() 940 case BPF_ALU | BPF_OR | BPF_K: in build_insn() 950 case BPF_ALU | BPF_XOR | BPF_K: in build_insn() 960 case BPF_ALU | BPF_MUL | BPF_K: in build_insn() 965 case BPF_ALU | BPF_DIV | BPF_K: in build_insn() 973 case BPF_ALU | BPF_MOD | BPF_K: in build_insn() 982 case BPF_ALU | BPF_LSH | BPF_K: in build_insn() [all …]
|
/openbmc/linux/samples/bpf/ |
H A D | bpf_insn.h | 30 .code = BPF_ALU64 | BPF_OP(OP) | BPF_K, \ 38 .code = BPF_ALU | BPF_OP(OP) | BPF_K, \ 66 .code = BPF_ALU64 | BPF_MOV | BPF_K, \ 74 .code = BPF_ALU | BPF_MOV | BPF_K, \ 197 .code = BPF_JMP | BPF_OP(OP) | BPF_K, \ 207 .code = BPF_JMP32 | BPF_OP(OP) | BPF_K, \
|
/openbmc/linux/arch/sparc/net/ |
H A D | bpf_jit_comp_32.c | 402 case BPF_ALU | BPF_ADD | BPF_K: /* A += K; */ in bpf_jit_compile() 408 case BPF_ALU | BPF_SUB | BPF_K: /* A -= K */ in bpf_jit_compile() 414 case BPF_ALU | BPF_AND | BPF_K: /* A &= K */ in bpf_jit_compile() 420 case BPF_ALU | BPF_OR | BPF_K: /* A |= K */ in bpf_jit_compile() 427 case BPF_ALU | BPF_XOR | BPF_K: /* A ^= K */ in bpf_jit_compile() 445 case BPF_ALU | BPF_MUL | BPF_K: /* A *= K */ in bpf_jit_compile() 486 case BPF_RET | BPF_K: in bpf_jit_compile() 673 case BPF_JMP | BPF_JEQ | BPF_K: in bpf_jit_compile() 674 case BPF_JMP | BPF_JGT | BPF_K: in bpf_jit_compile() 675 case BPF_JMP | BPF_JGE | BPF_K: in bpf_jit_compile() [all …]
|
H A D | bpf_jit_comp_64.c | 1064 case BPF_ALU | BPF_MOV | BPF_K: in build_insn() 1073 case BPF_ALU | BPF_ADD | BPF_K: in build_insn() 1077 case BPF_ALU | BPF_SUB | BPF_K: in build_insn() 1081 case BPF_ALU | BPF_AND | BPF_K: in build_insn() 1085 case BPF_ALU | BPF_OR | BPF_K: in build_insn() 1089 case BPF_ALU | BPF_XOR | BPF_K: in build_insn() 1093 case BPF_ALU | BPF_MUL | BPF_K: in build_insn() 1099 case BPF_ALU | BPF_DIV | BPF_K: in build_insn() 1142 case BPF_ALU | BPF_LSH | BPF_K: in build_insn() 1148 case BPF_ALU | BPF_RSH | BPF_K: in build_insn() [all …]
|
/openbmc/linux/kernel/bpf/ |
H A D | core.c | 1286 case BPF_ALU | BPF_ADD | BPF_K: in bpf_jit_blind_insn() 1287 case BPF_ALU | BPF_SUB | BPF_K: in bpf_jit_blind_insn() 1288 case BPF_ALU | BPF_AND | BPF_K: in bpf_jit_blind_insn() 1289 case BPF_ALU | BPF_OR | BPF_K: in bpf_jit_blind_insn() 1290 case BPF_ALU | BPF_XOR | BPF_K: in bpf_jit_blind_insn() 1291 case BPF_ALU | BPF_MUL | BPF_K: in bpf_jit_blind_insn() 1292 case BPF_ALU | BPF_MOV | BPF_K: in bpf_jit_blind_insn() 1293 case BPF_ALU | BPF_DIV | BPF_K: in bpf_jit_blind_insn() 1294 case BPF_ALU | BPF_MOD | BPF_K: in bpf_jit_blind_insn() 1314 case BPF_JMP | BPF_JEQ | BPF_K: in bpf_jit_blind_insn() [all …]
|
/openbmc/linux/tools/include/linux/ |
H A D | filter.h | 54 .code = BPF_ALU64 | BPF_OP(OP) | BPF_K, \ 62 .code = BPF_ALU | BPF_OP(OP) | BPF_K, \ 100 .code = BPF_ALU64 | BPF_MOV | BPF_K, \ 108 .code = BPF_ALU | BPF_MOV | BPF_K, \ 232 .code = BPF_JMP | BPF_OP(OP) | BPF_K, \ 242 .code = BPF_JMP32 | BPF_OP(OP) | BPF_K, \
|