Linux-Sparse Archive mirror
 help / color / mirror / Atom feed
From: Vincent MAILHOL <mailhol.vincent@wanadoo.fr>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: Charlemagne Lasse <charlemagnelasse@gmail.com>,
	jpoimboe@redhat.com, adobriyan@gmail.com, bp@alien8.de,
	dave.hansen@linux.intel.com, hpa@zytor.com,
	linux-kernel@vger.kernel.org, linux-sparse@vger.kernel.org,
	llvm@lists.linux.dev, luc.vanoostenryck@gmail.com,
	mingo@redhat.com, nathan@kernel.org, peterz@infradead.org,
	tglx@linutronix.de, x86@kernel.org,
	Sasha Levin <sashal@kernel.org>
Subject: Re: [PATCH] x86: bug.h: merge annotate_reachable into _BUG_FLAGS for __WARN_FLAGS
Date: Thu, 24 Mar 2022 11:42:01 +0900	[thread overview]
Message-ID: <CAMZ6RqJ7B_Yqs0jE0nmkX2Z=xh7Jj6J_ihP=ybLVn5VXY+5kTA@mail.gmail.com> (raw)
In-Reply-To: <CAKwvOdmSV3Nse+tGMBXvN=QvnOs6-ODZRJB0OF5Pd6BVb-scFw@mail.gmail.com>

On Thu. 24 Mar 2022 at 04:41, Nick Desaulniers <ndesaulniers@google.com> wrote:
> On Wed, Mar 23, 2022 at 12:30 PM Charlemagne Lasse
> <charlemagnelasse@gmail.com> wrote:
> >
> > > @@ -75,9 +77,9 @@ do {                                \
> > >   */
> > >  #define __WARN_FLAGS(flags)                    \
> > >  do {                                \
> > > +    __auto_type f = BUGFLAG_WARNING|(flags);        \
> > >      instrumentation_begin();                \
> > > -    _BUG_FLAGS(ASM_UD2, BUGFLAG_WARNING|(flags));        \
> > > -    annotate_reachable();                    \
> > > +    _BUG_FLAGS(ASM_UD2, f, ASM_REACHABLE);            \
> > >      instrumentation_end();                    \
> > >  } while (0)
> >
> > This causes following sparse warning on x86:
> >
> > make allnoconfig && touch init/version.c && make CHECK="sparse
> > -Wshadow"  C=1 init/version.o
> > #
> > # No change to .config
> > #
> >  CALL    scripts/checksyscalls.sh
> >  CALL    scripts/atomic/check-atomics.sh
> >  CHK     include/generated/compile.h
> >  CC      init/version.o
> >  CHECK   init/version.c
> > init/version.c: note: in included file (through
> > include/linux/rculist.h, include/linux/pid.h, include/linux/sched.h,
> > include/linux/utsname.h):
> > ./include/linux/rcupdate.h:1007:9: warning: symbol 'f' shadows an earlier one
> > ./include/linux/rcupdate.h:1001:47: originally declared here
>
> Thanks for the report. There was already a fix sent for this:
> https://lore.kernel.org/lkml/20220317065743.8467-1-mailhol.vincent@wanadoo.fr/
> but it doesn't mention that sparse is warning about this, too.
>
> I think if Vincent sent a v3 that mentioned that sparse is warning
> about this, too, and cc'ed you, you could then supply
> signed-off/tested-by tags (or just do so on v2, though it doesn't
> mention sparse), and maybe Josh would be so kind as to pick that up?

Thank Nick, I did as you suggested. Here is the v3:
https://lore.kernel.org/all/20220324023742.106546-1-mailhol.vincent@wanadoo.fr/

Yours sincerely,
Vincent Mailhol

  reply	other threads:[~2022-03-24  2:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-23 19:30 [PATCH] x86: bug.h: merge annotate_reachable into _BUG_FLAGS for __WARN_FLAGS Charlemagne Lasse
2022-03-23 19:41 ` Nick Desaulniers
2022-03-24  2:42   ` Vincent MAILHOL [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-02-02 20:55 Nick Desaulniers

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='CAMZ6RqJ7B_Yqs0jE0nmkX2Z=xh7Jj6J_ihP=ybLVn5VXY+5kTA@mail.gmail.com' \
    --to=mailhol.vincent@wanadoo.fr \
    --cc=adobriyan@gmail.com \
    --cc=bp@alien8.de \
    --cc=charlemagnelasse@gmail.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sparse@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=luc.vanoostenryck@gmail.com \
    --cc=mingo@redhat.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=peterz@infradead.org \
    --cc=sashal@kernel.org \
    --cc=tglx@linutronix.de \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).