summaryrefslogtreecommitdiff
path: root/kernel/smp.c
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2021-03-23 08:51:02 +0100
committerDaniel Borkmann <daniel@iogearbox.net>2021-04-16 23:51:39 +0200
commit24c109bb1537c12c02aeed2d51a347b4d6a9b76e (patch)
tree17362854c4e4a2205a112ffbe9e7c4452a8174ed /kernel/smp.c
parent6f55b2f2a1178856c19bbce2f71449926e731914 (diff)
bpf: Ensure off_reg has no mixed signed bounds for all types
The mixed signed bounds check really belongs into retrieve_ptr_limit() instead of outside of it in adjust_ptr_min_max_vals(). The reason is that this check is not tied to PTR_TO_MAP_VALUE only, but to all pointer types that we handle in retrieve_ptr_limit() and given errors from the latter propagate back to adjust_ptr_min_max_vals() and lead to rejection of the program, it's a better place to reside to avoid anything slipping through for future types. The reason why we must reject such off_reg is that we otherwise would not be able to derive a mask, see details in 9d7eceede769 ("bpf: restrict unknown scalars of mixed signed bounds for unprivileged"). Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Reviewed-by: John Fastabend <john.fastabend@gmail.com> Acked-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/smp.c')
0 files changed, 0 insertions, 0 deletions