]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Generalize check_ctx_reg for reuse with other types
authorDaniel Borkmann <daniel@iogearbox.net>
Mon, 10 Jan 2022 14:05:49 +0000 (14:05 +0000)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 19 Jan 2022 00:21:24 +0000 (01:21 +0100)
commit6ad7eb37bb58f327dd587c9947c52e9440e7f061
treea3e887f6a5df46e96f185bd4f27aee1c3e28496f
parent6e966c07239cfcf51291034f9722deee75677d23
bpf: Generalize check_ctx_reg for reuse with other types

Generalize the check_ctx_reg() helper function into a more generic named one
so that it can be reused for other register types as well to check whether
their offset is non-zero. No functional change.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
include/linux/bpf_verifier.h
kernel/bpf/btf.c
kernel/bpf/verifier.c