summaryrefslogtreecommitdiff
path: root/scripts/bpf_helpers_doc.py
diff options
context:
space:
mode:
authorBjörn Töpel <bjorn.topel@gmail.com>2020-11-18 08:16:39 +0100
committerAndrii Nakryiko <andrii@kernel.org>2020-11-18 17:45:31 -0800
commitc77b0589ca29ad1859fe7d7c1ecd63c0632379fa (patch)
tree09ca5ed441c0f0a43ef3000b7a86b2224fc49185 /scripts/bpf_helpers_doc.py
parent6016df8fe874e1cf36f6357d71438b384198ce06 (diff)
selftests/bpf: Avoid running unprivileged tests with alignment requirements
Some architectures have strict alignment requirements. In that case, the BPF verifier detects if a program has unaligned accesses and rejects them. A user can pass BPF_F_ANY_ALIGNMENT to a program to override this check. That, however, will only work when a privileged user loads a program. An unprivileged user loading a program with this flag will be rejected prior entering the verifier. Hence, it does not make sense to load unprivileged programs without strict alignment when testing the verifier. This patch avoids exactly that. Signed-off-by: Björn Töpel <bjorn.topel@gmail.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Luke Nelson <luke.r.nels@gmail.com> Link: https://lore.kernel.org/bpf/20201118071640.83773-3-bjorn.topel@gmail.com
Diffstat (limited to 'scripts/bpf_helpers_doc.py')
0 files changed, 0 insertions, 0 deletions