Function report |
Source Code:kernel\bpf\verifier.c |
Create Date:2022-07-28 12:57:24 |
Last Modify:2022-05-19 20:02:10 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:__mark_chain_precision
Proto:static int __mark_chain_precision(struct bpf_verifier_env *env, int regno, int spi)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct bpf_verifier_env * | env | |
int | regno | |
int | spi |
1730 | st = current verifier state |
1736 | stack_mask = If spi >= 0 Then 1ull << spi Else 0 |
1737 | bool skip_first = true |
1738 | bool new_marks = false |
1741 | If Not allow_ptr_leaks Then Return 0 |
1745 | func = call stack tracking [curframe] |
1746 | If regno >= 0 Then |
1752 | If Not if (!precise && SCALAR_VALUE) min/max/tnum don't affect safety Then new_marks = true |
1754 | Else reg_mask = 0 |
1760 | If slot_type[0] != register spilled into stack Then |
1761 | stack_mask = 0 |
1762 | Break |
1764 | reg = spilled_ptr |
1766 | stack_mask = 0 |
1767 | Break |
1769 | If Not if (!precise && SCALAR_VALUE) min/max/tnum don't affect safety Then new_marks = true |
1771 | Else stack_mask = 0 |
1774 | Break |
1777 | If Not new_marks Then Return 0 |
1779 | If Not reg_mask && Not stack_mask Then Return 0 |
1781 | cycle |
1782 | DECLARE_BITMAP(mask, 64) |
1783 | history = jmp_history_cnt |
1787 | cycle |
1788 | If skip_first Then |
1789 | err = 0 |
1790 | skip_first = false |
1791 | Else |
1794 | If err == -Operation is not supported Then |
1797 | Else if err Then |
1798 | Return err |
1800 | If Not reg_mask && Not stack_mask Then Return 0 |
1808 | i = Backtrack one insn at a time. If idx is not at the top of recorded* history then previous instruction came from straight line execution. |
1809 | If i >= Number of filter blocks Then |
1822 | If Not st Then Break |
1825 | new_marks = false |
1826 | func = call stack tracking [curframe] |
1834 | If Not if (!precise && SCALAR_VALUE) min/max/tnum don't affect safety Then new_marks = true |
1841 | If i >= allocated_stack / size of eBPF register in bytes Then |
1859 | If slot_type[0] != register spilled into stack Then |
1860 | stack_mask &= ~(1ull << i) |
1861 | Continue |
1863 | reg = spilled_ptr |
1865 | stack_mask &= ~(1ull << i) |
1866 | Continue |
1868 | If Not if (!precise && SCALAR_VALUE) min/max/tnum don't affect safety Then new_marks = true |
1872 | If level & BPF_LOG_LEVEL Then |
1873 | print_verifier_state(env, func) |
1874 | verbose(env, "parent %s regs=%x stack=%llx marks\n", new_marks ? "didn't have" : "already had", reg_mask, stack_mask) |
1879 | If Not reg_mask && Not stack_mask Then Break |
1881 | If Not new_marks Then Break |
1884 | last_idx = last_insn_idx |
1887 | Return 0 |
Name | Describe |
---|---|
mark_chain_precision | |
mark_chain_precision_stack |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |