summaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2006-10-13 12:17:16 +1000
committerPaul Mackerras <paulus@samba.org>2006-10-16 15:53:30 +1000
commit00ae36de49cc718d4122e1c8aac96fd1a5a2553c (patch)
tree42cfa3ddd7fb403fb9e03848eb3e7c4bc5050185 /arch/powerpc
parent99f48610252b736908fa5bdea505a480368308d6 (diff)
downloadop-kernel-dev-00ae36de49cc718d4122e1c8aac96fd1a5a2553c.zip
op-kernel-dev-00ae36de49cc718d4122e1c8aac96fd1a5a2553c.tar.gz
[POWERPC] Better check in show_instructions
Instead of just checking that an address is in the right range, use the provided __kernel_text_address() helper which covers both the kernel and module text sections. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kernel/process.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 7b2f645..f3d4dd5 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -341,13 +341,6 @@ struct task_struct *__switch_to(struct task_struct *prev,
static int instructions_to_print = 16;
-#ifdef CONFIG_PPC64
-#define BAD_PC(pc) ((REGION_ID(pc) != KERNEL_REGION_ID) && \
- (REGION_ID(pc) != VMALLOC_REGION_ID))
-#else
-#define BAD_PC(pc) ((pc) < KERNELBASE)
-#endif
-
static void show_instructions(struct pt_regs *regs)
{
int i;
@@ -366,7 +359,8 @@ static void show_instructions(struct pt_regs *regs)
* bad address because the pc *should* only be a
* kernel address.
*/
- if (BAD_PC(pc) || __get_user(instr, (unsigned int __user *)pc)) {
+ if (!__kernel_text_address(pc) ||
+ __get_user(instr, (unsigned int __user *)pc)) {
printk("XXXXXXXX ");
} else {
if (regs->nip == pc)
OpenPOWER on IntegriCloud