From: "Mickaël Salaün" <mic@digikod.net>
To: "Günther Noack" <gnoack@google.com>
Cc: "Mickaël Salaün" <mic@digikod.net>,
"Christian Brauner" <brauner@kernel.org>,
"Eric Paris" <eparis@redhat.com>,
"Masami Hiramatsu" <mhiramat@kernel.org>,
"Mathieu Desnoyers" <mathieu.desnoyers@efficios.com>,
"Paul Moore" <paul@paul-moore.com>,
"Steven Rostedt" <rostedt@goodmis.org>,
audit@vger.kernel.org, linux-security-module@vger.kernel.org,
linux-trace-kernel@vger.kernel.org
Subject: [PATCH 3/4] selftests/landlock: Test namespace denial operations
Date: Tue, 17 Nov 2026 11:21:06 +0100 [thread overview]
Message-ID: <20261117102110.2524197-4-mic@digikod.net> (raw)
In-Reply-To: <20261117102110.2524197-1-mic@digikod.net>
The namespace trace tests cover creation and entry denials, but only
creation exercises the quiet path. This leaves the new ENTER request
tag untested through quiet selection and trace dispatch when audit
logging is suppressed.
Add the missing quiet setns(2) case. Together with the existing cases,
this exercises all four combinations of CREATE and ENTER with logged and
quieted denials, including each exact namespace_op value.
Cc: Günther Noack <gnoack@google.com>
Signed-off-by: Mickaël Salaün <mic@digikod.net>
---
tools/testing/selftests/landlock/ns_test.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tools/testing/selftests/landlock/ns_test.c b/tools/testing/selftests/landlock/ns_test.c
index d4a85cbebeae..52206ad94eca 100644
--- a/tools/testing/selftests/landlock/ns_test.c
+++ b/tools/testing/selftests/landlock/ns_test.c
@@ -2575,6 +2575,13 @@ TEST_F(ns_trace, deny_setns)
test_ns_trace_denial(_metadata, true, false);
}
+TEST_F(ns_trace, deny_setns_quiet)
+{
+ if (!self->tracefs_ok)
+ SKIP(return, "tracefs not available");
+ test_ns_trace_denial(_metadata, true, true);
+}
+
/* clang-format off */
FIXTURE(ns_proc_open) {
/* clang-format on */
--
2.56.0
next prev parent reply other threads:[~2026-11-17 10:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 10:21 [PATCH 0/4] Landlock: Fix namespace and capability denials Mickaël Salaün
2026-11-17 10:21 ` [PATCH 1/4] landlock: Distinguish namespace creation and entry denials Mickaël Salaün
2026-11-17 10:29 ` sashiko-bot
2026-11-17 10:21 ` [PATCH 2/4] landlock: Add capability objects to denial tracing Mickaël Salaün
2026-11-17 10:27 ` sashiko-bot
2026-11-17 10:21 ` Mickaël Salaün [this message]
2026-11-17 10:24 ` [PATCH 3/4] selftests/landlock: Test namespace denial operations sashiko-bot
2026-11-17 10:21 ` [PATCH 4/4] landlock: Document " Mickaël Salaün
2026-11-17 10:24 ` sashiko-bot
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=20261117102110.2524197-4-mic@digikod.net \
--to=mic@digikod.net \
--cc=audit@vger.kernel.org \
--cc=brauner@kernel.org \
--cc=eparis@redhat.com \
--cc=gnoack@google.com \
--cc=linux-security-module@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=paul@paul-moore.com \
--cc=rostedt@goodmis.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox