mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dave Hansen <dave.hansen@intel.com>
To: Tengda Wu <wutengda@huaweicloud.com>, x86@kernel.org
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Alexander Potapenko <glider@google.com>,
	Andrey Konovalov <andreyknvl@gmail.com>,
	Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Dmitry Vyukov <dvyukov@google.com>,
	Ingo Molnar <mingo@redhat.com>,
	linux-kernel@vger.kernel.org,
	Peter Zijlstra <peterz@infradead.org>,
	Josh Poimboeuf <jpoimboe@redhat.com>
Subject: Re: [PATCH -next] x86: Prevent KASAN false positive warnings in __show_regs()
Date: Wed, 27 Aug 2025 07:36:56 -0700	[thread overview]
Message-ID: <99878868-9898-46aa-ad4c-ef9aca3e390c@intel.com> (raw)
In-Reply-To: <20250818130715.2904264-1-wutengda@huaweicloud.com>

On 8/18/25 06:07, Tengda Wu wrote:
> +__no_sanitize_address
>  void __show_regs(struct pt_regs *regs, enum show_regs_mode mode,
>  		 const char *log_lvl)

I'd feel a lot better about this if it didn't just disable KASAN for the
whole function. Surely there are other __show_regs() users that could
benefit from sanitizer coverage.

Can we limit the impact to just the asynchronous (unsafe) stack walkers?
If it's just for sysrq, this seems like the kind of thing we could just
a flag somewhere and have KASAN suppress the warning. Or to generically
tell KASAN that we might be doing accesses in a certain memory range
that are unsafe.

I'm also adding Peter and Josh to cc. Seems like the kind of thing they
might have an opinion on.

  parent reply	other threads:[~2025-08-27 14:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-18 13:07 Tengda Wu
2025-08-20 21:36 ` Dave Hansen
2025-08-21  3:13   ` Tengda Wu
2025-08-27 11:58     ` Tengda Wu
2025-08-27 14:36 ` Dave Hansen [this message]
2025-08-28 12:04   ` Tengda Wu
2025-08-27 14:45 ` Andrey Ryabinin
2025-08-28 12:06   ` Tengda Wu
2025-08-28 14:13     ` Dave Hansen
2025-08-29  2:50       ` Tengda Wu
2025-08-28 19:16     ` Josh Poimboeuf
2025-08-29  9:45       ` Tengda Wu

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=99878868-9898-46aa-ad4c-ef9aca3e390c@intel.com \
    --to=dave.hansen@intel.com \
    --cc=andreyknvl@gmail.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=dvyukov@google.com \
    --cc=glider@google.com \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=ryabinin.a.a@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=wutengda@huaweicloud.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

all inboxes | Powered by JetHome®