public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Laight <david.laight.linux@gmail.com>
To: Marco Elver <elver@google.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Konstantin Komarov <almaz.alexandrovich@paragon-software.com>,
	Dmitry Vyukov <dvyukov@google.com>,
	ntfs3@lists.linux.dev, linux-kernel@vger.kernel.org,
	kasan-dev@googlegroups.com
Subject: Re: kcsan -Wmaybe-uninitialized warning in ntfs3
Date: Thu, 23 Apr 2026 14:06:12 +0100	[thread overview]
Message-ID: <20260423140612.46df8b78@pumpkin> (raw)
In-Reply-To: <CANpmjNOzsu8fqEr-qfE8LZbVUUUdoqjBojxoXjiOoR7Pzr+zyg@mail.gmail.com>

On Thu, 23 Apr 2026 13:35:09 +0200
Marco Elver <elver@google.com> wrote:

> On Thu, 23 Apr 2026 at 10:12, David Laight <david.laight.linux@gmail.com> wrote:
> > On Wed, 22 Apr 2026 23:50:22 +0200
> > Marco Elver <elver@google.com> wrote:
> >  
> > > Which means the simplest fix is probably the absolute_pointer() one.  
> >
> > I'm not sure that using absolute_pointer() is right, it is normally used
> > for special conversions in low level boot code.
> >
> > Here it might just be best to explicitly use (void *)(long)addr.  
> 
> That didn't work - tried, and warnings still there (GCC seems to see
> through it).

The only difference is the extra local - unless the '+ 0' matters.

OPTIMIZE_HIDE_VAR() should work, but is annoying to use in a function call.
You sort of need:
#define OPTIMIZER_HIDE_VAL(x) {(	\
	auto _x = x;			\
	asm ("", "+r" (_x));		\
	_x;				\
)}

(also useful for 'lying' to snprintf())

	David

> 
> So that leaves:
> - absolute_pointer()
> - __diag_ignore_all wrapper (mentioned elsewhere in thread)
> 
> Preferences?
> 
> Thanks,
> -- Marco


  reply	other threads:[~2026-04-23 13:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-21  7:53 kcsan -Wmaybe-uninitialized warning in ntfs3 Arnd Bergmann
2026-04-21  9:33 ` Marco Elver
2026-04-21 10:21   ` Arnd Bergmann
2026-04-21 11:35     ` Marco Elver
2026-04-21 12:28       ` Arnd Bergmann
2026-04-21 13:18         ` Marco Elver
2026-04-21 14:11           ` Arnd Bergmann
2026-04-21 15:26             ` Marco Elver
2026-04-21 19:06               ` Marco Elver
2026-04-21 19:12                 ` Arnd Bergmann
2026-04-22  8:00                   ` Arnd Bergmann
2026-04-22  8:23                     ` Marco Elver
2026-04-22 11:35                       ` Marco Elver
2026-04-22 11:51                         ` Marco Elver
2026-04-22 20:57                       ` Arnd Bergmann
2026-04-22 21:50                         ` Marco Elver
2026-04-23  8:12                           ` David Laight
2026-04-23 11:35                             ` Marco Elver
2026-04-23 13:06                               ` David Laight [this message]
2026-04-24 10:03                                 ` Marco Elver
2026-04-21 12:26     ` Marco Elver

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=20260423140612.46df8b78@pumpkin \
    --to=david.laight.linux@gmail.com \
    --cc=almaz.alexandrovich@paragon-software.com \
    --cc=arnd@arndb.de \
    --cc=dvyukov@google.com \
    --cc=elver@google.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ntfs3@lists.linux.dev \
    /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