diff options
| author | David S. Miller <davem@davemloft.net> | 2017-05-11 14:19:10 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2017-05-11 14:19:10 -0400 |
| commit | 228b0324fe61781c8a6939032da644e677f6d01b (patch) | |
| tree | 26b0f4d929aabccf16dbf7f4244ba03c4377d83d /include/linux | |
| parent | d8b54110ee944de522ccd3531191f39986ec20f9 (diff) | |
| parent | 18b3ad90b64e9893297357608abddd26170730eb (diff) | |
| download | cachepc-linux-228b0324fe61781c8a6939032da644e677f6d01b.tar.gz cachepc-linux-228b0324fe61781c8a6939032da644e677f6d01b.zip | |
Merge branch 'bpf-pkt-ptr-align'
David S. Miller says:
====================
bpf: Add alignment tracker to verifier.
First we add the alignment tracking logic to the verifier.
Next, we work on building up infrastructure to facilitate regression
testing of this facility.
Finally, we add the "test_align" test case.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/bpf_verifier.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/bpf_verifier.h b/include/linux/bpf_verifier.h index 5efb4db44e1e..d5093b52b485 100644 --- a/include/linux/bpf_verifier.h +++ b/include/linux/bpf_verifier.h @@ -40,6 +40,9 @@ struct bpf_reg_state { */ s64 min_value; u64 max_value; + u32 min_align; + u32 aux_off; + u32 aux_off_align; }; enum bpf_stack_slot_type { @@ -87,6 +90,7 @@ struct bpf_verifier_env { struct bpf_prog *prog; /* eBPF program being verified */ struct bpf_verifier_stack_elem *head; /* stack of verifier states to be processed */ int stack_size; /* number of states to be processed */ + bool strict_alignment; /* perform strict pointer alignment checks */ struct bpf_verifier_state cur_state; /* current verifier state */ struct bpf_verifier_state_list **explored_states; /* search pruning optimization */ const struct bpf_ext_analyzer_ops *analyzer_ops; /* external analyzer ops */ |
