mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Scott Wood <oss@buserror.net>
To: Masahiro Yamada <masahiroy@kernel.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	linuxppc-dev@lists.ozlabs.org
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	Christophe Leroy <christophe.leroy@csgroup.eu>,
	Diana Craciun <diana.craciun@nxp.com>,
	Frank Rowand <frank.rowand@sony.com>,
	Jason Yan <yanaijie@huawei.com>, Rob Herring <robh@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] powerpc: get rid of #include <generated/compile.h>
Date: Sat, 04 Jun 2022 20:43:53 -0500	[thread overview]
Message-ID: <198e1080c142048ce6c8705a569fe0a0461e3682.camel@buserror.net> (raw)
In-Reply-To: <20220604085050.4078927-1-masahiroy@kernel.org>

On Sat, 2022-06-04 at 17:50 +0900, Masahiro Yamada wrote:
> You cannot include <generated/compile.h> here because it is generated
> in init/Makefile but there is no guarantee that it happens before
> arch/powerpc/mm/nohash/kaslr_booke.c is compiled for parallel builds.
> 
> The places where you can reliably include <generated/compile.h> are:
> 
>   - init/          (because init/Makefile can specify the dependency)
>   - arch/*/boot/   (because it is compiled after vmlinux)
> 
> Commit f231e4333312 ("hexagon: get rid of #include <generated/compile.h>")
> fixed the last breakage at that time, but powerpc re-added this.
> 
> <genearated/compile.h> was unneeded because 'build_str' is almost the
> same as 'linux_banner' defined in init/version.c
> 
> Let's copy the solution from MIPS.
> (get_random_boot() in arch/mips/kernel/relocate.c)
> 
> Fixes: 6a38ea1d7b94 ("powerpc/fsl_booke/32: randomize the kernel image
> offset")
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
> 
> If this gets into the mainline before -rc2 or -rc3,
> I will base my kbuild work on top of this.
> 
> 
>  arch/powerpc/mm/nohash/kaslr_booke.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)

Acked-by: Scott Wood <oss@buserror.net>

-Scott



  reply	other threads:[~2022-06-05  2:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-04  8:50 Masahiro Yamada
2022-06-05  1:43 ` Scott Wood [this message]
2022-06-09 14:44 ` Michael Ellerman

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=198e1080c142048ce6c8705a569fe0a0461e3682.camel@buserror.net \
    --to=oss@buserror.net \
    --cc=benh@kernel.crashing.org \
    --cc=christophe.leroy@csgroup.eu \
    --cc=diana.craciun@nxp.com \
    --cc=frank.rowand@sony.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=masahiroy@kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    --cc=robh@kernel.org \
    --cc=yanaijie@huawei.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

all inboxes | Powered by JetHome®