mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-12-07 20:54:50 +00:00
The first test case, for pointer null checks, is equivalent to the
following pseudo-code. It checks that the verifier does not complain on
line 6 and recognizes that ptr isn't null.
1: ptr = bpf_map_lookup_elem(map, &key);
2: ret = subprog(ptr) {
3: return ptr != NULL;
4: }
5: if (ret)
6: value = *ptr;
The second test case, for packet bound checks, is equivalent to the
following pseudo-code. It checks that the verifier does not complain on
line 7 and recognizes that the packet is at least 1 byte long.
1: pkt_end = ctx.pkt_end;
2: ptr = ctx.pkt + 8;
3: ret = subprog(ptr, pkt_end) {
4: return ptr <= pkt_end;
5: }
6: if (ret)
7: value = *(u8 *)ctx.pkt;
Signed-off-by: Paul Chaignon <paul.chaignon@orange.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
|
||
|---|---|---|
| .. | ||
| .gitignore | ||
| and.c | ||
| array_access.c | ||
| basic_call.c | ||
| basic_instr.c | ||
| basic_stack.c | ||
| basic_stx_ldx.c | ||
| basic.c | ||
| bounds_deduction.c | ||
| bounds_mix_sign_unsign.c | ||
| bounds.c | ||
| bpf_get_stack.c | ||
| calls.c | ||
| cfg.c | ||
| cgroup_inv_retcode.c | ||
| cgroup_skb.c | ||
| cgroup_storage.c | ||
| const_or.c | ||
| ctx_sk_msg.c | ||
| ctx_skb.c | ||
| ctx.c | ||
| dead_code.c | ||
| direct_packet_access.c | ||
| direct_stack_access_wraparound.c | ||
| div0.c | ||
| div_overflow.c | ||
| helper_access_var_len.c | ||
| helper_packet_access.c | ||
| helper_value_access.c | ||
| jit.c | ||
| jmp32.c | ||
| jset.c | ||
| jump.c | ||
| junk_insn.c | ||
| ld_abs.c | ||
| ld_dw.c | ||
| ld_imm64.c | ||
| ld_ind.c | ||
| leak_ptr.c | ||
| lwt.c | ||
| map_in_map.c | ||
| map_ptr_mixing.c | ||
| map_ret_val.c | ||
| masking.c | ||
| meta_access.c | ||
| perf_event_sample_period.c | ||
| prevent_map_lookup.c | ||
| raw_stack.c | ||
| ref_tracking.c | ||
| runtime_jit.c | ||
| search_pruning.c | ||
| sock.c | ||
| spill_fill.c | ||
| spin_lock.c | ||
| stack_ptr.c | ||
| uninit.c | ||
| unpriv.c | ||
| value_adj_spill.c | ||
| value_illegal_alu.c | ||
| value_or_null.c | ||
| value_ptr_arith.c | ||
| value.c | ||
| var_off.c | ||
| xadd.c | ||
| xdp_direct_packet_access.c | ||
| xdp.c | ||