public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/1] x86/pti: Fix kernel warnings for pti= and nopti cmdline options.
@ 2023-08-12 15:54 Jo Van Bulck
  2023-08-12 15:54 ` [PATCH 1/1] " Jo Van Bulck
  2023-08-14 20:43 ` [PATCH v2 0/1] " Sohil Mehta
  0 siblings, 2 replies; 13+ messages in thread
From: Jo Van Bulck @ 2023-08-12 15:54 UTC (permalink / raw)
  To: linux-kernel, dave.hansen, luto, peterz, mingo, sohil.mehta
  Cc: x86, bp, tglx, hpa, Jo Van Bulck

Hi,

This is the third 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
---------

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 | 55 ++++++++++++++++++++++++-----------------------
 1 file changed, 28 insertions(+), 27 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 13+ messages in thread
* [PATCH v2 0/1] x86/pti: Fix kernel warnings for pti= and nopti cmdline
@ 2023-08-11 21:36 Jo Van Bulck
  2023-08-11 21:36 ` [PATCH 1/1] x86/pti: Fix kernel warnings for pti= and nopti cmdline options Jo Van Bulck
  0 siblings, 1 reply; 13+ messages in thread
From: Jo Van Bulck @ 2023-08-11 21:36 UTC (permalink / raw)
  To: linux-kernel, dave.hansen, luto, peterz, mingo, sohil.mehta
  Cc: x86, bp, tglx, hpa, Jo Van Bulck

Hi,

This is the second iteration of a patch to improve the cmdline option parsing
for PTI.

Changelog
---------

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 | 59 +++++++++++++++++++++++++++--------------------
 1 file changed, 34 insertions(+), 25 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-08-19  8:04 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-12 15:54 [PATCH v2 0/1] x86/pti: Fix kernel warnings for pti= and nopti cmdline options Jo Van Bulck
2023-08-12 15:54 ` [PATCH 1/1] " Jo Van Bulck
2023-08-14 21:12   ` Sohil Mehta
2023-08-18 22:33     ` Jo Van Bulck
2023-08-14 20:43 ` [PATCH v2 0/1] " Sohil Mehta
2023-08-18 22:34   ` Jo Van Bulck
  -- strict thread matches above, loose matches on Subject: below --
2023-08-11 21:36 [PATCH v2 0/1] x86/pti: Fix kernel warnings for pti= and nopti cmdline Jo Van Bulck
2023-08-11 21:36 ` [PATCH 1/1] x86/pti: Fix kernel warnings for pti= and nopti cmdline options Jo Van Bulck
2023-08-11 23:27   ` Jo Van Bulck
2023-08-11 23:42     ` Dave Hansen
2023-08-11 23:58       ` Sohil Mehta
2023-08-12  0:08         ` Dave Hansen
2023-08-12  0:15           ` Sohil Mehta
2023-08-12 15:53           ` Jo Van Bulck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox