diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2010-01-13 20:44:25 +0100 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2010-01-13 20:44:44 +0100 |
commit | c3311c13adc1021e986fef12609ceb395ffc5014 (patch) | |
tree | 089bc4527e9f032ad2dcd7feee4118020cb1dcce | |
parent | 7284ce6c9f6153d1777df5f310c959724d1bd446 (diff) | |
download | linux-c3311c13adc1021e986fef12609ceb395ffc5014.tar.gz linux-c3311c13adc1021e986fef12609ceb395ffc5014.tar.bz2 linux-c3311c13adc1021e986fef12609ceb395ffc5014.zip |
[S390] fix loading of PER control registers for utrace.
If the current task enables / disables PER tracing for itself the
PER control registers need to be loaded in FixPerRegisters.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r-- | arch/s390/kernel/ptrace.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c index 13815d39f7dd..7cf464234419 100644 --- a/arch/s390/kernel/ptrace.c +++ b/arch/s390/kernel/ptrace.c @@ -65,6 +65,7 @@ FixPerRegisters(struct task_struct *task) { struct pt_regs *regs; per_struct *per_info; + per_cr_words cr_words; regs = task_pt_regs(task); per_info = (per_struct *) &task->thread.per_info; @@ -98,6 +99,13 @@ FixPerRegisters(struct task_struct *task) per_info->control_regs.bits.storage_alt_space_ctl = 1; else per_info->control_regs.bits.storage_alt_space_ctl = 0; + + if (task == current) { + __ctl_store(cr_words, 9, 11); + if (memcmp(&cr_words, &per_info->control_regs.words, + sizeof(cr_words)) != 0) + __ctl_load(per_info->control_regs.words, 9, 11); + } } void user_enable_single_step(struct task_struct *task) |