aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2011-02-15 09:43:32 +0100
committerWilly Tarreau <w@1wt.eu>2012-04-09 14:29:45 +0200
commit12013f28feb76d142d78730e928af2436c5df9b9 (patch)
treef7e88fd0c8084f8fc92e0983b076a02822344ac9
parent0271393ea48eb1b7f5ac0309683c50dd98cd6ab9 (diff)
downloadlinux-2.4-12013f28feb76d142d78730e928af2436c5df9b9.tar.gz
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> Signed-off-by: Willy Tarreau <w@1wt.eu>
-rw-r--r--arch/s390/kernel/traps.c38
-rw-r--r--arch/s390x/kernel/traps.c38
-rw-r--r--fs/proc/array.c3
-rw-r--r--include/asm-s390/ptrace.h1
-rw-r--r--include/asm-s390x/ptrace.h1
5 files changed, 0 insertions, 81 deletions
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c
index 16d765455189e5..995000568f7c69 100644
--- a/arch/s390/kernel/traps.c
+++ b/arch/s390/kernel/traps.c
@@ -220,44 +220,6 @@ void show_registers(struct pt_regs *regs)
printk("\n");
}
-/* This is called from fs/proc/array.c */
-char *task_show_regs(struct task_struct *task, char *buffer)
-{
- struct pt_regs *regs;
-
- regs = __KSTK_PTREGS(task);
- buffer += sprintf(buffer, "task: %08lx, ksp: %08x\n",
- (unsigned long) task, task->thread.ksp);
- buffer += sprintf(buffer, "User PSW : %08lx %08lx\n",
- (unsigned long) regs->psw.mask,
- (unsigned long) regs->psw.addr);
- buffer += sprintf(buffer, "User GPRS: %08x %08x %08x %08x\n",
- regs->gprs[0], regs->gprs[1],
- regs->gprs[2], regs->gprs[3]);
- buffer += sprintf(buffer, " %08x %08x %08x %08x\n",
- regs->gprs[4], regs->gprs[5],
- regs->gprs[6], regs->gprs[7]);
- buffer += sprintf(buffer, " %08x %08x %08x %08x\n",
- regs->gprs[8], regs->gprs[9],
- regs->gprs[10], regs->gprs[11]);
- buffer += sprintf(buffer, " %08x %08x %08x %08x\n",
- regs->gprs[12], regs->gprs[13],
- regs->gprs[14], regs->gprs[15]);
- buffer += sprintf(buffer, "User ACRS: %08x %08x %08x %08x\n",
- regs->acrs[0], regs->acrs[1],
- regs->acrs[2], regs->acrs[3]);
- buffer += sprintf(buffer, " %08x %08x %08x %08x\n",
- regs->acrs[4], regs->acrs[5],
- regs->acrs[6], regs->acrs[7]);
- buffer += sprintf(buffer, " %08x %08x %08x %08x\n",
- regs->acrs[8], regs->acrs[9],
- regs->acrs[10], regs->acrs[11]);
- buffer += sprintf(buffer, " %08x %08x %08x %08x\n",
- regs->acrs[12], regs->acrs[13],
- regs->acrs[14], regs->acrs[15]);
- return buffer;
-}
-
spinlock_t die_lock = SPIN_LOCK_UNLOCKED;
void die(const char * str, struct pt_regs * regs, long err)
diff --git a/arch/s390x/kernel/traps.c b/arch/s390x/kernel/traps.c
index da5f64b9564ce8..d1cf86f399fa89 100644
--- a/arch/s390x/kernel/traps.c
+++ b/arch/s390x/kernel/traps.c
@@ -222,44 +222,6 @@ void show_registers(struct pt_regs *regs)
printk("\n");
}
-/* This is called from fs/proc/array.c */
-char *task_show_regs(struct task_struct *task, char *buf)
-{
- struct pt_regs *regs;
-
- regs = __KSTK_PTREGS(task);
- buf += sprintf(buf, "task: %016lx, ksp: %016lx\n",
- (unsigned long) task, task->thread.ksp);
- buf += sprintf(buf, "User PSW : %016lx %016lx\n",
- (unsigned long) regs->psw.mask,
- (unsigned long) regs->psw.addr);
- buf += sprintf(buf, "User GPRS: %016lx %016lx %016lx %016lx\n",
- regs->gprs[0], regs->gprs[1],
- regs->gprs[2], regs->gprs[3]);
- buf += sprintf(buf, " %016lx %016lx %016lx %016lx\n",
- regs->gprs[4], regs->gprs[5],
- regs->gprs[6], regs->gprs[7]);
- buf += sprintf(buf, " %016lx %016lx %016lx %016lx\n",
- regs->gprs[8], regs->gprs[9],
- regs->gprs[10], regs->gprs[11]);
- buf += sprintf(buf, " %016lx %016lx %016lx %016lx\n",
- regs->gprs[12], regs->gprs[13],
- regs->gprs[14], regs->gprs[15]);
- buf += sprintf(buf, "User ACRS: %08x %08x %08x %08x\n",
- regs->acrs[0], regs->acrs[1],
- regs->acrs[2], regs->acrs[3]);
- buf += sprintf(buf, " %08x %08x %08x %08x\n",
- regs->acrs[4], regs->acrs[5],
- regs->acrs[6], regs->acrs[7]);
- buf += sprintf(buf, " %08x %08x %08x %08x\n",
- regs->acrs[8], regs->acrs[9],
- regs->acrs[10], regs->acrs[11]);
- buf += sprintf(buf, " %08x %08x %08x %08x\n",
- regs->acrs[12], regs->acrs[13],
- regs->acrs[14], regs->acrs[15]);
- return buf;
-}
-
spinlock_t die_lock = SPIN_LOCK_UNLOCKED;
void die(const char * str, struct pt_regs * regs, long err)
diff --git a/fs/proc/array.c b/fs/proc/array.c
index 335226246dcafa..f0f2dc9d9bcece 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -295,9 +295,6 @@ int proc_pid_status(struct task_struct *task, char * buffer)
}
buffer = task_sig(task, buffer);
buffer = task_cap(task, buffer);
-#if defined(CONFIG_ARCH_S390)
- buffer = task_show_regs(task, buffer);
-#endif
return buffer - orig;
}
diff --git a/include/asm-s390/ptrace.h b/include/asm-s390/ptrace.h
index 046db2f1a90ac0..c69e9dc58b3b87 100644
--- a/include/asm-s390/ptrace.h
+++ b/include/asm-s390/ptrace.h
@@ -326,7 +326,6 @@ struct user_regs_struct
#define user_mode(regs) (((regs)->psw.mask & PSW_PROBLEM_STATE) != 0)
#define instruction_pointer(regs) ((regs)->psw.addr)
extern void show_regs(struct pt_regs * regs);
-extern char *task_show_regs(struct task_struct *task, char *buffer);
#endif
#endif /* __ASSEMBLY__ */
diff --git a/include/asm-s390x/ptrace.h b/include/asm-s390x/ptrace.h
index dc00d2941c3929..85e3c822f82ff9 100644
--- a/include/asm-s390x/ptrace.h
+++ b/include/asm-s390x/ptrace.h
@@ -308,7 +308,6 @@ struct user_regs_struct
#define user_mode(regs) (((regs)->psw.mask & PSW_PROBLEM_STATE) != 0)
#define instruction_pointer(regs) ((regs)->psw.addr)
extern void show_regs(struct pt_regs * regs);
-extern char *task_show_regs(struct task_struct *task, char *buffer);
#endif
#endif /* __ASSEMBLY__ */