summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorPiotr Krysiuk <piotras@gmail.com>2021-03-16 10:26:25 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2021-03-17 21:13:22 +0300
commitb5871dca250cd391885218b99cc015aca1a51aea (patch)
treeeeac1e5ab22d5413d02cd040155c8d4c8641634a /mm
parent10d2bb2e6b1d8c4576c56a748f697dbeb8388899 (diff)
downloadlinux-b5871dca250cd391885218b99cc015aca1a51aea.tar.xz
bpf: Simplify alu_limit masking for pointer arithmetic
Instead of having the mov32 with aux->alu_limit - 1 immediate, move this operation to retrieve_ptr_limit() instead to simplify the logic and to allow for subsequent sanity boundary checks inside retrieve_ptr_limit(). This avoids in future that at the time of the verifier masking rewrite we'd run into an underflow which would not sign extend due to the nature of mov32 instruction. Signed-off-by: Piotr Krysiuk <piotras@gmail.com> Co-developed-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions