aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/bpf_types.h
diff options
context:
space:
mode:
authorMartin KaFai Lau <kafai@fb.com>2020-01-08 16:35:01 -0800
committerAlexei Starovoitov <ast@kernel.org>2020-01-09 08:46:18 -0800
commit976aba002fcb4b1baa71e4b0854f3d4ae48c1d4d (patch)
treecfd45993bac0afa64b8bc0ae9685c2ad6273d7b1 /include/linux/bpf_types.h
parentbpf: Add enum support to btf_ctx_access() (diff)
downloadwireguard-linux-976aba002fcb4b1baa71e4b0854f3d4ae48c1d4d.tar.xz
wireguard-linux-976aba002fcb4b1baa71e4b0854f3d4ae48c1d4d.zip
bpf: Support bitfield read access in btf_struct_access
This patch allows bitfield access as a scalar. It checks "off + size > t->size" to avoid accessing bitfield end up accessing beyond the struct. This check is done outside of the loop since it is applicable to all access. It also takes this chance to break early on the "off < moff" case. Signed-off-by: Martin KaFai Lau <kafai@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Yonghong Song <yhs@fb.com> Link: https://lore.kernel.org/bpf/20200109003501.3855427-1-kafai@fb.com
Diffstat (limited to 'include/linux/bpf_types.h')
0 files changed, 0 insertions, 0 deletions