Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 99c63ba2 authored by Christopher M. Riedl's avatar Christopher M. Riedl Committed by Greg Kroah-Hartman
Browse files

powerpc/xmon: Restrict when kernel is locked down



[ Upstream commit 69393cb03ccdf29f3b452d3482ef918469d1c098 ]

Xmon should be either fully or partially disabled depending on the
kernel lockdown state.

Put xmon into read-only mode for lockdown=integrity and prevent user
entry into xmon when lockdown=confidentiality. Xmon checks the lockdown
state on every attempted entry:

 (1) during early xmon'ing

 (2) when triggered via sysrq

 (3) when toggled via debugfs

 (4) when triggered via a previously enabled breakpoint

The following lockdown state transitions are handled:

 (1) lockdown=none -> lockdown=integrity
     set xmon read-only mode

 (2) lockdown=none -> lockdown=confidentiality
     clear all breakpoints, set xmon read-only mode,
     prevent user re-entry into xmon

 (3) lockdown=integrity -> lockdown=confidentiality
     clear all breakpoints, set xmon read-only mode,
     prevent user re-entry into xmon

Suggested-by: default avatarAndrew Donnellan <ajd@linux.ibm.com>
Signed-off-by: default avatarChristopher M. Riedl <cmr@informatik.wtf>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20190907061124.1947-3-cmr@informatik.wtf


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent f2adfe12
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment