Thread (11 messages) 11 messages, 4 authors, 2022-08-03

Re: [PATCH v4 3/4] selftests/bpf: Add tests verifying bpf lsm userns_create hook

From: KP Singh <kpsingh@kernel.org>
Date: 2022-08-02 22:09:11
Also in: bpf, linux-kselftest, lkml, netdev, selinux

On Mon, Aug 1, 2022 at 8:02 PM Frederick Lawler [off-list ref] wrote:
The LSM hook userns_create was introduced to provide LSM's an
opportunity to block or allow unprivileged user namespace creation. This
test serves two purposes: it provides a test eBPF implementation, and
tests the hook successfully blocks or allows user namespace creation.

This tests 3 cases:

        1. Unattached bpf program does not block unpriv user namespace
           creation.
        2. Attached bpf program allows user namespace creation given
           CAP_SYS_ADMIN privileges.
        3. Attached bpf program denies user namespace creation for a
           user without CAP_SYS_ADMIN.

Signed-off-by: Frederick Lawler <redacted>
Looks good to me (Also checked it on vmtest.sh)

Acked-by: KP Singh <kpsingh@kernel.org>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help