Searched hist:c77b0589 (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/tools/testing/selftests/bpf/ |
H A D | test_verifier.c | c77b0589 Wed Nov 18 01:16:39 CST 2020 Björn Töpel <bjorn.topel@gmail.com> 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
|