diff options
author | Laurent Dufour <ldufour@linux.ibm.com> | 2021-03-05 13:55:54 +0100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2021-03-26 23:19:41 +1100 |
commit | 6ce56e1ac380eaa088d3f4c01446e15e195bd541 (patch) | |
tree | 1d67aae2085da9a6b6e0e88c264a782957d43273 /arch/powerpc/lib/code-patching.c | |
parent | 90cbac0e995dd92f7bcf82f74aa50250bf194a4a (diff) | |
download | linux-6ce56e1ac380eaa088d3f4c01446e15e195bd541.tar.gz linux-6ce56e1ac380eaa088d3f4c01446e15e195bd541.tar.bz2 linux-6ce56e1ac380eaa088d3f4c01446e15e195bd541.zip |
powerpc/pseries: export LPAR security flavor in lparcfg
This is helpful to read the security flavor from inside the LPAR.
In /sys/kernel/debug/powerpc/security_features it can be seen if
mitigations are on or off but not the level set through the ASMI menu.
Furthermore, reporting it through /proc/powerpc/lparcfg allows an easy
processing by the lparstat command [1].
Export it like this in /proc/powerpc/lparcfg:
$ grep security_flavor /proc/powerpc/lparcfg
security_flavor=1
Value follows what is documented on the IBM support page [2]:
0 Speculative execution fully enabled
1 Speculative execution controls to mitigate user-to-kernel attacks
2 Speculative execution controls to mitigate user-to-kernel and
user-to-user side-channel attacks
[1] https://groups.google.com/g/powerpc-utils-devel/c/NaKXvdyl_UI/m/wa2stpIDAQAJ
[2] https://www.ibm.com/support/pages/node/715841
Signed-off-by: Laurent Dufour <ldufour@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210305125554.5165-1-ldufour@linux.ibm.com
Diffstat (limited to 'arch/powerpc/lib/code-patching.c')
0 files changed, 0 insertions, 0 deletions