diff options
author | Shung-Hsi Yu <[email protected]> | 2022-03-07 13:29:18 +0800 |
---|---|---|
committer | Daniel Borkmann <[email protected]> | 2022-03-08 15:36:45 +0100 |
commit | 44e9a741cad824f45112b79c21d88c201d5aec13 (patch) | |
tree | 03e6959f89fc523b68b0fc98f19a81cdaa6cfafd /lib/string_helpers.c | |
parent | e878ae2d1df5de4ea36e6d96c7d3ebe789aab9a5 (diff) |
bpf: Determine buf_info inside check_buffer_access()
Instead of determining buf_info string in the caller of check_buffer_access(),
we can determine whether the register type is read-only through
type_is_rdonly_mem() helper inside check_buffer_access() and construct
buf_info, making the code slightly cleaner.
Signed-off-by: Shung-Hsi Yu <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Yonghong Song <[email protected]>
Link: https://lore.kernel.org/bpf/YiWYLnAkEZXBP/gH@syu-laptop
Diffstat (limited to 'lib/string_helpers.c')
0 files changed, 0 insertions, 0 deletions