From: "Rahul Sandhu" <nvraxn@gmail.com>
To: <selinux@vger.kernel.org>
Subject: Possibly re-expose the enforcing kernel cmdline parameter
Date: Wed, 30 Jul 2025 17:10:54 +0100 [thread overview]
Message-ID: <DBPIRUM77DL6.AEMZQHEO7W71@gmail.com> (raw)
Hi,
This is more of a question for the kernel guys. Currently, libselinux
also checks the enforcing kernel cmdline parameter by *mounting /proc*.
This is... not ideal; granted many situations in early boot where the
policy is loaded with selinux_init_load_policy (3) will require /proc
mounted later for things like getcon to work (given they use the /proc
api), however I don't really think this is ideal at all, especially as
often the thing loading the policy is init. Would it be possible to
reexpose the enforcing kernel cmdline parameter as part of PID 1's env?
I think would be cleaner, however I'm not sure if this goes against the
kernel's policy for anything or isn't feasible for some reason.
If this seems both reasonable and feasible, I'd be happy to send over a
patch.
Best Regards,
Rahul
next reply other threads:[~2025-07-30 16:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-30 16:10 Rahul Sandhu [this message]
2025-07-30 16:14 ` Possibly re-expose the enforcing kernel cmdline parameter Rahul Sandhu
2025-07-30 16:26 ` Stephen Smalley
2025-07-30 16:28 ` Rahul Sandhu
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=DBPIRUM77DL6.AEMZQHEO7W71@gmail.com \
--to=nvraxn@gmail.com \
--cc=selinux@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).