Home
last modified time | relevance | path

Searched refs:BPF_ALU (Results 1 – 25 of 39) sorted by relevance

12

/openbmc/linux/tools/bpf/
H A Dbpf_exp.y351 bpf_set_curr_instr(BPF_ALU | BPF_ADD | BPF_X, 0, 0, 0); }
353 bpf_set_curr_instr(BPF_ALU | BPF_ADD | BPF_X, 0, 0, 0); }
360 bpf_set_curr_instr(BPF_ALU | BPF_SUB | BPF_X, 0, 0, 0); }
362 bpf_set_curr_instr(BPF_ALU | BPF_SUB | BPF_X, 0, 0, 0); }
369 bpf_set_curr_instr(BPF_ALU | BPF_MUL | BPF_X, 0, 0, 0); }
371 bpf_set_curr_instr(BPF_ALU | BPF_MUL | BPF_X, 0, 0, 0); }
378 bpf_set_curr_instr(BPF_ALU | BPF_DIV | BPF_X, 0, 0, 0); }
380 bpf_set_curr_instr(BPF_ALU | BPF_DIV | BPF_X, 0, 0, 0); }
394 bpf_set_curr_instr(BPF_ALU | BPF_NEG, 0, 0, 0); }
410 bpf_set_curr_instr(BPF_ALU | BPF_OR | BPF_X, 0, 0, 0); }
[all …]
H A Dbpf_dbg.c64 #define BPF_ALU_ADD (BPF_ALU | BPF_ADD)
65 #define BPF_ALU_SUB (BPF_ALU | BPF_SUB)
66 #define BPF_ALU_MUL (BPF_ALU | BPF_MUL)
67 #define BPF_ALU_DIV (BPF_ALU | BPF_DIV)
68 #define BPF_ALU_MOD (BPF_ALU | BPF_MOD)
69 #define BPF_ALU_NEG (BPF_ALU | BPF_NEG)
70 #define BPF_ALU_AND (BPF_ALU | BPF_AND)
71 #define BPF_ALU_OR (BPF_ALU | BPF_OR)
72 #define BPF_ALU_XOR (BPF_ALU | BPF_XOR)
73 #define BPF_ALU_LSH (BPF_ALU | BPF_LSH)
[all …]
/openbmc/linux/arch/powerpc/net/
H A Dbpf_jit_comp64.c450 if (BPF_CLASS(code) == BPF_ALU) in bpf_jit_build_body()
461 if (BPF_CLASS(code) == BPF_ALU) in bpf_jit_build_body()
502 case BPF_ALU: in bpf_jit_build_body()
520 case BPF_ALU | BPF_NEG: /* (u32) dst = -dst */ in bpf_jit_build_body()
559 case BPF_ALU | BPF_XOR | BPF_X: /* (u32) dst ^= src */ in bpf_jit_build_body()
613 case BPF_ALU | BPF_ARSH | BPF_X: /* (s32) dst >>= src */ in bpf_jit_build_body()
619 case BPF_ALU | BPF_ARSH | BPF_K: /* (s32) dst >>= imm */ in bpf_jit_build_body()
630 case BPF_ALU | BPF_MOV | BPF_X: /* (u32) dst = src */ in bpf_jit_build_body()
639 case BPF_ALU | BPF_MOV | BPF_K: /* (u32) dst = imm */ in bpf_jit_build_body()
657 case BPF_ALU | BPF_END | BPF_FROM_LE: in bpf_jit_build_body()
[all …]
H A Dbpf_jit_comp32.c352 case BPF_ALU | BPF_ADD | BPF_X: /* (u32) dst += (u32) src */ in bpf_jit_build_body()
527 case BPF_ALU | BPF_NEG: /* (u32) dst = -dst */ in bpf_jit_build_body()
542 case BPF_ALU | BPF_AND | BPF_X: /* (u32) dst = dst & src */ in bpf_jit_build_body()
549 case BPF_ALU | BPF_AND | BPF_K: /* (u32) dst = dst & imm */ in bpf_jit_build_body()
591 case BPF_ALU | BPF_XOR | BPF_X: /* (u32) dst ^= src */ in bpf_jit_build_body()
684 case BPF_ALU | BPF_ARSH | BPF_X: /* (s32) dst >>= src */ in bpf_jit_build_body()
700 case BPF_ALU | BPF_ARSH | BPF_K: /* (s32) dst >>= imm */ in bpf_jit_build_body()
734 case BPF_ALU | BPF_MOV | BPF_X: /* (u32) dst = src */ in bpf_jit_build_body()
745 case BPF_ALU | BPF_MOV | BPF_K: /* (u32) dst = imm */ in bpf_jit_build_body()
752 case BPF_ALU | BPF_END | BPF_FROM_LE: in bpf_jit_build_body()
[all …]
/openbmc/linux/arch/mips/net/
H A Dbpf_jit_comp64.c649 case BPF_ALU | BPF_MOV | BPF_K: in build_insn()
654 case BPF_ALU | BPF_MOV | BPF_X: in build_insn()
664 case BPF_ALU | BPF_NEG: 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()
[all …]
H A Dbpf_jit_comp32.c1478 case BPF_ALU | BPF_MOV | BPF_K: in build_insn()
1483 case BPF_ALU | BPF_MOV | BPF_X: in build_insn()
1493 case BPF_ALU | BPF_NEG: 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()
[all …]
/openbmc/linux/arch/sparc/net/
H A Dbpf_jit_comp_32.c399 case BPF_ALU | BPF_ADD | BPF_X: /* A += X; */ in bpf_jit_compile()
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()
411 case BPF_ALU | BPF_AND | BPF_X: /* A &= X */ in bpf_jit_compile()
414 case BPF_ALU | BPF_AND | BPF_K: /* A &= K */ in bpf_jit_compile()
417 case BPF_ALU | BPF_OR | BPF_X: /* A |= X */ in bpf_jit_compile()
420 case BPF_ALU | BPF_OR | BPF_K: /* A |= K */ in bpf_jit_compile()
424 case BPF_ALU | BPF_XOR | BPF_X: 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()
[all …]
H A Dbpf_jit_comp_64.c909 case BPF_ALU | BPF_MOV | BPF_X: in build_insn()
918 case BPF_ALU | BPF_ADD | BPF_X: in build_insn()
922 case BPF_ALU | BPF_SUB | BPF_X: in build_insn()
926 case BPF_ALU | BPF_AND | BPF_X: in build_insn()
930 case BPF_ALU | BPF_OR | BPF_X: in build_insn()
934 case BPF_ALU | BPF_XOR | BPF_X: in build_insn()
938 case BPF_ALU | BPF_MUL | BPF_X: in build_insn()
944 case BPF_ALU | BPF_DIV | BPF_X: in build_insn()
974 case BPF_ALU | BPF_LSH | BPF_X: in build_insn()
996 case BPF_ALU | BPF_NEG: in build_insn()
[all …]
/openbmc/linux/arch/parisc/net/
H A Dbpf_jit_comp64.c608 case BPF_ALU | BPF_MOV | BPF_X: in bpf_jit_emit_insn()
622 case BPF_ALU | BPF_ADD | BPF_X: in bpf_jit_emit_insn()
628 case BPF_ALU | BPF_SUB | BPF_X: in bpf_jit_emit_insn()
634 case BPF_ALU | BPF_AND | BPF_X: in bpf_jit_emit_insn()
640 case BPF_ALU | BPF_OR | BPF_X: in bpf_jit_emit_insn()
646 case BPF_ALU | BPF_XOR | BPF_X: in bpf_jit_emit_insn()
652 case BPF_ALU | BPF_MUL | BPF_K: in bpf_jit_emit_insn()
657 case BPF_ALU | BPF_MUL | BPF_X: in bpf_jit_emit_insn()
663 case BPF_ALU | BPF_DIV | BPF_K: in bpf_jit_emit_insn()
720 case BPF_ALU | BPF_NEG: in bpf_jit_emit_insn()
[all …]
H A Dbpf_jit_comp32.c1184 case BPF_ALU | BPF_MOV | BPF_X: in bpf_jit_emit_insn()
1192 case BPF_ALU | BPF_ADD | BPF_X: in bpf_jit_emit_insn()
1193 case BPF_ALU | BPF_SUB | BPF_X: in bpf_jit_emit_insn()
1194 case BPF_ALU | BPF_AND | BPF_X: in bpf_jit_emit_insn()
1195 case BPF_ALU | BPF_OR | BPF_X: in bpf_jit_emit_insn()
1196 case BPF_ALU | BPF_XOR | BPF_X: in bpf_jit_emit_insn()
1198 case BPF_ALU | BPF_MUL | BPF_X: in bpf_jit_emit_insn()
1199 case BPF_ALU | BPF_MUL | BPF_K: in bpf_jit_emit_insn()
1201 case BPF_ALU | BPF_DIV | BPF_X: 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 Dbpf_jit.c468 case BPF_ALU | BPF_MOV | BPF_X: in build_insn()
475 case BPF_ALU | BPF_MOV | BPF_K: in build_insn()
481 case BPF_ALU | BPF_ADD | BPF_X: in build_insn()
488 case BPF_ALU | BPF_ADD | BPF_K: in build_insn()
500 case BPF_ALU | BPF_SUB | BPF_X: in build_insn()
507 case BPF_ALU | BPF_SUB | BPF_K: in build_insn()
519 case BPF_ALU | BPF_MUL | BPF_X: in build_insn()
526 case BPF_ALU | BPF_MUL | BPF_K: in build_insn()
572 case BPF_ALU | BPF_NEG: in build_insn()
599 case BPF_ALU | BPF_OR | BPF_X: in build_insn()
[all …]
/openbmc/linux/tools/include/linux/
H A Dfilter.h44 .code = BPF_ALU | BPF_OP(OP) | BPF_X, \
62 .code = BPF_ALU | BPF_OP(OP) | BPF_K, \
72 .code = BPF_ALU | BPF_END | BPF_SRC(TYPE), \
90 .code = BPF_ALU | BPF_MOV | BPF_X, \
108 .code = BPF_ALU | BPF_MOV | BPF_K, \
126 .code = BPF_ALU | BPF_MOV | BPF_SRC(TYPE), \
/openbmc/linux/arch/riscv/net/
H A Dbpf_jit_comp32.c1015 case BPF_ALU | BPF_MOV | BPF_X: in bpf_jit_emit_insn()
1023 case BPF_ALU | BPF_ADD | BPF_X: in bpf_jit_emit_insn()
1024 case BPF_ALU | BPF_SUB | BPF_X: in bpf_jit_emit_insn()
1025 case BPF_ALU | BPF_AND | BPF_X: in bpf_jit_emit_insn()
1026 case BPF_ALU | BPF_OR | BPF_X: in bpf_jit_emit_insn()
1027 case BPF_ALU | BPF_XOR | BPF_X: in bpf_jit_emit_insn()
1029 case BPF_ALU | BPF_MUL | BPF_X: in bpf_jit_emit_insn()
1030 case BPF_ALU | BPF_MUL | BPF_K: in bpf_jit_emit_insn()
1032 case BPF_ALU | BPF_DIV | BPF_X: in bpf_jit_emit_insn()
1052 case BPF_ALU | BPF_OR | BPF_K: in bpf_jit_emit_insn()
[all …]
H A Dbpf_jit_comp64.c1084 case BPF_ALU | BPF_MOV | BPF_X: in bpf_jit_emit_insn()
1109 case BPF_ALU | BPF_ADD | BPF_X: in bpf_jit_emit_insn()
1115 case BPF_ALU | BPF_SUB | BPF_X: in bpf_jit_emit_insn()
1125 case BPF_ALU | BPF_AND | BPF_X: in bpf_jit_emit_insn()
1131 case BPF_ALU | BPF_OR | BPF_X: in bpf_jit_emit_insn()
1137 case BPF_ALU | BPF_XOR | BPF_X: in bpf_jit_emit_insn()
1143 case BPF_ALU | BPF_MUL | BPF_X: in bpf_jit_emit_insn()
1149 case BPF_ALU | BPF_DIV | BPF_X: in bpf_jit_emit_insn()
1158 case BPF_ALU | BPF_MOD | BPF_X: in bpf_jit_emit_insn()
1187 case BPF_ALU | BPF_NEG: in bpf_jit_emit_insn()
[all …]
/openbmc/linux/arch/s390/net/
H A Dbpf_jit_comp.c798 case BPF_ALU | BPF_MOV | BPF_X: /* dst = (u32) src */ in bpf_jit_insn()
808 case BPF_ALU | BPF_MOV | BPF_K: /* dst = (u32) imm */ in bpf_jit_insn()
835 case BPF_ALU | BPF_ADD | BPF_X: /* dst = (u32) dst + (u32) src */ in bpf_jit_insn()
844 case BPF_ALU | BPF_ADD | BPF_K: /* dst = (u32) dst + (u32) imm */ in bpf_jit_insn()
1048 case BPF_ALU | BPF_OR | BPF_X: /* dst = (u32) dst | (u32) src */ in bpf_jit_insn()
1057 case BPF_ALU | BPF_OR | BPF_K: /* dst = (u32) dst | (u32) imm */ in bpf_jit_insn()
1164 case BPF_ALU | BPF_ARSH | BPF_X: /* ((s32) dst) >>= src */ in bpf_jit_insn()
1173 case BPF_ALU | BPF_ARSH | BPF_K: /* ((s32) dst >> imm */ in bpf_jit_insn()
1189 case BPF_ALU | BPF_NEG: /* dst = (u32) -dst */ in bpf_jit_insn()
1201 case BPF_ALU | BPF_END | BPF_FROM_BE: in bpf_jit_insn()
[all …]
/openbmc/linux/tools/testing/selftests/bpf/
H A Ddisasm.c67 [BPF_ALU] = "alu",
176 if (class == BPF_ALU || class == BPF_ALU64) { in print_bpf_insn()
184 insn->code, class == BPF_ALU ? 'w' : 'r', in print_bpf_insn()
185 insn->dst_reg, class == BPF_ALU ? 'w' : 'r', in print_bpf_insn()
189 insn->code, class == BPF_ALU ? 'w' : 'r', in print_bpf_insn()
194 class == BPF_ALU ? 'w' : 'r', in print_bpf_insn()
198 insn->code, class == BPF_ALU ? 'w' : 'r', in print_bpf_insn()
/openbmc/linux/kernel/bpf/
H A Ddisasm.c67 [BPF_ALU] = "alu",
176 if (class == BPF_ALU || class == BPF_ALU64) { in print_bpf_insn()
184 insn->code, class == BPF_ALU ? 'w' : 'r', in print_bpf_insn()
185 insn->dst_reg, class == BPF_ALU ? 'w' : 'r', in print_bpf_insn()
189 insn->code, class == BPF_ALU ? 'w' : 'r', in print_bpf_insn()
194 class == BPF_ALU ? 'w' : 'r', in print_bpf_insn()
198 insn->code, class == BPF_ALU ? 'w' : 'r', in print_bpf_insn()
/openbmc/linux/samples/bpf/
H A Dbpf_insn.h20 .code = BPF_ALU | BPF_OP(OP) | BPF_X, \
38 .code = BPF_ALU | BPF_OP(OP) | BPF_K, \
56 .code = BPF_ALU | BPF_MOV | BPF_X, \
74 .code = BPF_ALU | BPF_MOV | BPF_K, \
/openbmc/linux/arch/arm64/net/
H A Dbpf_jit_comp.c787 case BPF_ALU | BPF_MOV | BPF_X: in build_insn()
805 case BPF_ALU | BPF_ADD | BPF_X: in build_insn()
809 case BPF_ALU | BPF_SUB | BPF_X: in build_insn()
813 case BPF_ALU | BPF_AND | BPF_X: in build_insn()
817 case BPF_ALU | BPF_OR | BPF_X: in build_insn()
821 case BPF_ALU | BPF_XOR | BPF_X: in build_insn()
825 case BPF_ALU | BPF_MUL | BPF_X: in build_insn()
829 case BPF_ALU | BPF_DIV | BPF_X: in build_insn()
857 case BPF_ALU | BPF_NEG: in build_insn()
940 case BPF_ALU | BPF_OR | BPF_K: in build_insn()
[all …]
/openbmc/linux/arch/arm/net/
H A Dbpf_jit_32.c1377 case BPF_ALU | BPF_MOV | BPF_K: in build_insn()
1378 case BPF_ALU | BPF_MOV | BPF_X: in build_insn()
1404 case BPF_ALU | BPF_ADD | BPF_K: in build_insn()
1405 case BPF_ALU | BPF_ADD | BPF_X: in build_insn()
1406 case BPF_ALU | BPF_SUB | BPF_K: in build_insn()
1407 case BPF_ALU | BPF_SUB | BPF_X: in build_insn()
1408 case BPF_ALU | BPF_OR | BPF_K: in build_insn()
1409 case BPF_ALU | BPF_OR | BPF_X: in build_insn()
1410 case BPF_ALU | BPF_AND | BPF_K: in build_insn()
1411 case BPF_ALU | BPF_AND | BPF_X: in build_insn()
[all …]
/openbmc/linux/arch/x86/net/
H A Dbpf_jit_comp32.c1689 case BPF_ALU | BPF_MOV | BPF_K: in do_jit()
1690 case BPF_ALU | BPF_MOV | BPF_X: in do_jit()
1718 case BPF_ALU | BPF_ADD | BPF_K: in do_jit()
1719 case BPF_ALU | BPF_ADD | BPF_X: in do_jit()
1720 case BPF_ALU | BPF_SUB | BPF_K: in do_jit()
1721 case BPF_ALU | BPF_SUB | BPF_X: in do_jit()
1722 case BPF_ALU | BPF_OR | BPF_K: in do_jit()
1723 case BPF_ALU | BPF_OR | BPF_X: in do_jit()
1724 case BPF_ALU | BPF_AND | BPF_K: in do_jit()
1725 case BPF_ALU | BPF_AND | BPF_X: in do_jit()
[all …]
H A Dbpf_jit_comp.c1122 case BPF_ALU | BPF_ADD | BPF_X: in do_jit()
1123 case BPF_ALU | BPF_SUB | BPF_X: in do_jit()
1124 case BPF_ALU | BPF_AND | BPF_X: in do_jit()
1125 case BPF_ALU | BPF_OR | BPF_X: in do_jit()
1126 case BPF_ALU | BPF_XOR | BPF_X: in do_jit()
1139 case BPF_ALU | BPF_MOV | BPF_X: in do_jit()
1151 case BPF_ALU | BPF_NEG: in do_jit()
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()
[all …]
/openbmc/linux/kernel/
H A Dseccomp.c306 case BPF_ALU | BPF_ADD | BPF_K: in seccomp_check_filter()
307 case BPF_ALU | BPF_ADD | BPF_X: in seccomp_check_filter()
308 case BPF_ALU | BPF_SUB | BPF_K: in seccomp_check_filter()
309 case BPF_ALU | BPF_SUB | BPF_X: in seccomp_check_filter()
310 case BPF_ALU | BPF_MUL | BPF_K: in seccomp_check_filter()
311 case BPF_ALU | BPF_MUL | BPF_X: in seccomp_check_filter()
312 case BPF_ALU | BPF_DIV | BPF_K: in seccomp_check_filter()
313 case BPF_ALU | BPF_DIV | BPF_X: in seccomp_check_filter()
316 case BPF_ALU | BPF_OR | BPF_K: in seccomp_check_filter()
317 case BPF_ALU | BPF_OR | BPF_X: in seccomp_check_filter()
[all …]
/openbmc/linux/Documentation/bpf/standardization/
H A Dinstruction-set.rst191 For arithmetic and jump instructions (``BPF_ALU``, ``BPF_ALU64``, ``BPF_JMP`` and
250 the destination register is unchanged whereas for ``BPF_ALU`` the upper
253 ``BPF_ADD | BPF_X | BPF_ALU`` means::
263 ``BPF_XOR | BPF_K | BPF_ALU`` means::
276 For unsigned operations (``BPF_DIV`` and ``BPF_MOD``), for ``BPF_ALU``,
281 For signed operations (``BPF_SDIV`` and ``BPF_SMOD``), for ``BPF_ALU``,
304 For ``BPF_ALU``, the 1-bit source operand field in the opcode is used to
312 BPF_ALU BPF_TO_LE 0x00 convert between host byte order and little endian
313 BPF_ALU BPF_TO_BE 0x08 convert between host byte order and big endian
322 ``BPF_ALU | BPF_TO_LE | BPF_END`` with imm = 16/32/64 means::
[all …]
/openbmc/linux/tools/include/uapi/linux/
H A Dbpf_common.h11 #define BPF_ALU 0x04 macro

12