[PATCH] powerpc: get rid of #include <generated/compile.h>

Scott Wood oss at buserror.net
Sun Jun 5 11:43:53 AEST 2022


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 at 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 at buserror.net>

-Scott




More information about the Linuxppc-dev mailing list