]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
powerpc/xmon: add read-only mode
authorChristopher M. Riedl <cmr@informatik.wtf>
Tue, 16 Apr 2019 03:26:38 +0000 (22:26 -0500)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 2 May 2019 16:54:57 +0000 (02:54 +1000)
commit0acb5f64560a052fd66ab37b212a72964847160f
tree51ab809e5bc5f343e540f4496d2c7af8a60e9847
parent5d085ec04a000fefb5182d3b03ee46ca96d8389b
powerpc/xmon: add read-only mode

Operations which write to memory and special purpose registers should be
restricted on systems with integrity guarantees (such as Secure Boot)
and, optionally, to avoid self-destructive behaviors.

Add a config option, XMON_DEFAULT_RO_MODE, to set default xmon behavior.
The kernel cmdline options xmon=ro and xmon=rw override this default.

The following xmon operations are affected:
memops:
disable memmove
disable memset
disable memzcan
memex:
no-op'd mwrite
super_regs:
no-op'd write_spr
bpt_cmds:
disable
proc_call:
disable

Signed-off-by: Christopher M. Riedl <cmr@informatik.wtf>
Reviewed-by: Oliver O'Halloran <oohall@gmail.com>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/Kconfig.debug
arch/powerpc/xmon/xmon.c