bpf: Rework ptr_limit into alu_limit and add common error path
authorDaniel Borkmann <daniel@iogearbox.net>
Tue, 23 Mar 2021 08:04:10 +0000 (09:04 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Apr 2021 11:01:00 +0000 (13:01 +0200)
commit55565c30790839b40311c270a8b1a437ae9b2769
treecc10b2fca9b1b5b2657bfc21df2771c655371e65
parent496e2fabbbe37c9d2991646114f87c9a11a47bd9
bpf: Rework ptr_limit into alu_limit and add common error path

commit b658bbb844e28f1862867f37e8ca11a8e2aa94a3 upstream.

Small refactor with no semantic changes in order to consolidate the max
ptr_limit boundary check.

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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/bpf/verifier.c