From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AC5D3C433EF for ; Sun, 5 Jun 2022 02:25:10 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4LG0nw6wltz3bmw for ; Sun, 5 Jun 2022 12:25:08 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=buserror.net (client-ip=165.227.176.147; helo=baldur.buserror.net; envelope-from=oss@buserror.net; receiver=) X-Greylist: delayed 2305 seconds by postgrey-1.36 at boromir; Sun, 05 Jun 2022 12:24:41 AEST Received: from baldur.buserror.net (baldur.buserror.net [165.227.176.147]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4LG0nP3df3z302N for ; Sun, 5 Jun 2022 12:24:41 +1000 (AEST) Received: from [2601:449:8480:af0::de51] by baldur.buserror.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nxfJ4-00D9V8-IG; Sat, 04 Jun 2022 20:43:54 -0500 Message-ID: <198e1080c142048ce6c8705a569fe0a0461e3682.camel@buserror.net> From: Scott Wood To: Masahiro Yamada , Michael Ellerman , linuxppc-dev@lists.ozlabs.org Date: Sat, 04 Jun 2022 20:43:53 -0500 In-Reply-To: <20220604085050.4078927-1-masahiroy@kernel.org> References: <20220604085050.4078927-1-masahiroy@kernel.org> Organization: Red Hat Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.4-1ubuntu2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2601:449:8480:af0::de51 X-SA-Exim-Rcpt-To: masahiroy@kernel.org, mpe@ellerman.id.au, linuxppc-dev@lists.ozlabs.org, benh@kernel.crashing.org, paulus@samba.org, christophe.leroy@csgroup.eu, diana.craciun@nxp.com, frank.rowand@sony.com, yanaijie@huawei.com, robh@kernel.org, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: oss@buserror.net Subject: Re: [PATCH] powerpc: get rid of #include X-SA-Exim-Version: 4.2.1 (built Sat, 13 Feb 2021 17:57:42 +0000) X-SA-Exim-Scanned: Yes (on baldur.buserror.net) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , Jason Yan , linux-kernel@vger.kernel.org, Diana Craciun , Paul Mackerras , Frank Rowand Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Sat, 2022-06-04 at 17:50 +0900, Masahiro Yamada wrote: > You cannot include 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 are: > >   - init/          (because init/Makefile can specify the dependency) >   - arch/*/boot/   (because it is compiled after vmlinux) > > Commit f231e4333312 ("hexagon: get rid of #include ") > fixed the last breakage at that time, but powerpc re-added this. > > 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 > --- > > 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 -Scott From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8CC78C43334 for ; Sun, 5 Jun 2022 02:27:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243457AbiFEC1B (ORCPT ); Sat, 4 Jun 2022 22:27:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234978AbiFEC0z (ORCPT ); Sat, 4 Jun 2022 22:26:55 -0400 X-Greylist: delayed 2278 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Sat, 04 Jun 2022 19:26:53 PDT Received: from baldur.buserror.net (baldur.buserror.net [165.227.176.147]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32A96BBC for ; Sat, 4 Jun 2022 19:26:52 -0700 (PDT) Received: from [2601:449:8480:af0::de51] by baldur.buserror.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nxfJ4-00D9V8-IG; Sat, 04 Jun 2022 20:43:54 -0500 Message-ID: <198e1080c142048ce6c8705a569fe0a0461e3682.camel@buserror.net> From: Scott Wood To: Masahiro Yamada , Michael Ellerman , linuxppc-dev@lists.ozlabs.org Cc: Benjamin Herrenschmidt , Paul Mackerras , Christophe Leroy , Diana Craciun , Frank Rowand , Jason Yan , Rob Herring , linux-kernel@vger.kernel.org Date: Sat, 04 Jun 2022 20:43:53 -0500 In-Reply-To: <20220604085050.4078927-1-masahiroy@kernel.org> References: <20220604085050.4078927-1-masahiroy@kernel.org> Organization: Red Hat Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.4-1ubuntu2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2601:449:8480:af0::de51 X-SA-Exim-Rcpt-To: masahiroy@kernel.org, mpe@ellerman.id.au, linuxppc-dev@lists.ozlabs.org, benh@kernel.crashing.org, paulus@samba.org, christophe.leroy@csgroup.eu, diana.craciun@nxp.com, frank.rowand@sony.com, yanaijie@huawei.com, robh@kernel.org, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: oss@buserror.net Subject: Re: [PATCH] powerpc: get rid of #include X-SA-Exim-Version: 4.2.1 (built Sat, 13 Feb 2021 17:57:42 +0000) X-SA-Exim-Scanned: Yes (on baldur.buserror.net) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2022-06-04 at 17:50 +0900, Masahiro Yamada wrote: > You cannot include 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 are: > >   - init/          (because init/Makefile can specify the dependency) >   - arch/*/boot/   (because it is compiled after vmlinux) > > Commit f231e4333312 ("hexagon: get rid of #include ") > fixed the last breakage at that time, but powerpc re-added this. > > 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 > --- > > 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 -Scott