-
- Downloads
bpf: Add strict alignment flag for BPF_PROG_LOAD.
Add a new field, "prog_flags", and an initial flag value BPF_F_STRICT_ALIGNMENT. When set, the verifier will enforce strict pointer alignment regardless of the setting of CONFIG_EFFICIENT_UNALIGNED_ACCESS. The verifier, in this mode, will also use a fixed value of "2" in place of NET_IP_ALIGN. This facilitates test cases that will exercise and validate this part of the verifier even when run on architectures where alignment doesn't matter. Signed-off-by:David S. Miller <davem@davemloft.net> Acked-by:
Daniel Borkmann <daniel@iogearbox.net>
Showing
- include/linux/bpf_verifier.h 1 addition, 0 deletionsinclude/linux/bpf_verifier.h
- include/uapi/linux/bpf.h 8 additions, 0 deletionsinclude/uapi/linux/bpf.h
- kernel/bpf/syscall.c 4 additions, 1 deletionkernel/bpf/syscall.c
- kernel/bpf/verifier.c 17 additions, 6 deletionskernel/bpf/verifier.c
- tools/build/feature/test-bpf.c 1 addition, 0 deletionstools/build/feature/test-bpf.c
- tools/include/uapi/linux/bpf.h 9 additions, 2 deletionstools/include/uapi/linux/bpf.h
Loading
Please register or sign in to comment