diff options
-rw-r--r-- | Documentation/admin-guide/kernel-parameters.txt | 5 | ||||
-rw-r--r-- | arch/x86/kernel/dumpstack.c | 27 |
2 files changed, 4 insertions, 28 deletions
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 11fc28ecdb6d..47aa554e41b7 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt | |||
@@ -587,11 +587,6 @@ | |||
587 | Sets the size of memory pool for coherent, atomic dma | 587 | Sets the size of memory pool for coherent, atomic dma |
588 | allocations, by default set to 256K. | 588 | allocations, by default set to 256K. |
589 | 589 | ||
590 | code_bytes [X86] How many bytes of object code to print | ||
591 | in an oops report. | ||
592 | Range: 0 - 8192 | ||
593 | Default: 64 | ||
594 | |||
595 | com20020= [HW,NET] ARCnet - COM20020 chipset | 590 | com20020= [HW,NET] ARCnet - COM20020 chipset |
596 | Format: | 591 | Format: |
597 | <io>[,<irq>[,<nodeID>[,<backplane>[,<ckp>[,<timeout>]]]]] | 592 | <io>[,<irq>[,<nodeID>[,<backplane>[,<ckp>[,<timeout>]]]]] |
diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c index 18fa9d74c182..593db796374d 100644 --- a/arch/x86/kernel/dumpstack.c +++ b/arch/x86/kernel/dumpstack.c | |||
@@ -22,9 +22,10 @@ | |||
22 | #include <asm/stacktrace.h> | 22 | #include <asm/stacktrace.h> |
23 | #include <asm/unwind.h> | 23 | #include <asm/unwind.h> |
24 | 24 | ||
25 | #define OPCODE_BUFSIZE 64 | ||
26 | |||
25 | int panic_on_unrecovered_nmi; | 27 | int panic_on_unrecovered_nmi; |
26 | int panic_on_io_nmi; | 28 | int panic_on_io_nmi; |
27 | static unsigned int code_bytes = 64; | ||
28 | static int die_counter; | 29 | static int die_counter; |
29 | 30 | ||
30 | bool in_task_stack(unsigned long *stack, struct task_struct *task, | 31 | bool in_task_stack(unsigned long *stack, struct task_struct *task, |
@@ -356,26 +357,6 @@ void die(const char *str, struct pt_regs *regs, long err) | |||
356 | oops_end(flags, regs, sig); | 357 | oops_end(flags, regs, sig); |
357 | } | 358 | } |
358 | 359 | ||
359 | static int __init code_bytes_setup(char *s) | ||
360 | { | ||
361 | ssize_t ret; | ||
362 | unsigned long val; | ||
363 | |||
364 | if (!s) | ||
365 | return -EINVAL; | ||
366 | |||
367 | ret = kstrtoul(s, 0, &val); | ||
368 | if (ret) | ||
369 | return ret; | ||
370 | |||
371 | code_bytes = val; | ||
372 | if (code_bytes > 8192) | ||
373 | code_bytes = 8192; | ||
374 | |||
375 | return 1; | ||
376 | } | ||
377 | __setup("code_bytes=", code_bytes_setup); | ||
378 | |||
379 | void show_regs(struct pt_regs *regs) | 360 | void show_regs(struct pt_regs *regs) |
380 | { | 361 | { |
381 | bool all = true; | 362 | bool all = true; |
@@ -393,8 +374,8 @@ void show_regs(struct pt_regs *regs) | |||
393 | * time of the fault.. | 374 | * time of the fault.. |
394 | */ | 375 | */ |
395 | if (!user_mode(regs)) { | 376 | if (!user_mode(regs)) { |
396 | unsigned int code_prologue = code_bytes * 43 / 64; | 377 | unsigned int code_prologue = OPCODE_BUFSIZE * 43 / 64; |
397 | unsigned int code_len = code_bytes; | 378 | unsigned int code_len = OPCODE_BUFSIZE; |
398 | unsigned char c; | 379 | unsigned char c; |
399 | u8 *ip; | 380 | u8 *ip; |
400 | 381 | ||