From: Jo Van Bulck <jo.vanbulck@cs.kuleuven.be>
To: linux-kernel@vger.kernel.org, dave.hansen@linux.intel.com,
luto@kernel.org, peterz@infradead.org, mingo@redhat.com,
sohil.mehta@intel.com
Cc: x86@kernel.org, bp@alien8.de, tglx@linutronix.de, hpa@zytor.com,
Jo Van Bulck <jo.vanbulck@cs.kuleuven.be>
Subject: [PATCH v4 0/1] x86/pti: Fix kernel warnings for pti= and nopti cmdline options.
Date: Sat, 19 Aug 2023 10:09:20 +0200 [thread overview]
Message-ID: <20230819080921.5324-1-jo.vanbulck@cs.kuleuven.be> (raw)
Hi,
This is the fourth iteration of a patch to improve the cmdline option parsing
for PTI. This reverts largely back to the first iteration and cleans up the
code to remove any attempts at backwards compatible behavior for clearly
conflicting options when users erroneously combine pti= nopti and
mitigations=off as per Dave's suggestions [1].
[1] https://lore.kernel.org/all/b9bbb279-fa8f-0784-900f-114ce186cbb3@intel.com/
Behavior
--------
For reference, behavior with this patch is now as follows in case of any
conflicting options.
1. Latest in order of nopti pti= takes priority:
KERNEL_CMDLINE="nopti pti=on"
[ 0.021779] Kernel/User page tables isolation: enabled
Mitigation: PTI
KERNEL_CMDLINE="pti=on nopti"
[ 0.010289] Kernel/User page tables isolation: disabled on command line.
Vulnerable
2. Passing mitigations=off will unconditionally disable PTI:
KERNEL_CMDLINE="mitigations=off pti=on"
[ 0.008331] Kernel/User page tables isolation: disabled on command line.
Vulnerable
KERNEL_CMDLINE="pti=on mitigations=off"
[ 0.008495] Kernel/User page tables isolation: disabled on command line.
Vulnerable
Changelog
---------
v4
- Add whitespace (Sohil)
- Remove goto (Sohil)
v3
- Revert backwards compatibility ugliness for conflicting options (Dave)
v2
- Split pti=off and mitigations=off checks (Sohil)
- Ensure backwards compatibility for conflicting options (Sohil)
Best,
Jo
Jo Van Bulck (1):
x86/pti: Fix kernel warnings for pti= and nopti cmdline options
arch/x86/mm/pti.c | 58 +++++++++++++++++++++++------------------------
1 file changed, 29 insertions(+), 29 deletions(-)
--
2.25.1
next reply other threads:[~2023-08-19 8:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-19 8:09 Jo Van Bulck [this message]
2023-08-19 8:09 ` [PATCH v4 1/1] " Jo Van Bulck
2023-09-15 12:11 ` [tip: x86/bugs] " tip-bot2 for Jo Van Bulck
2023-09-19 9:53 ` tip-bot2 for Jo Van Bulck
2023-09-23 12:20 ` tip-bot2 for Jo Van Bulck
2023-10-20 11:37 ` tip-bot2 for Jo Van Bulck
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=20230819080921.5324-1-jo.vanbulck@cs.kuleuven.be \
--to=jo.vanbulck@cs.kuleuven.be \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=sohil.mehta@intel.com \
--cc=tglx@linutronix.de \
--cc=x86@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
all inboxes | Powered by JetHome®