]> git.baikalelectronics.ru Git - kernel.git/commit
s390/mcck: isolate SIE instruction when setting CIF_MCCK_GUEST flag
authorAlexander Gordeev <agordeev@linux.ibm.com>
Mon, 23 May 2022 10:38:14 +0000 (12:38 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Wed, 1 Jun 2022 10:03:16 +0000 (12:03 +0200)
commit2e3f66793896d51dd879155a7bebcb88ec04698b
tree317746bcb0adf1e3bf3ff60c105644e7d21544fb
parent7ceba5fa190787d363864a3d43e434bd636b79c6
s390/mcck: isolate SIE instruction when setting CIF_MCCK_GUEST flag

Commit 6f4ff75bd0af ("s390: add options to change branch prediction
behaviour for the kernel") introduced .Lsie_exit label - supposedly
to fence off SIE instruction. However, the corresponding address
range length .Lsie_crit_mcck_length was not updated, which led to
BPON code potentionally marked with CIF_MCCK_GUEST flag.

Both .Lsie_exit and .Lsie_crit_mcck_length were removed with commit
02ea41696b8d ("s390: remove critical section cleanup from entry.S"),
but the issue persisted - currently BPOFF and BPENTER macros might
get wrongly considered by the machine check handler as a guest.

Fixes: 6f4ff75bd0af ("s390: add options to change branch prediction behaviour for the kernel")
Reviewed-by: Sven Schnelle <svens@linux.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/kernel/entry.S