Commit 4dc6e55
bpf: Move sanitize_val_alu out of op switch
commit f528819 upstream.
Add a small sanitize_needed() helper function and move sanitize_val_alu()
out of the main opcode switch. In upcoming work, we'll move sanitize_ptr_alu()
as well out of its opcode switch so this helps to streamline both.
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
[fllinden@amazon.com: backported to 5.4]
Signed-off-by: Frank van der Linden <fllinden@amazon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 876d1ce commit 4dc6e55
1 file changed
Lines changed: 10 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4352 | 4352 | | |
4353 | 4353 | | |
4354 | 4354 | | |
| 4355 | + | |
| 4356 | + | |
| 4357 | + | |
| 4358 | + | |
| 4359 | + | |
4355 | 4360 | | |
4356 | 4361 | | |
4357 | 4362 | | |
| |||
4753 | 4758 | | |
4754 | 4759 | | |
4755 | 4760 | | |
4756 | | - | |
4757 | | - | |
| 4761 | + | |
4758 | 4762 | | |
4759 | 4763 | | |
4760 | 4764 | | |
| 4765 | + | |
| 4766 | + | |
| 4767 | + | |
| 4768 | + | |
4761 | 4769 | | |
4762 | 4770 | | |
4763 | 4771 | | |
| |||
4777 | 4785 | | |
4778 | 4786 | | |
4779 | 4787 | | |
4780 | | - | |
4781 | | - | |
4782 | | - | |
4783 | 4788 | | |
4784 | 4789 | | |
4785 | 4790 | | |
| |||
0 commit comments