函数逻辑报告 |
Source Code:kernel\bpf\verifier.c |
Create Date:2022-07-27 14:10:40 |
Last Modify:2022-05-19 20:02:10 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:For given verifier state backtrack_insn() is called from the last insn to* the first insn. Its purpose is to compute a bitmask of registers and* stack slots that needs precision in the parent verifier state.
函数原型:static int backtrack_insn(struct bpf_verifier_env *env, int idx, u32 *reg_mask, u64 *stack_mask)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct bpf_verifier_env * | env | |
int | idx | |
u32 * | reg_mask | |
u64 * | stack_mask |
1512 | const struct bpf_insn_cbs cbs = {cb_print = verbose, private_data = env, } |
1517 | class等于Instruction classes ( opcode ) |
1518 | opcode等于alu/jmp fields ( opcode ) |
1519 | mode等于BPF BPF_DW 0x18 64-bit ( opcode ) |
1520 | dreg等于1u左移 dest register 位 |
1521 | sreg等于1u左移 source register 位 |
1524 | 如果 opcode 恒等于0则返回:0 |
1526 | 如果level按位与BPF_LOG_LEVEL则 |
1527 | verbose(env, "regs=%x stack=%llx before ", * reg_mask, * stack_mask) |
1529 | print_bpf_insn( & cbs, insn, allow_ptr_leaks) |
1532 | 如果class恒等于BPF_ALU或class恒等于alu mode in double word width 则 |
1574 | 如果 source register 不等于BPF_REG_FP则返回:0 |
1576 | 如果ld/ldx fields ( opcode )不等于double word (64-bit) 则返回:0 |
1583 | spi等于负 signed offset 减1的差除size of eBPF register in bytes |
1584 | 如果spi大于等于64则 |
1589 | stack_mask或等于1ull左移spi位 |
1591 | 如果reg_mask按位与dreg则返回:负Operation is not supported |
1598 | 如果 dest register 不等于BPF_REG_FP则返回:0 |
1600 | 如果ld/ldx fields ( opcode )不等于double word (64-bit) 则返回:0 |
1602 | spi等于负 signed offset 减1的差除size of eBPF register in bytes |
1603 | 如果spi大于等于64则 |
1608 | 如果非stack_mask按位与1ull左移spi位的值则返回:0 |
1610 | stack_mask与等于1ull左移spi位的值的反 |
1613 | 否则如果class恒等于BPF_JMP或class恒等于jmp mode in word width 则 |
1614 | 如果opcode恒等于unction call 则 |
1615 | 如果 source register 恒等于when bpf_call->src_reg == BPF_PSEUDO_CALL, bpf_call->imm == pc-relative* offset to another bpf function则返回:负Operation is not supported |
1618 | reg_mask与等于1的反 |
1619 | 如果reg_mask按位与0x3f则 |
1627 | 否则如果opcode恒等于unction return 则 |
1628 | 返回:负Operation is not supported |
1638 | 如果mode恒等于BPF_IND或mode恒等于BPF_ABS则返回:负Operation is not supported |
1642 | 返回:0 |
名称 | 描述 |
---|---|
__mark_chain_precision |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |