All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Eric Dumazet <edumazet@google.com>, Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Eric Dumazet <edumazet@google.com>,
	Eric Dumazet <eric.dumazet@gmail.com>,
	Andy Lutomirski <luto@kernel.org>
Subject: Re: [PATCH] x86/traps: do not hash pointers in handle_stack_overflow()
Date: Fri, 07 Feb 2020 14:44:46 +0000	[thread overview]
Message-ID: <87tv42xxr5.fsf@nanos.tec.linutronix.de> (raw)
In-Reply-To: <20200207043836.106657-1-edumazet@google.com>

Eric Dumazet <edumazet@google.com> writes:

> Mangling stack pointers in handle_stack_overflow() is moot,
> as registers (including RSP/RBP) are clear anyway.
>
> BUG: stack guard page was hit at 0000000063381e80 (stack is
> 000000008edc5696..0000000012256c50)

To illustrate your argument above it would be useful to provide the post
patch output as well.

> kernel stack overflow (double-fault): 0000 [#1] PREEMPT SMP KASAN
> ...
> RSP: 0018:ffffc90002c1ffc0 EFLAGS: 00010802
> RAX: 1ffff11004a0094c RBX: ffff888025004180 RCX: c9d82d1007bb146c
> RDX: dffffc0000000000 RSI: ffff888025004a40 RDI: ffff888025004180
> RBP: ffffc90002c201c0 R08: dffffc0000000000 R09: fffffbfff1405915
> R10: fffffbfff1405915 R11: 0000000000000000 R12: ffff888025004a60
> R13: ffff888025004a10 R14: c9d82d1007bb146c R15: ffff888025004180
> ...
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Andy Lutomirski <luto@kernel.org>
> ---
>  arch/x86/kernel/traps.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
> index 6ef00eb6fbb925e86109f86845e2b3ccef4023ec..44873df292bd3f9f77bb721c53cb8a1c40994cca 100644
> --- a/arch/x86/kernel/traps.c
> +++ b/arch/x86/kernel/traps.c
> @@ -296,7 +296,7 @@ __visible void __noreturn handle_stack_overflow(const char *message,
>  						struct pt_regs *regs,
>  						unsigned long fault_address)
>  {
> -	printk(KERN_EMERG "BUG: stack guard page was hit at %p (stack is %p..%p)\n",
> +	printk(KERN_EMERG "BUG: stack guard page was hit at %px (stack
> is %px..%px)\n",

While touching this, can you please switch it to pr_emerg() ?

Thanks,

        tglx

  reply	other threads:[~2020-02-07 14:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-07  4:38 [PATCH] x86/traps: do not hash pointers in handle_stack_overflow() Eric Dumazet
2020-02-07 14:44 ` Thomas Gleixner [this message]
2020-02-07 15:18   ` Eric Dumazet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tv42xxr5.fsf@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.