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 X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A50BC2D0A7 for ; Thu, 10 Sep 2020 19:47:24 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F2A0C21D81 for ; Thu, 10 Sep 2020 19:47:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="BklM7PWa"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="eC6xHFZe" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F2A0C21D81 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=QrOTG25BQ0KrCvGo0I8fjrbbaukVNhggzyJvXqCTRy0=; b=BklM7PWagQKKUrHMTKt1Yrt/N 7I/pAr8NR8QFa1AmvenSso1+Zf+UBW3iekFgE4p8wXxoJjqd0rdzMwak8khPl2oiyksiR8BhwePhY gC9If9ac2fu+uwieDPLQkVZVb4iPDfNQcMWA7EAxIa7faN2moq2w5ku7rDDyZsGd64MKJT5jJKwsf qZInj3VcdsNaB/3aVKfT1Y8AcCXoqfRVr05W/4hcSnQbU/eOSZPi6uzj7Ws5yb7xMlb41z3YqNpQB BUNxf7EFOVKAcHVgEzYDLHgEjvg+skfQ+LFGB39v9r4N7LygpdLaL52vGkPNTMkGla1+LI0dIlOTT PmWgJmrag==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGSW1-0008Ev-Dg; Thu, 10 Sep 2020 19:45:53 +0000 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGSVx-0008Cs-7J for linux-arm-kernel@lists.infradead.org; Thu, 10 Sep 2020 19:45:51 +0000 Received: by mail-pg1-x542.google.com with SMTP id 67so4817681pgd.12 for ; Thu, 10 Sep 2020 12:45:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=kT3st5L2W/yGrskNA7hV4WTKcp+VzTZ5Pgaqe30vqT8=; b=eC6xHFZebGzDOu2iJFlC4sYhGBsPBPtk9a7oklICzLNlEMzSAdGnasLCc1rhvVduzw WWGkAB927UqclP1++HPY0zndFIqCAsSEoCB33GsJW1zgx9zdnqi9fNwkG+wGtFEr+T3z bUYjH1Oc2jBMRnj0f0FQ3tH0tHQIOzzYF+914= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=kT3st5L2W/yGrskNA7hV4WTKcp+VzTZ5Pgaqe30vqT8=; b=bqIh50jy/lEEc+z+W51ECcq9OX5xG4+4dP3Rp4D5/bMVr9E4buSAscIjenivN5KBl5 0jSySZMBKGkdEwserGweQyjQYAGhhERo+6RMwfLt0hYUq/agw+cac9icDtFciCEH6Vq7 l4KCCubIkpc7fLQlODxi0N4bsRoSK1saz1Df5DU+/9C6yRyosvceduJxWviYZCcCSUv1 AyEBITe4JGTudkXP8FT8wfOFBqGi8UcysIzw+fqXqEisp9/KtZehQm0WQzNEh4LfGH15 JhyTdK38DOWP1qecRPsm/W9rxuW1xIqGlIis3Mv3ehaYC6/M7USBxnmYhHe0Nf8aBH3D Y56Q== X-Gm-Message-State: AOAM530l5dXmuwiutOThfmFVRT0hiSPuUOM9F8f9p5e9/I+KpI1S1yvD mdpKGRdGbJPw6AlfqAn/cQi1Dw== X-Google-Smtp-Source: ABdhPJwWpKs77i2Pw4YhFhAT5cZe6s0qx17kIVE+as0BWVJNc55TKLnEBagdP5cQWEjWPugWxrbACw== X-Received: by 2002:aa7:858e:: with SMTP id w14mr2753410pfn.95.1599767146631; Thu, 10 Sep 2020 12:45:46 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id l79sm2905776pfd.210.2020.09.10.12.45.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 12:45:45 -0700 (PDT) Date: Thu, 10 Sep 2020 12:45:44 -0700 From: Kees Cook To: Masahiro Yamada Subject: Re: [PATCH] kbuild: preprocess module linker script Message-ID: <202009101245.493610D05@keescook> References: <20200904133122.133071-1-masahiroy@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200904133122.133071-1-masahiroy@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200910_154549_312832_03649C2C X-CRM114-Status: GOOD ( 18.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-ia64@vger.kernel.org, Peter Zijlstra , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , linux-riscv@lists.infradead.org, Will Deacon , Ard Biesheuvel , Anton Ivanov , linux-arch@vger.kernel.org, Mauro Carvalho Chehab , Richard Weinberger , Russell King , Ingo Molnar , Geert Uytterhoeven , Catalin Marinas , Fenghua Yu , Albert Ou , Arnd Bergmann , linux-kbuild@vger.kernel.org, Jeff Dike , linux-um@lists.infradead.org, linux-m68k@lists.linux-m68k.org, Michal Marek , Paul Walmsley , linux-arm-kernel@lists.infradead.org, Tony Luck , linux-kernel@vger.kernel.org, Palmer Dabbelt , Jessica Yu , linuxppc-dev@lists.ozlabs.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Sep 04, 2020 at 10:31:21PM +0900, Masahiro Yamada wrote: > There was a request to preprocess the module linker script like we do > for the vmlinux one (https://lkml.org/lkml/2020/8/21/512). > > The difference between vmlinux.lds and module.lds is that the latter > is needed for external module builds, thus must be cleaned up by > 'make mrproper' instead of 'make clean' (also, it must be created by > 'make modules_prepare'). > > You cannot put it in arch/*/kernel/ because 'make clean' descends into > it. I moved arch/*/kernel/module.lds to arch/*/include/asm/module.lds.h, > which is included from scripts/module.lds.S. > > scripts/module.lds is fine because 'make clean' keeps all the build > artifacts under scripts/. > > You can add arch-specific sections in . > > Signed-off-by: Masahiro Yamada Reviewed-by: Kees Cook -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel