bpf: Improve verifier error messages for users
authorDaniel Borkmann <daniel@iogearbox.net>
Mon, 31 May 2021 18:25:44 +0000 (18:25 +0000)
committerCosmin Tanislav <demonsingur@gmail.com>
Thu, 16 May 2024 07:58:24 +0000 (10:58 +0300)
commita1fc6cafbf936c6f9cb593b96e1133826d99218d
tree73d2b693ad13d540f35ca8afb274f5df275ef715
parentb91e7c1015d2fd71f1ae0ef30c9491a4297b3fbb
bpf: Improve verifier error messages for users

commit a6aaece00a57fa6f22575364b3903dfbccf5345d upstream.

Consolidate all error handling and provide more user-friendly error messages
from sanitize_ptr_alu() and sanitize_val_alu().

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: backport to 4.14]
Signed-off-by: Frank van der Linden <fllinden@amazon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/bpf/verifier.c