]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
bpf: Refactor and streamline bounds check into helper
authorDaniel Borkmann <daniel@iogearbox.net>
Tue, 23 Mar 2021 14:05:48 +0000 (15:05 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 7 May 2021 07:54:10 +0000 (09:54 +0200)
commit3d6ab3507b912cc67e9347f038ab796488fbc385
treee0521715010e03e9d2f5eb17a1901605fe4d755e
parentca5b89bf443a712f915976541ee2c1a63f204e6a
bpf: Refactor and streamline bounds check into helper

BugLink: https://bugs.launchpad.net/bugs/1927535
[ Upstream commit 073815b756c51ba9d8384d924c5d1c03ca3d1ae4 ]

Move the bounds check in adjust_ptr_min_max_vals() into a small helper named
sanitize_check_bounds() in order to simplify the former a bit.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
kernel/bpf/verifier.c