summaryrefslogtreecommitdiff
path: root/security/yama
diff options
context:
space:
mode:
authorSimon Guo <wei.guo.simon@gmail.com>2018-05-23 10:02:01 +0300
committerPaul Mackerras <paulus@ozlabs.org>2018-06-01 03:30:10 +0300
commit5706340a339283fe60d55ddc72ee7728a571a834 (patch)
tree2f5c12185399ad0671cdb3baa0ca4360712aa0ab /security/yama
parent533082ae86e2f1ff6cb9eca7a25202a81fc0567e (diff)
downloadlinux-5706340a339283fe60d55ddc72ee7728a571a834.tar.xz
KVM: PPC: Book3S PR: Always fail transactions in guest privileged state
Currently the kernel doesn't use transaction memory. And there is an issue for privileged state in the guest that: tbegin/tsuspend/tresume/tabort TM instructions can impact MSR TM bits without trapping into the PR host. So following code will lead to a false mfmsr result: tbegin <- MSR bits update to Transaction active. beq <- failover handler branch mfmsr <- still read MSR bits from magic page with transaction inactive. It is not an issue for non-privileged guest state since its mfmsr is not patched with magic page and will always trap into the PR host. This patch will always fail tbegin attempt for privileged state in the guest, so that the above issue is prevented. It is benign since currently (guest) kernel doesn't initiate a transaction. Test case: https://github.com/justdoitqd/publicFiles/blob/master/test_tbegin_pr.c Signed-off-by: Simon Guo <wei.guo.simon@gmail.com> Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Diffstat (limited to 'security/yama')
0 files changed, 0 insertions, 0 deletions