函数逻辑报告 |
Source Code:kernel\bpf\core.c |
Create Date:2022-07-27 14:00:19 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:__bpf_prog_run - run eBPF program on a given context*@regs: is the array of MAX_BPF_EXT_REG eBPF pseudo-registers*@insn: is the array of eBPF instructions*@stack: is the eBPF storage stack* Decode and execute eBPF instructions.
函数原型:static u64 __no_fgcse ___bpf_prog_run(u64 *regs, const struct bpf_insn *insn, u64 *stack)
返回类型:u64
参数:
类型 | 参数 | 名称 |
---|---|---|
u64 * | regs | |
const struct bpf_insn * | insn | |
u64 * | stack |
1379 | tail_call_cnt等于0 |
1384 | select_insn : |
1411 | ALU_NEG : |
1412 | Named registers = (u32) - Named registers |
1413 | CONT |
1414 | ALU64_NEG : |
1415 | Named registers 等于负Named registers |
1416 | CONT |
1417 | ALU_MOV_X : |
1418 | Named registers 等于SRC |
1419 | CONT |
1420 | ALU_MOV_K : |
1421 | Named registers 等于IMM |
1422 | CONT |
1423 | ALU64_MOV_X : |
1424 | Named registers 等于SRC |
1425 | CONT |
1426 | ALU64_MOV_K : |
1427 | Named registers 等于IMM |
1428 | CONT |
1429 | LD_IMM_DW : |
1430 | Named registers 等于 signed immediate constant 按位或 signed immediate constant 左移32位 |
1431 | insn自加 |
1432 | CONT |
1433 | ALU_ARSH_X : |
1434 | Named registers 等于Named registers 右移SRC位 |
1435 | CONT |
1436 | ALU_ARSH_K : |
1437 | Named registers 等于Named registers 右移IMM位 |
1438 | CONT |
1439 | ALU64_ARSH_X : |
1440 | ( * (s64 * ) & Named registers ) >>= SRC |
1441 | CONT |
1442 | ALU64_ARSH_K : |
1443 | ( * (s64 * ) & Named registers ) >>= IMM |
1444 | CONT |
1445 | ALU64_MOD_X : |
1447 | Named registers 等于AX |
1448 | CONT |
1449 | ALU_MOD_X : |
1450 | AX等于Named registers |
1451 | Named registers 等于do_div() is NOT a C function(AX, (u32)SRC) |
1452 | CONT |
1453 | ALU64_MOD_K : |
1455 | Named registers 等于AX |
1456 | CONT |
1457 | ALU_MOD_K : |
1458 | AX等于Named registers |
1459 | Named registers 等于do_div() is NOT a C function(AX, (u32)IMM) |
1460 | CONT |
1461 | ALU64_DIV_X : |
1463 | CONT |
1464 | ALU_DIV_X : |
1465 | AX等于Named registers |
1466 | do_div() is NOT a C function(AX, (u32)SRC) |
1467 | Named registers 等于AX |
1468 | CONT |
1469 | ALU64_DIV_K : |
1471 | CONT |
1472 | ALU_DIV_K : |
1473 | AX等于Named registers |
1474 | do_div() is NOT a C function(AX, (u32)IMM) |
1475 | Named registers 等于AX |
1476 | CONT |
1477 | ALU_END_TO_BE : |
1480 | Named registers 等于cpu_to_be16(Named registers ) |
1481 | 退出 |
1483 | Named registers 等于cpu_to_be32(Named registers ) |
1484 | 退出 |
1486 | Named registers 等于cpu_to_be64(Named registers ) |
1487 | 退出 |
1489 | CONT |
1490 | ALU_END_TO_LE : |
1493 | Named registers 等于cpu_to_le16(Named registers ) |
1494 | 退出 |
1496 | Named registers 等于cpu_to_le32(Named registers ) |
1497 | 退出 |
1502 | CONT |
1505 | JMP_CALL : |
1512 | CONT |
1514 | JMP_CALL_ARGS : |
1515 | Registers = (__bpf_call_base_args + signed immediate constant )(BPF_R1, BPF_R2, BPF_R3, BPF_R4, BPF_R5, insn + signed offset + 1) |
1519 | CONT |
1521 | JMP_TAIL_CALL : |
1527 | 如果此条件成立可能性小(为编译器优化)(index >= max_entries)则转到:out |
1529 | 如果此条件成立可能性小(为编译器优化)(tail_call_cnt > MAX_TAIL_CALL_CNT)则转到:out |
1532 | tail_call_cnt自加 |
1544 | 转到:select_insn |
1545 | out : |
1546 | CONT |
1548 | JMP_JA : |
1549 | insn加等于 signed offset |
1550 | CONT |
1551 | JMP_EXIT : |
1552 | 返回:Registers |
1603 | STX and ST and LDX(B, u8) |
1604 | STX and ST and LDX(H, u16) |
1606 | STX and ST and LDX(DW, u64) |
1614 | LDX_PROBE(This "rolls" over the 512-bit array , 4) |
1618 | STX_XADD_W : |
1619 | atomic_add((u32)SRC, (atomic_t * )(unsignedlong)(Named registers + signed offset )) |
1621 | CONT |
1622 | STX_XADD_DW : |
1623 | atomic64_add((u64)SRC, (atomic64_t * )(unsignedlong)(Named registers + signed offset )) |
1625 | CONT |
1627 | default_label : |
1635 | BUG_ON(1) |
1636 | 返回:0 |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |