Skip to content

Commit 261cd29

Browse files
Martin Schwidefskytorvalds
authored andcommitted
s390: remove task_show_regs
task_show_regs used to be a debugging aid in the early bringup days of Linux on s390. /proc/<pid>/status is a world readable file, it is not a good idea to show the registers of a process. The only correct fix is to remove task_show_regs. Reported-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 1abe3af commit 261cd29

3 files changed

Lines changed: 0 additions & 45 deletions

File tree

‎arch/s390/include/asm/processor.h‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,6 @@ extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
148148
*/
149149
extern unsigned long thread_saved_pc(struct task_struct *t);
150150

151-
/*
152-
* Print register of task into buffer. Used in fs/proc/array.c.
153-
*/
154-
extern void task_show_regs(struct seq_file *m, struct task_struct *task);
155-
156151
extern void show_code(struct pt_regs *regs);
157152

158153
unsigned long get_wchan(struct task_struct *p);

‎arch/s390/kernel/traps.c‎

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -237,43 +237,6 @@ void show_regs(struct pt_regs *regs)
237237
show_last_breaking_event(regs);
238238
}
239239

240-
/* This is called from fs/proc/array.c */
241-
void task_show_regs(struct seq_file *m, struct task_struct *task)
242-
{
243-
struct pt_regs *regs;
244-
245-
regs = task_pt_regs(task);
246-
seq_printf(m, "task: %p, ksp: %p\n",
247-
task, (void *)task->thread.ksp);
248-
seq_printf(m, "User PSW : %p %p\n",
249-
(void *) regs->psw.mask, (void *)regs->psw.addr);
250-
251-
seq_printf(m, "User GPRS: " FOURLONG,
252-
regs->gprs[0], regs->gprs[1],
253-
regs->gprs[2], regs->gprs[3]);
254-
seq_printf(m, " " FOURLONG,
255-
regs->gprs[4], regs->gprs[5],
256-
regs->gprs[6], regs->gprs[7]);
257-
seq_printf(m, " " FOURLONG,
258-
regs->gprs[8], regs->gprs[9],
259-
regs->gprs[10], regs->gprs[11]);
260-
seq_printf(m, " " FOURLONG,
261-
regs->gprs[12], regs->gprs[13],
262-
regs->gprs[14], regs->gprs[15]);
263-
seq_printf(m, "User ACRS: %08x %08x %08x %08x\n",
264-
task->thread.acrs[0], task->thread.acrs[1],
265-
task->thread.acrs[2], task->thread.acrs[3]);
266-
seq_printf(m, " %08x %08x %08x %08x\n",
267-
task->thread.acrs[4], task->thread.acrs[5],
268-
task->thread.acrs[6], task->thread.acrs[7]);
269-
seq_printf(m, " %08x %08x %08x %08x\n",
270-
task->thread.acrs[8], task->thread.acrs[9],
271-
task->thread.acrs[10], task->thread.acrs[11]);
272-
seq_printf(m, " %08x %08x %08x %08x\n",
273-
task->thread.acrs[12], task->thread.acrs[13],
274-
task->thread.acrs[14], task->thread.acrs[15]);
275-
}
276-
277240
static DEFINE_SPINLOCK(die_lock);
278241

279242
void die(const char * str, struct pt_regs * regs, long err)

‎fs/proc/array.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,9 +353,6 @@ int proc_pid_status(struct seq_file *m, struct pid_namespace *ns,
353353
task_cap(m, task);
354354
task_cpus_allowed(m, task);
355355
cpuset_task_status_allowed(m, task);
356-
#if defined(CONFIG_S390)
357-
task_show_regs(m, task);
358-
#endif
359356
task_context_switch_counts(m, task);
360357
return 0;
361358
}

0 commit comments

Comments
 (0)