aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2010-01-13 14:44:25 -0500
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2010-01-13 14:44:44 -0500
commitc3311c13adc1021e986fef12609ceb395ffc5014 (patch)
tree089bc4527e9f032ad2dcd7feee4118020cb1dcce /arch/s390/kernel
parent7284ce6c9f6153d1777df5f310c959724d1bd446 (diff)
[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>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r--arch/s390/kernel/ptrace.c8
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)
65{ 65{
66 struct pt_regs *regs; 66 struct pt_regs *regs;
67 per_struct *per_info; 67 per_struct *per_info;
68 per_cr_words cr_words;
68 69
69 regs = task_pt_regs(task); 70 regs = task_pt_regs(task);
70 per_info = (per_struct *) &task->thread.per_info; 71 per_info = (per_struct *) &task->thread.per_info;
@@ -98,6 +99,13 @@ FixPerRegisters(struct task_struct *task)
98 per_info->control_regs.bits.storage_alt_space_ctl = 1; 99 per_info->control_regs.bits.storage_alt_space_ctl = 1;
99 else 100 else
100 per_info->control_regs.bits.storage_alt_space_ctl = 0; 101 per_info->control_regs.bits.storage_alt_space_ctl = 0;
102
103 if (task == current) {
104 __ctl_store(cr_words, 9, 11);
105 if (memcmp(&cr_words, &per_info->control_regs.words,
106 sizeof(cr_words)) != 0)
107 __ctl_load(per_info->control_regs.words, 9, 11);
108 }
101} 109}
102 110
103void user_enable_single_step(struct task_struct *task) 111void user_enable_single_step(struct task_struct *task)