diff options
author | Joanne Koong <joannelkoong@gmail.com> | 2022-07-23 01:01:05 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2022-07-26 14:15:33 +0300 |
commit | bbd52178e249fe893ef4a9b87cde5b6c473b0a7c (patch) | |
tree | c1e7dbbf8cad8597dbcef6cd9533969c5b28ab80 /lib/find_bit_benchmark.c | |
parent | 1115169f47ae45eeb04c616c404492bc8268daa0 (diff) | |
download | linux-bbd52178e249fe893ef4a9b87cde5b6c473b0a7c.tar.xz |
bpf: Fix bpf_xdp_pointer return pointer
For the case where offset + len == size, bpf_xdp_pointer should return a
valid pointer to the addr because that access is permitted. We should
only return NULL in the case where offset + len exceeds size.
Fixes: 3f364222d032 ("net: xdp: introduce bpf_xdp_pointer utility routine")
Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/bpf/20220722220105.2065466-1-joannelkoong@gmail.com
Diffstat (limited to 'lib/find_bit_benchmark.c')
0 files changed, 0 insertions, 0 deletions