]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Set meta->raw_mode for pointers close to use
authorLorenz Bauer <lmb@cloudflare.com>
Mon, 21 Sep 2020 12:12:24 +0000 (13:12 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 21 Sep 2020 22:00:41 +0000 (15:00 -0700)
commit3130714c5d7d1586c4ce9100703231d46625a4c8
treeb78a59c19e7c238ad4819cba514fa5a290adcc89
parent09d0e9b97b57bd24cbd790c75563053282cbc2cb
bpf: Set meta->raw_mode for pointers close to use

If we encounter a pointer to memory, we set meta->raw_mode depending
on the type of memory we point at. What isn't obvious is that this
information is only used when the next memory size argument is
encountered.

Move the assignment closer to where it's used, and add a comment that
explains what is going on.

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-9-lmb@cloudflare.com
kernel/bpf/verifier.c