public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Jann Horn <jannh@google.com>
Cc: x86@kernel.org, Andy Lutomirski <luto@kernel.org>,
	Josh Poimboeuf <jpoimboe@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	linux-kernel@vger.kernel.org,
	Dominik Brodowski <linux@dominikbrodowski.net>,
	Oleg Nesterov <oleg@redhat.com>,
	Vernon Lovejoy <vlovejoy@redhat.com>
Subject: Re: [PATCH 2/2] x86/dumpstack: Fix broken unwinding from exception stacks
Date: Tue, 25 Mar 2025 08:31:43 +0100	[thread overview]
Message-ID: <Z-Jb3xEcQWKn_uqe@gmail.com> (raw)
In-Reply-To: <CAG48ez0=dtR85yhy07jqvq9YC__3ocT_N_hpJMN4v-FfMs-PsA@mail.gmail.com>


* Jann Horn <jannh@google.com> wrote:

> On Tue, Mar 25, 2025 at 3:01 AM Jann Horn <jannh@google.com> wrote:
> > Originally, get_stack_pointer() used the regs provided by the caller; after
> > that commit, get_stack_pointer() instead uses the regs at the top of the
> > stack frame the unwinder is looking at. Often, there are no such regs at
> > all, and "regs" is NULL, causing get_stack_pointer() to fall back to the
> > task's current stack pointer, which is not what we want here, but probably
> > happens to mostly work. Other times, the original regs will point to
> > another regs frame - in that case, the linear guess unwind logic in
> > show_trace_log_lvl() will start unwinding too far up the stack, causing the
> > first frame found by the proper unwinder to never be visited, resulting in
> > a stack trace consisting purely of guess lines.
> 
> I guess the subject line is kind of misleading - maybe "x86/dumpstack:
> Fix misplaced assignment in unwinder" would be better?

Well, it's a bug and the code is broken that results in subpar stack 
dumps from exception contexts that fall back to the guess-dumper, 
right?

So I've edited the subject line to:

   x86/dumpstack: Fix inaccurate unwinding from exception stacks due to misplaced assignment

But I'd have no problem calling it broken either - even if the bug 
doesn't crash anything.

Thanks,

	Ingo

  reply	other threads:[~2025-03-25  7:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-25  2:01 [PATCH 0/2] x86 unwind fixes (1 unwinder fix, 1 missing entry ORC annotation) Jann Horn
2025-03-25  2:01 ` [PATCH 1/2] x86/entry: Fix ORC for PUSH_REGS with save_ret=1 Jann Horn
2025-03-25  7:46   ` [tip: x86/urgent] x86/entry: Fix ORC unwinder " tip-bot2 for Jann Horn
2025-03-25  2:01 ` [PATCH 2/2] x86/dumpstack: Fix broken unwinding from exception stacks Jann Horn
2025-03-25  2:24   ` Jann Horn
2025-03-25  7:31     ` Ingo Molnar [this message]
2025-03-25  7:46   ` [tip: x86/urgent] x86/dumpstack: Fix inaccurate unwinding from exception stacks due to misplaced assignment tip-bot2 for Jann Horn
2025-03-25 13:27   ` [PATCH 2/2] x86/dumpstack: Fix broken unwinding from exception stacks Oleg Nesterov

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=Z-Jb3xEcQWKn_uqe@gmail.com \
    --to=mingo@kernel.org \
    --cc=jannh@google.com \
    --cc=jpoimboe@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@dominikbrodowski.net \
    --cc=luto@kernel.org \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --cc=vlovejoy@redhat.com \
    --cc=x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox