The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@kernel.org>
To: Alexander Potapenko <glider@google.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Marco Elver <elver@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>,
	syzbot <syzbot+cdcfd55737fe43eeb3a3@syzkaller.appspotmail.com>,
	kasan-dev <kasan-dev@googlegroups.com>,
	linux-kernel@vger.kernel.org, luto@kernel.org,
	peterz@infradead.org, syzkaller-bugs@googlegroups.com,
	ruanjinjie@huawei.com
Subject: Re: [syzbot] [kernel?] upstream test error: KMSAN: uninit-value in irqentry_exit_to_kernel_mode_preempt
Date: Thu, 25 Jun 2026 23:06:18 +0200	[thread overview]
Message-ID: <87se6ajpo5.ffs@fw13> (raw)
In-Reply-To: <CAG_fn=X=So0rhuBbq6B69-xw+BRCxxPkva=--mDA=X7BUO_+Tw@mail.gmail.com>

On Mon, Jun 22 2026 at 11:37, Alexander Potapenko wrote:
>> I have a draft Clang patch implementing the following intrinsics at
>> https://github.com/llvm/llvm-project/pull/202603:
>> - llvm.kmsan.instrumentation.begin
>> - llvm.kmsan.instrumentation.end
>> - llvm.kmsan.instrumentation.update.context (to reload the context
>> pointer; I am not using it yet).
>
> For the record, Marco Elver has an alternative proposal: modify
> __kmsan_get_context() to take _RET_IP_ from the caller.
> Then, if noinstr function A calls an instrumented function B, B will
> pass the return address belonging to A to __kmsan_get_context(), and
> the latter can check that return address and wipe out the argument
> shadow if it belongs to the noinstr function.
>
> This solution is quite elegant; it requires only minor compiler
> changes, and won't require any kernel annotations.
> However, there are downsides:
> - We are slowing down each call, including those between instrumented functions.
> - For noinstr calls from modules, we'll need complex lookups involving
> RCU, with a potential for infinite recursion.

Let's not go there. I rather spend some effort to disentangle the
BUG/WARN maze.

Thanks,

        tglx

  reply	other threads:[~2026-06-25 21:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-21 21:37 [syzbot] [kernel?] upstream test error: KMSAN: uninit-value in irqentry_exit_to_kernel_mode_preempt syzbot
2026-04-29  6:29 ` Dmitry Vyukov
2026-04-29  8:09   ` Alexander Potapenko
2026-05-11 12:25     ` Thomas Gleixner
2026-05-12  9:33       ` Alexander Potapenko
2026-05-12 11:15         ` Mark Rutland
2026-05-12 16:24           ` Alexander Potapenko
2026-05-12 17:46             ` Mark Rutland
2026-05-22  6:26               ` Alexander Potapenko
2026-06-02 11:53                 ` Mark Rutland
2026-05-13  0:36             ` Thomas Gleixner
2026-05-13  7:54               ` Peter Zijlstra
2026-05-27 12:39               ` Alexander Potapenko
2026-06-09 13:34                 ` Alexander Potapenko
2026-06-22  9:37                   ` Alexander Potapenko
2026-06-25 21:06                     ` Thomas Gleixner [this message]
2026-06-25 21:04                   ` Thomas Gleixner
2026-06-25 20:54                 ` Thomas Gleixner

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=87se6ajpo5.ffs@fw13 \
    --to=tglx@kernel.org \
    --cc=dvyukov@google.com \
    --cc=elver@google.com \
    --cc=glider@google.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=peterz@infradead.org \
    --cc=ruanjinjie@huawei.com \
    --cc=syzbot+cdcfd55737fe43eeb3a3@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    /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