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 3CCEAC43334 for ; Mon, 18 Jul 2022 15:04:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234989AbiGRPE0 (ORCPT ); Mon, 18 Jul 2022 11:04:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233593AbiGRPEZ (ORCPT ); Mon, 18 Jul 2022 11:04:25 -0400 Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 63F5610AD; Mon, 18 Jul 2022 08:04:24 -0700 (PDT) Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 26IEu3b6021466; Mon, 18 Jul 2022 09:56:03 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 26IEu2Km021465; Mon, 18 Jul 2022 09:56:02 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Mon, 18 Jul 2022 09:56:01 -0500 From: Segher Boessenkool To: Michael Ellerman Cc: Linus Torvalds , Sudip Mukherjee , Kees Cook , linux-kernel , Paul Mackerras , linux-hardening@vger.kernel.org, linuxppc-dev Subject: Re: mainline build failure of powerpc allmodconfig for prom_init_check Message-ID: <20220718145601.GE25951@gate.crashing.org> References: <20220717195448.GB25951@gate.crashing.org> <87k08bdqm1.fsf@mpe.ellerman.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87k08bdqm1.fsf@mpe.ellerman.id.au> User-Agent: Mutt/1.4.2.3i Precedence: bulk List-ID: X-Mailing-List: linux-hardening@vger.kernel.org On Mon, Jul 18, 2022 at 01:52:38PM +1000, Michael Ellerman wrote: > Segher Boessenkool writes: > > Can't we simply have a small simple implementation of these functions in > > arch/powerpc/boot/? This stuff is not performance-critical, and this is > > not the first time we hit these problems. > > prom_init.c isn't in arch/powerpc/boot :) Ah duh :-) > It's linked into the kernel proper, but we want it to behave like a > pre-boot environment (because not all boot paths run it) which is why we > restrict what symbols it can call. > > We could have a prom_memset() etc. but we'd need to do some tricks to > rewrite references to memset() to prom_memset() before linking. You can do it in its linker script? Segher 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 D48CAC43334 for ; Mon, 18 Jul 2022 15:01:39 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4LmlXy21zHz3cd4 for ; Tue, 19 Jul 2022 01:01:38 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.crashing.org (client-ip=63.228.1.57; helo=gate.crashing.org; envelope-from=segher@kernel.crashing.org; receiver=) Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by lists.ozlabs.org (Postfix) with ESMTP id 4LmlXW6wXBz3bXZ for ; Tue, 19 Jul 2022 01:01:15 +1000 (AEST) Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 26IEu3b6021466; Mon, 18 Jul 2022 09:56:03 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 26IEu2Km021465; Mon, 18 Jul 2022 09:56:02 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Mon, 18 Jul 2022 09:56:01 -0500 From: Segher Boessenkool To: Michael Ellerman Subject: Re: mainline build failure of powerpc allmodconfig for prom_init_check Message-ID: <20220718145601.GE25951@gate.crashing.org> References: <20220717195448.GB25951@gate.crashing.org> <87k08bdqm1.fsf@mpe.ellerman.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87k08bdqm1.fsf@mpe.ellerman.id.au> User-Agent: Mutt/1.4.2.3i 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: Kees Cook , linuxppc-dev , linux-kernel , Paul Mackerras , linux-hardening@vger.kernel.org, Linus Torvalds , Sudip Mukherjee Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Mon, Jul 18, 2022 at 01:52:38PM +1000, Michael Ellerman wrote: > Segher Boessenkool writes: > > Can't we simply have a small simple implementation of these functions in > > arch/powerpc/boot/? This stuff is not performance-critical, and this is > > not the first time we hit these problems. > > prom_init.c isn't in arch/powerpc/boot :) Ah duh :-) > It's linked into the kernel proper, but we want it to behave like a > pre-boot environment (because not all boot paths run it) which is why we > restrict what symbols it can call. > > We could have a prom_memset() etc. but we'd need to do some tricks to > rewrite references to memset() to prom_memset() before linking. You can do it in its linker script? Segher