diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2023-03-02 15:50:00 -0800 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2023-03-04 11:14:31 -0800 |
commit | 567da5d253cd6b41c6d015adac1af653725bef9d (patch) | |
tree | cc08a959fb2c37c6dd8848a14e63d59f3dc96069 /tools/testing/selftests | |
parent | d54e0f6c1adffbf72f2cf4aebe6122899c3b851c (diff) |
bpf: improve regsafe() checks for PTR_TO_{MEM,BUF,TP_BUFFER}
Teach regsafe() logic to handle PTR_TO_MEM, PTR_TO_BUF, and
PTR_TO_TP_BUFFER similarly to PTR_TO_MAP_{KEY,VALUE}. That is, instead of
exact match for var_off and range, use tnum_in() and range_within()
checks, allowing more general verified state to subsume more specific
current state. This allows to match wider range of valid and safe
states, speeding up verification and detecting wider range of equivalent
states for upcoming open-coded iteration looping logic.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20230302235015.2044271-3-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests')
0 files changed, 0 insertions, 0 deletions