diff options
author | Christian Borntraeger <borntraeger@de.ibm.com> | 2009-11-13 09:43:54 -0500 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2009-11-13 09:45:03 -0500 |
commit | bcc6525fb23d2cec7ffdf908d98826a66823bcb2 (patch) | |
tree | bf5bc71446c3ad861db386ca68e9221309f6ca8b /arch/s390 | |
parent | 8b94c1ed4d8232a452aa9db0f5ac9141d942590f (diff) |
[S390] s390: fix single stepping on svc0
On s390 there are two ways of specifying the system call number for
the svc instruction. The standard way is to use the immediate field
in the instruction (or to use EXecute for values unknown during
assemble time). This can encode 256 system calls.
The kernel ABI also allows to put the system call number in r1 and
then execute svc 0 to enable system call numbers > 255.
It turns out that single stepping svc 0 is broken, since the PER
program check handler uses r1. We have to use a different register.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/kernel/entry.S | 8 | ||||
-rw-r--r-- | arch/s390/kernel/entry64.S | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S index f43d2ee54464..48215d15762b 100644 --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S | |||
@@ -565,10 +565,10 @@ pgm_svcper: | |||
565 | lh %r7,0x8a # get svc number from lowcore | 565 | lh %r7,0x8a # get svc number from lowcore |
566 | l %r9,__LC_THREAD_INFO # load pointer to thread_info struct | 566 | l %r9,__LC_THREAD_INFO # load pointer to thread_info struct |
567 | TRACE_IRQS_OFF | 567 | TRACE_IRQS_OFF |
568 | l %r1,__TI_task(%r9) | 568 | l %r8,__TI_task(%r9) |
569 | mvc __THREAD_per+__PER_atmid(2,%r1),__LC_PER_ATMID | 569 | mvc __THREAD_per+__PER_atmid(2,%r8),__LC_PER_ATMID |
570 | mvc __THREAD_per+__PER_address(4,%r1),__LC_PER_ADDRESS | 570 | mvc __THREAD_per+__PER_address(4,%r8),__LC_PER_ADDRESS |
571 | mvc __THREAD_per+__PER_access_id(1,%r1),__LC_PER_ACCESS_ID | 571 | mvc __THREAD_per+__PER_access_id(1,%r8),__LC_PER_ACCESS_ID |
572 | oi __TI_flags+3(%r9),_TIF_SINGLE_STEP # set TIF_SINGLE_STEP | 572 | oi __TI_flags+3(%r9),_TIF_SINGLE_STEP # set TIF_SINGLE_STEP |
573 | TRACE_IRQS_ON | 573 | TRACE_IRQS_ON |
574 | stosm __SF_EMPTY(%r15),0x03 # reenable interrupts | 574 | stosm __SF_EMPTY(%r15),0x03 # reenable interrupts |
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index a6f7b20df616..9aff1d449b6e 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S | |||
@@ -543,10 +543,10 @@ pgm_svcper: | |||
543 | mvc __LC_LAST_UPDATE_TIMER(8),__LC_SYNC_ENTER_TIMER | 543 | mvc __LC_LAST_UPDATE_TIMER(8),__LC_SYNC_ENTER_TIMER |
544 | llgh %r7,__LC_SVC_INT_CODE # get svc number from lowcore | 544 | llgh %r7,__LC_SVC_INT_CODE # get svc number from lowcore |
545 | lg %r9,__LC_THREAD_INFO # load pointer to thread_info struct | 545 | lg %r9,__LC_THREAD_INFO # load pointer to thread_info struct |
546 | lg %r1,__TI_task(%r9) | 546 | lg %r8,__TI_task(%r9) |
547 | mvc __THREAD_per+__PER_atmid(2,%r1),__LC_PER_ATMID | 547 | mvc __THREAD_per+__PER_atmid(2,%r8),__LC_PER_ATMID |
548 | mvc __THREAD_per+__PER_address(8,%r1),__LC_PER_ADDRESS | 548 | mvc __THREAD_per+__PER_address(8,%r8),__LC_PER_ADDRESS |
549 | mvc __THREAD_per+__PER_access_id(1,%r1),__LC_PER_ACCESS_ID | 549 | mvc __THREAD_per+__PER_access_id(1,%r8),__LC_PER_ACCESS_ID |
550 | oi __TI_flags+7(%r9),_TIF_SINGLE_STEP # set TIF_SINGLE_STEP | 550 | oi __TI_flags+7(%r9),_TIF_SINGLE_STEP # set TIF_SINGLE_STEP |
551 | TRACE_IRQS_ON | 551 | TRACE_IRQS_ON |
552 | stosm __SF_EMPTY(%r15),0x03 # reenable interrupts | 552 | stosm __SF_EMPTY(%r15),0x03 # reenable interrupts |