Skip to content

Commit 0738d39

Browse files
author
Vasily Gorbik
committed
s390/entry: Scrub r12 register on kernel entry
Before commit f33f2d4 ("s390/bp: remove TIF_ISOLATE_BP"), all entry handlers loaded r12 with the current task pointer (lg %r12,__LC_CURRENT) for use by the BPENTER/BPEXIT macros. That commit removed TIF_ISOLATE_BP, dropping both the branch prediction macros and the r12 load, but did not add r12 to the register clearing sequence. Add the missing xgr %r12,%r12 to make the register scrub consistent across all entry points. Fixes: f33f2d4 ("s390/bp: remove TIF_ISOLATE_BP") Cc: [email protected] Reviewed-by: Ilya Leoshkevich <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
1 parent 48b8814 commit 0738d39

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

arch/s390/kernel/entry.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ SYM_CODE_START(system_call)
271271
xgr %r9,%r9
272272
xgr %r10,%r10
273273
xgr %r11,%r11
274+
xgr %r12,%r12
274275
la %r2,STACK_FRAME_OVERHEAD(%r15) # pointer to pt_regs
275276
mvc __PT_R8(64,%r2),__LC_SAVE_AREA(%r13)
276277
MBEAR %r2,%r13
@@ -407,6 +408,7 @@ SYM_CODE_START(\name)
407408
xgr %r6,%r6
408409
xgr %r7,%r7
409410
xgr %r10,%r10
411+
xgr %r12,%r12
410412
xc __PT_FLAGS(8,%r11),__PT_FLAGS(%r11)
411413
mvc __PT_R8(64,%r11),__LC_SAVE_AREA(%r13)
412414
MBEAR %r11,%r13
@@ -496,6 +498,7 @@ SYM_CODE_START(mcck_int_handler)
496498
xgr %r6,%r6
497499
xgr %r7,%r7
498500
xgr %r10,%r10
501+
xgr %r12,%r12
499502
stmg %r8,%r9,__PT_PSW(%r11)
500503
xc __PT_FLAGS(8,%r11),__PT_FLAGS(%r11)
501504
xc __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15)

0 commit comments

Comments
 (0)