Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 35654
b: refs/heads/master
c: 9932532
h: refs/heads/master
v: v3
  • Loading branch information
Chuck Ebbert authored and Linus Torvalds committed Sep 26, 2006
1 parent 25573f1 commit 77a3a63
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1447c27d38faf8fb03d4599e8082e507453ea3cf
refs/heads/master: 99325326a57b6a56595bb097655bee9fd27d77b0
11 changes: 8 additions & 3 deletions trunk/arch/i386/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,16 +313,21 @@ void show_registers(struct pt_regs *regs)
*/
if (in_kernel) {
u8 __user *eip;
int code_bytes = 64;
unsigned char c;

printk("\n" KERN_EMERG "Stack: ");
show_stack_log_lvl(NULL, regs, (unsigned long *)esp, KERN_EMERG);

printk(KERN_EMERG "Code: ");

eip = (u8 __user *)regs->eip - 43;
for (i = 0; i < 64; i++, eip++) {
unsigned char c;

if (eip < (u8 __user *)PAGE_OFFSET || __get_user(c, eip)) {
/* try starting at EIP */
eip = (u8 __user *)regs->eip;
code_bytes = 32;
}
for (i = 0; i < code_bytes; i++, eip++) {
if (eip < (u8 __user *)PAGE_OFFSET || __get_user(c, eip)) {
printk(" Bad EIP value.");
break;
Expand Down

0 comments on commit 77a3a63

Please sign in to comment.