Function report |
Source Code:kernel\bpf\verifier.c |
Create Date:2022-07-28 13:03:01 |
Last Modify:2022-05-19 20:02:10 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:stacksafe
Proto:static bool stacksafe(struct bpf_func_state *old, struct bpf_func_state *cur, struct idpair *idmap)
Type:bool
Parameter:
Type | Parameter | Name |
---|---|---|
struct bpf_func_state * | old | |
struct bpf_func_state * | cur | |
struct idpair * | idmap |
7207 | When i < allocated_stack cycle |
7208 | spi = i / size of eBPF register in bytes |
7210 | If Not (live & REG_LIVE_READ) Then |
7211 | i += size of eBPF register in bytes - 1 |
7213 | Continue |
7216 | If slot_type[i % size of eBPF register in bytes ] == nothing was stored in this stack slot Then Continue |
7222 | If i >= allocated_stack Then Return false |
7229 | If slot_type[i % size of eBPF register in bytes ] == BPF program wrote some data into this slot && slot_type[i % size of eBPF register in bytes ] == BPF program wrote constant zero Then Continue |
7232 | If slot_type[i % size of eBPF register in bytes ] != slot_type[i % size of eBPF register in bytes ] Then Return false |
7240 | If i % size of eBPF register in bytes Then Continue |
7242 | If slot_type[0] != register spilled into stack Then Continue |
7244 | If Not Returns true if (rold safe implies rcur safe) Then Return false |
7259 | Return true |
Name | Describe |
---|---|
func_states_equal | mpare two verifier states* all states stored in state_list are known to be valid, since* verifier reached 'bpf_exit' instruction through them* this function is called when verifier exploring different branches of* execution popped from the state 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 |