linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Donnellan <ajd@linux.ibm.com>
To: Yury Norov <yury.norov@gmail.com>
Cc: Erhard Furtner <erhard_f@mailbox.org>,
	Emese Revfy <re.emese@gmail.com>,
	linuxppc-dev@lists.ozlabs.org, linux-hardening@vger.kernel.org
Subject: Re: [PATCH] gcc-plugins: Undefine LATENT_ENTROPY_PLUGIN when plugin disabled for a file
Date: Wed, 17 Aug 2022 13:09:33 +1000	[thread overview]
Message-ID: <2db81b1ab2b1b1fc4992479582cbb47cec7c839d.camel@linux.ibm.com> (raw)
In-Reply-To: <YvuKKngQ/l24+7rH@yury-laptop>

On Tue, 2022-08-16 at 05:14 -0700, Yury Norov wrote:
> On Tue, Aug 16, 2022 at 03:17:20PM +1000, Andrew Donnellan wrote:
> > Commit 36d4b36b6959 ("lib/nodemask: inline next_node_in() and
> > node_random()") refactored some code by moving node_random() from
> > lib/nodemask.c to include/linux/nodemask.h, thus requiring
> > nodemask.h to
> > include random.h, which conditionally defines add_latent_entropy()
> > depending on whether the macro LATENT_ENTROPY_PLUGIN is defined.
> > 
> > This broke the build on powerpc, where nodemask.h is indirectly
> > included
> > in arch/powerpc/kernel/prom_init.c, part of the early boot
> > machinery that
> > is excluded from the latent entropy plugin using
> > DISABLE_LATENT_ENTROPY_PLUGIN. It turns out that while we add a gcc
> > flag
> > to disable the actual plugin, we don't undefine
> > LATENT_ENTROPY_PLUGIN.
> > 
> > This leads to the following:
> > 
> >     CC      arch/powerpc/kernel/prom_init.o
> >   In file included from ./include/linux/nodemask.h:97,
> >                    from ./include/linux/mmzone.h:17,
> >                    from ./include/linux/gfp.h:7,
> >                    from ./include/linux/xarray.h:15,
> 
> As a side note, xarray can go with gfp_types.h instead of gfp.h

Indeed, I just saw your patch to fix this.

> 
> > Fixes: 36d4b36b6959 ("lib/nodemask: inline next_node_in() and
> > node_random()")
> 
> I think it rather fixes 38addce8b600ca33 ("gcc-plugins: Add
> latent_entropy plugin").

You're right, I was in a rush and should have tagged that
appropriately.

> 
> For the rest,
> Reviewed-by: Yury Norov <yury.norov@gmail.com>

Thanks!


-- 
Andrew Donnellan    OzLabs, ADL Canberra
ajd@linux.ibm.com   IBM Australia Limited


  reply	other threads:[~2022-08-17  3:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-16  5:17 [PATCH] gcc-plugins: Undefine LATENT_ENTROPY_PLUGIN when plugin disabled for a file Andrew Donnellan
2022-08-16 12:14 ` Yury Norov
2022-08-17  3:09   ` Andrew Donnellan [this message]
2022-08-16 19:25 ` Kees Cook
2022-08-17  3:09   ` Andrew Donnellan

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=2db81b1ab2b1b1fc4992479582cbb47cec7c839d.camel@linux.ibm.com \
    --to=ajd@linux.ibm.com \
    --cc=erhard_f@mailbox.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=re.emese@gmail.com \
    --cc=yury.norov@gmail.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;
as well as URLs for NNTP newsgroup(s).