]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Make context access check generic
authorLorenz Bauer <lmb@cloudflare.com>
Mon, 21 Sep 2020 12:12:23 +0000 (13:12 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 21 Sep 2020 22:00:41 +0000 (15:00 -0700)
commitecbfaf4a6e03512b99e941b48a8f6fc202ddd8a3
treed3e545d04b0c1ff4aabc04fe6fa8923583c2c1dc
parentff3dc3ff57fa50587ee8e23a3b9a4f1ddabed40d
bpf: Make context access check generic

Always check context access if the register we're operating on is
PTR_TO_CTX, rather than relying on ARG_PTR_TO_CTX. This allows
simplifying the arg_type checking section of the function.

Signed-off-by: Lorenz Bauer <lmb@cloudflare.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20200921121227.255763-8-lmb@cloudflare.com
kernel/bpf/verifier.c