Commit 44e9a74
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 <shung-hsi.yu@suse.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/YiWYLnAkEZXBP/gH@syu-laptop1 parent e878ae2 commit 44e9a74
1 file changed
+3
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4062 | 4062 | | |
4063 | 4063 | | |
4064 | 4064 | | |
4065 | | - | |
4066 | 4065 | | |
4067 | 4066 | | |
| 4067 | + | |
4068 | 4068 | | |
4069 | 4069 | | |
4070 | 4070 | | |
| |||
4576 | 4576 | | |
4577 | 4577 | | |
4578 | 4578 | | |
4579 | | - | |
4580 | 4579 | | |
4581 | 4580 | | |
4582 | 4581 | | |
| |||
4585 | 4584 | | |
4586 | 4585 | | |
4587 | 4586 | | |
4588 | | - | |
4589 | 4587 | | |
4590 | 4588 | | |
4591 | | - | |
4592 | 4589 | | |
4593 | 4590 | | |
4594 | 4591 | | |
4595 | 4592 | | |
4596 | | - | |
| 4593 | + | |
4597 | 4594 | | |
4598 | 4595 | | |
4599 | 4596 | | |
| |||
4856 | 4853 | | |
4857 | 4854 | | |
4858 | 4855 | | |
4859 | | - | |
4860 | 4856 | | |
4861 | 4857 | | |
4862 | 4858 | | |
| |||
4883 | 4879 | | |
4884 | 4880 | | |
4885 | 4881 | | |
4886 | | - | |
4887 | 4882 | | |
4888 | 4883 | | |
4889 | | - | |
4890 | 4884 | | |
4891 | 4885 | | |
4892 | 4886 | | |
4893 | 4887 | | |
4894 | | - | |
| 4888 | + | |
4895 | 4889 | | |
4896 | 4890 | | |
4897 | 4891 | | |
| |||
0 commit comments