diff options
| author | Gianluca Borello <[email protected]> | 2017-01-09 10:19:46 -0800 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2017-01-09 16:56:26 -0500 |
| commit | dbcfe5f76dd5266b8f308b5a8f9ef52f74b2d6e7 (patch) | |
| tree | 168eb4e0a8d5c5267b315afebad855f5c2d3be57 /tools/perf/scripts/python | |
| parent | f3a3e248f3f7cd9a4bed334022704d7e7fc781bf (diff) | |
bpf: split check_mem_access logic for map values
Move the logic to check memory accesses to a PTR_TO_MAP_VALUE_ADJ from
check_mem_access() to a separate helper check_map_access_adj(). This
enables to use those checks in other parts of the verifier as well,
where boundaries on PTR_TO_MAP_VALUE_ADJ might need to be checked, for
example when checking helper function arguments. The same thing is
already happening for other types such as PTR_TO_PACKET and its
check_packet_access() helper.
The code has been copied verbatim, with the only difference of removing
the "off += reg->max_value" statement and moving the sum into the call
statement to check_map_access(), as that was only needed due to the
earlier common check_map_access() call.
Signed-off-by: Gianluca Borello <[email protected]>
Acked-by: Daniel Borkmann <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions