All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
Cc: linux-security-module@vger.kernel.org
Subject: Re: [PATCH v2 5/6] selftests/landlock: Test capability checks outside the capable hook
Date: Tue, 17 Nov 2026 10:20:57 +0000	[thread overview]
Message-ID: <sashiko-outbox-218595@kernel.org> (raw)
In-Reply-To: <20261117101157.2520463-6-mic@digikod.net>

> Test the capability checks that commoncap makes from LSM hooks other
> than capable and that the previous commits make Landlock restrict:
> mapping below vm.mmap_min_addr (CAP_SYS_RAWIO) and adding inheritable
> capabilities outside of the permitted set (CAP_SETPCAP).
> 
> Each test first checks that the operation fails without the capability,
> so that it exercises the capability check, and then checks it with the
> capability effective in four variants: unsandboxed, in a domain that
> denies the capability, in a domain that allows it, and in a domain that
> does not handle capabilities.  The mmap_addr tests map the last page
> below vm.mmap_min_addr, and skip if the architecture rejects it before
> the mmap_addr hook (e.g. 32-bit ARM).
> 
> Audit tests check that these denials are logged, that the admin reserve
> check is not, and that allowed uses log nothing.  The admin reserve
> check has no functional test: it only has an effect with
> vm.overcommit_memory=2, a system-wide setting that a test cannot change
> without racing with other processes.
> 
> Add CAP_SETPCAP and CAP_SYS_RAWIO to the capabilities that the tests may
> raise, and drop the stale count from the comment of this list.
> 
> Without the mmap_addr and capset fixes, their denied variants and the
> denial audit test fail.
> 
> Cc: Günther Noack <gnoack@google.com>
> Cc: Paul Moore <paul@paul-moore.com>
> Cc: Serge Hallyn <serge@hallyn.com>
> Acked-by: Serge Hallyn (AMD) <sergeh@kernel.org>
> Signed-off-by: Mickaël Salaün <mic@digikod.net>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261117101157.2520463-1-mic@digikod.net?part=5


  reply	other threads:[~2026-11-17 10:20 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17 10:11 [PATCH v2 0/6] Fix Landlock mediation of commoncap's capability checks Mickaël Salaün
2026-11-17 10:11 ` [PATCH v2 1/6] landlock: Factor out capability denial checks Mickaël Salaün
2026-11-17 10:14   ` sashiko-bot
2026-11-17 13:56   ` Günther Noack
2026-11-17 10:11 ` [PATCH v2 2/6] landlock: Mediate CAP_SYS_RAWIO for mappings below mmap_min_addr Mickaël Salaün
2026-11-17 10:18   ` sashiko-bot
2026-11-17 14:23   ` Günther Noack
2026-11-17 10:11 ` [PATCH v2 3/6] landlock: Mediate CAP_SETPCAP for inheritable capabilities Mickaël Salaün
2026-11-17 10:17   ` sashiko-bot
2026-11-17 15:41   ` Günther Noack
2026-11-17 10:11 ` [PATCH v2 4/6] landlock: Mediate CAP_SYS_ADMIN for the admin memory reserve Mickaël Salaün
2026-11-17 10:16   ` sashiko-bot
2026-11-17 15:43   ` Günther Noack
2026-11-17 10:11 ` [PATCH v2 5/6] selftests/landlock: Test capability checks outside the capable hook Mickaël Salaün
2026-11-17 10:20   ` sashiko-bot [this message]
2026-11-17 16:11   ` Günther Noack
2026-11-17 10:11 ` [PATCH v2 6/6] landlock: Fix capability restriction documentation Mickaël Salaün
2026-11-17 10:17   ` sashiko-bot
2026-11-17 16:25   ` Günther Noack

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-218595@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.