lkml.org 
[lkml]   [2016]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH v4 11/29] x86/dumpstack: When OOPSing, rewind the stack before do_exit
On Sun, Jun 26, 2016 at 02:55:33PM -0700, Andy Lutomirski wrote:
> If we call do_exit with a clean stack, we greatly reduce the risk of

Nits: do_exit()

> recursive oopses due to stack overflow in do_exit, and we allow

s/ in do_exit//

> do_exit to work even if we OOPS from an IST stack. The latter gives

Append "()" to the function names.

> us a much better chance of surviving long enough after we detect a
> stack overflow to write out our logs.
>
> I intentionally separated this from the preceding patch that
> disables do_exit-on-OOPS on IST stacks. This way, if we need to
> revert this patch, we still end up in an acceptable state wrt stack
> overflow handling.
>
> Reviewed-by: Josh Poimboeuf <jpoimboe@redhat.com>
> Signed-off-by: Andy Lutomirski <luto@kernel.org>
> ---

...

> diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c
> index 352f022cfd5b..0d05f113805e 100644
> --- a/arch/x86/kernel/dumpstack.c
> +++ b/arch/x86/kernel/dumpstack.c
> @@ -226,6 +226,8 @@ unsigned long oops_begin(void)
> EXPORT_SYMBOL_GPL(oops_begin);
> NOKPROBE_SYMBOL(oops_begin);
>
> +extern void __noreturn rewind_stack_do_exit(int signr);

You don't need the "extern" here.

> +
> void oops_end(unsigned long flags, struct pt_regs *regs, int signr)
> {
> if (regs && kexec_should_crash(current))
--
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.
\
 
 \ /
  Last update: 2016-07-04 21:21    [W:0.339 / U:1.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site