Skip to content

Restrict xmon when kernel is locked down

Christopher M. Riedl kernel-hardening linuxppc-dev 7 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest2 patches 2 repliesIn review
  2. v62 patches 0 repliesSuperseded
  3. v52 patches 4 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v4 RFC2 patches1 replySuperseded
v3 RFC1 patch1 replySuperseded
v2 RFC1 patch6 repliesSuperseded
v1 RFC1 patch0 repliesSuperseded

Changes in v7 from the cover letter

- Add lockdown check in sysrq-trigger to prevent entry into xmon_core
- Add lockdown check during init xmon setup for the case when booting with compile-time or cmdline lockdown=confidentialiaty

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2powerpc/xmon: Allow listing and clearing breakpoints in read-only modearch/powerpc/xmon/xmon.c+11 -51 reply
2/2powerpc/xmon: Restrict when kernel is locked downarch/powerpc/xmon/xmon.c include/linux/security.h security/lockdown/lockdown.c+86 -210 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchDaniel Axtens
1/2T-b R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v7 thread

Cover letter [PATCH v7 0/2] Restrict xmon when kernel is locked down

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

Put xmon into read-only mode for lockdown=integrity and completely disable xmon when lockdown=confidentiality. Since this can occur dynamically, there may be pre-existing, active breakpoints in xmon when transitioning into read-only mode. These breakpoints will still trigger, so allow them to be listed and cleared using xmon.

Changes since v6:
- Add lockdown check in sysrq-trigger to prevent entry into xmon_core
- Add lockdown check during init xmon setup for the case when booting with compile-time or cmdline lockdown=confidentialiaty

Changes since v5:
- Do not spam print messages when attempting to enter xmon when lockdown=confidentiality

Changes since v4:
- Move lockdown state checks into xmon_core
- Allow clearing of breakpoints in xmon read-only mode
- Test simple scenarios (combinations of xmon and lockdown cmdline options, setting breakpoints and changing lockdown state, etc) in QEMU and on an actual POWER8 VM
- Rebase onto security/next-lockdown b602614a81078bf29c82b2671bb96a63488f68d6

Changes since v3:
- Allow active breakpoints to be shown/listed in read-only mode

Changes since v2:
- Rebased onto v36 of https://patchwork.kernel.org/cover/11049461/
(based on: f632a8170a6b667ee4e3f552087588f0fe13c4bb)
- Do not clear existing breakpoints when transitioning from lockdown=none to lockdown=integrity
- Remove line continuation and dangling quote (confuses checkpatch.pl) from the xmon command help/usage string

Christopher M. Riedl (2):
powerpc/xmon: Allow listing and clearing breakpoints in read-only mode powerpc/xmon: Restrict when kernel is locked down

 arch/powerpc/xmon/xmon.c     | 119 +++++++++++++++++++++++++++--------
 include/linux/security.h     |   2 +
 security/lockdown/lockdown.c |   2 +
 3 files changed, 97 insertions(+), 26 deletions(-)
Signature · 1 line
2.23.0