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=-15.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 4D9DCC63777 for ; Tue, 17 Nov 2020 21:52:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E6EC5241A7 for ; Tue, 17 Nov 2020 21:52:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="FumCDSza" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728651AbgKQVw2 (ORCPT ); Tue, 17 Nov 2020 16:52:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726297AbgKQVw1 (ORCPT ); Tue, 17 Nov 2020 16:52:27 -0500 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25CEFC0613CF for ; Tue, 17 Nov 2020 13:52:26 -0800 (PST) Received: by mail-pg1-x543.google.com with SMTP id f18so16909869pgi.8 for ; Tue, 17 Nov 2020 13:52:26 -0800 (PST) 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=4XjG60ocQx4PkwGgrAEoZIyPUhnxDgPZrMBdqiIZG+4=; b=FumCDSzaVj4k7q4V2p0oNKAIKu0GYbAFc2SyCI1aqTxJUFpFoUH6T8PWWxOryTG19/ Q1zlGV6Di3ZGEwaZIfQcQ4NcdAXg07SmAHCYzmm4aemVr6P+UEqs5yTGo761PszGobNa LiUwMgr6+SbWyc3qbTPN/Ai3ee1ReodEOFMas= 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=4XjG60ocQx4PkwGgrAEoZIyPUhnxDgPZrMBdqiIZG+4=; b=MOHjHHyHikYUFXLtXB3bXGnu+6fUY7KrAeScgWmLTrNUE7O3FcZkHS7aLB9m/uuhGz l5tB7HPE34dlsGVnrKcoxkSg1wCRAZCiKYnNlkfaA2DnegivIvr7u4Rf763IMC4ksZwB 2dGqI0snE/ft4vV4EEGo81XWFmYR+hZ2037AacwELdkI6S2b05yfNaubr2sf9EIkNfyI fAGeELgF8cPTNBbEky/D01lmz7N7snHtAP/1wiRoX+n2/A7scugnX+6yZXTorvM0BQ3x rfL1KJOV+pR1aBsrQHOpTlLTBDbXo0cEiJERf2VSop5EgZL4xmQwjRvM6qxJVcYW61xq vIpQ== X-Gm-Message-State: AOAM532XZ/YHeshU9FeHekZcVnPS1+t+IN/eL3cCmfBYkyFGBhfgGkPR UukKp1dBDamDljLRYHp8hfwgVA== X-Google-Smtp-Source: ABdhPJwx/GwY1vsKuE+ZykhwdU5XFj+Q/8T4Jjrzzd8kbh1afM17NqsLxZ988EMini1U8GWrTVGnNg== X-Received: by 2002:a63:1445:: with SMTP id 5mr5119858pgu.357.1605649945756; Tue, 17 Nov 2020 13:52:25 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id b29sm1039089pgn.87.2020.11.17.13.52.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Nov 2020 13:52:24 -0800 (PST) Date: Tue, 17 Nov 2020 13:52:23 -0800 From: Kees Cook To: Nathan Chancellor Cc: Masahiro Yamada , Michal Marek , Russell King , Catalin Marinas , Will Deacon , Michael Ellerman , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, Nick Desaulniers , Arvind Sankar , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, clang-built-linux@googlegroups.com Subject: Re: [PATCH 1/2] kbuild: Hoist '--orphan-handling' into Kconfig Message-ID: <202011171351.728E1194EF@keescook> References: <20201113195553.1487659-1-natechancellor@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201113195553.1487659-1-natechancellor@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org On Fri, Nov 13, 2020 at 12:55:52PM -0700, Nathan Chancellor wrote: > Currently, '--orphan-handling=warn' is spread out across four different > architectures in their respective Makefiles, which makes it a little > unruly to deal with in case it needs to be disabled for a specific > linker version (in this case, ld.lld 10.0.1). > > To make it easier to control this, hoist this warning into Kconfig and > the main Makefile so that disabling it is simpler, as the warning will > only be enabled in a couple places (main Makefile and a couple of > compressed boot folders that blow away LDFLAGS_vmlinx) and making it > conditional is easier due to Kconfig syntax. One small additional > benefit of this is saving a call to ld-option on incremental builds > because we will have already evaluated it for CONFIG_LD_ORPHAN_WARN. > > To keep the list of supported architectures the same, introduce > CONFIG_ARCH_WANT_LD_ORPHAN_WARN, which an architecture can select to > gain this automatically after all of the sections are specified and size > asserted. A special thanks to Kees Cook for the help text on this > config. > > Link: https://github.com/ClangBuiltLinux/linux/issues/1187 > Signed-off-by: Nathan Chancellor Looks good to me. With the other suggestions from the thread added, please consider it: Acked-by: Kees Cook -- Kees Cook 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=-13.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 4B619C2D0E4 for ; Tue, 17 Nov 2020 21:55:54 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (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 32ED4222E9 for ; Tue, 17 Nov 2020 21:55:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="FumCDSza" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 32ED4222E9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4CbKWT05yXzDqJR for ; Wed, 18 Nov 2020 08:55:48 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=chromium.org (client-ip=2607:f8b0:4864:20::441; helo=mail-pf1-x441.google.com; envelope-from=keescook@chromium.org; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=FumCDSza; dkim-atps=neutral Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4CbKRc0fvBzDqWy for ; Wed, 18 Nov 2020 08:52:28 +1100 (AEDT) Received: by mail-pf1-x441.google.com with SMTP id q5so41321pfk.6 for ; Tue, 17 Nov 2020 13:52:27 -0800 (PST) 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=4XjG60ocQx4PkwGgrAEoZIyPUhnxDgPZrMBdqiIZG+4=; b=FumCDSzaVj4k7q4V2p0oNKAIKu0GYbAFc2SyCI1aqTxJUFpFoUH6T8PWWxOryTG19/ Q1zlGV6Di3ZGEwaZIfQcQ4NcdAXg07SmAHCYzmm4aemVr6P+UEqs5yTGo761PszGobNa LiUwMgr6+SbWyc3qbTPN/Ai3ee1ReodEOFMas= 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=4XjG60ocQx4PkwGgrAEoZIyPUhnxDgPZrMBdqiIZG+4=; b=ovtoeEzknstmIS6JGg489wK3llr/qtowjpJ6OZnYSdV3cBGKpfPi9rKkMu/BdlcfNZ g7t9ifNE9mmrylKbxDJJgMh1wY68GnPZDLSle4OW0snYlrEoJ95Z4DK0OaGkVDdu+7VO k0P5/bsv4318U36quqCcNc5niTRoUU4rV/1iEQgCw2Eqt/JnO204y4Hg9FIP0okz+ACs +0PxirmjBqcKrCLbhFqxqldpT2APFNC5Hdrq9xT+t2XJhBSjDxLqHE0yEmqFSCRg8gEt M3mYsT19udhwCOqGxBu0UwYaV8VW2/LGNDBcEYxW8xO+a3M9vtvIfwbx/1rwE1GUzwce j6UQ== X-Gm-Message-State: AOAM530mleT8RHUCo7D077ugaP8SncsqiL3KhrYPJnW6qNM2Jq0KVQgB 5bSFLrCzB0nY/uoa2qUAZ1b8lg== X-Google-Smtp-Source: ABdhPJwx/GwY1vsKuE+ZykhwdU5XFj+Q/8T4Jjrzzd8kbh1afM17NqsLxZ988EMini1U8GWrTVGnNg== X-Received: by 2002:a63:1445:: with SMTP id 5mr5119858pgu.357.1605649945756; Tue, 17 Nov 2020 13:52:25 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id b29sm1039089pgn.87.2020.11.17.13.52.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Nov 2020 13:52:24 -0800 (PST) Date: Tue, 17 Nov 2020 13:52:23 -0800 From: Kees Cook To: Nathan Chancellor Subject: Re: [PATCH 1/2] kbuild: Hoist '--orphan-handling' into Kconfig Message-ID: <202011171351.728E1194EF@keescook> References: <20201113195553.1487659-1-natechancellor@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201113195553.1487659-1-natechancellor@gmail.com> 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: Michal Marek , linux-kbuild@vger.kernel.org, Catalin Marinas , Masahiro Yamada , x86@kernel.org, Nick Desaulniers , Russell King , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Arvind Sankar , Ingo Molnar , Borislav Petkov , clang-built-linux@googlegroups.com, Thomas Gleixner , Will Deacon , linux-arm-kernel@lists.infradead.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Fri, Nov 13, 2020 at 12:55:52PM -0700, Nathan Chancellor wrote: > Currently, '--orphan-handling=warn' is spread out across four different > architectures in their respective Makefiles, which makes it a little > unruly to deal with in case it needs to be disabled for a specific > linker version (in this case, ld.lld 10.0.1). > > To make it easier to control this, hoist this warning into Kconfig and > the main Makefile so that disabling it is simpler, as the warning will > only be enabled in a couple places (main Makefile and a couple of > compressed boot folders that blow away LDFLAGS_vmlinx) and making it > conditional is easier due to Kconfig syntax. One small additional > benefit of this is saving a call to ld-option on incremental builds > because we will have already evaluated it for CONFIG_LD_ORPHAN_WARN. > > To keep the list of supported architectures the same, introduce > CONFIG_ARCH_WANT_LD_ORPHAN_WARN, which an architecture can select to > gain this automatically after all of the sections are specified and size > asserted. A special thanks to Kees Cook for the help text on this > config. > > Link: https://github.com/ClangBuiltLinux/linux/issues/1187 > Signed-off-by: Nathan Chancellor Looks good to me. With the other suggestions from the thread added, please consider it: Acked-by: Kees Cook -- Kees Cook 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=-13.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 96460C63697 for ; Tue, 17 Nov 2020 21:53:40 +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 10405221FC for ; Tue, 17 Nov 2020 21:53:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="a4FuZZn7"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="FumCDSza" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 10405221FC 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=3fiJZ2OTaKi9MUQCNoYEfgkZNrjXHSkSvoL/FGOfA20=; b=a4FuZZn7HP+tckFkZKKAleuOC +YnJxjSkaW6NjAAPSZ1IeHu2R3GJoIBMainRWu89cSG2qZLxdmdKyJkp1aoAgXsl0gCSETK+5QRfC GSyBy3QxkcXlkHVvLKNJD02Yr5P8iQGANEDig16z6F0hOJPXkGOANI4hnFPkJUaBo3oYCd3I/lOMF zowjnT/tt6ElQjpo8xGBh+ywKF2bsBDTCmvjAbigOcixCOeUrpHyN9CCIM6kjZfQY7EGBPhlbb2L5 rQrZMks7JlC886mG7Fq0LhkosD76bwI27bHlBRUBcTMrCUU+SPGE8YSmJFkQd2ggc5rlqyT0vfRCG 5F2kTmmJQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kf8tr-00007U-Bu; Tue, 17 Nov 2020 21:52:31 +0000 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kf8to-00006c-5f for linux-arm-kernel@lists.infradead.org; Tue, 17 Nov 2020 21:52:29 +0000 Received: by mail-pf1-x443.google.com with SMTP id c66so49123pfa.4 for ; Tue, 17 Nov 2020 13:52:27 -0800 (PST) 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=4XjG60ocQx4PkwGgrAEoZIyPUhnxDgPZrMBdqiIZG+4=; b=FumCDSzaVj4k7q4V2p0oNKAIKu0GYbAFc2SyCI1aqTxJUFpFoUH6T8PWWxOryTG19/ Q1zlGV6Di3ZGEwaZIfQcQ4NcdAXg07SmAHCYzmm4aemVr6P+UEqs5yTGo761PszGobNa LiUwMgr6+SbWyc3qbTPN/Ai3ee1ReodEOFMas= 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=4XjG60ocQx4PkwGgrAEoZIyPUhnxDgPZrMBdqiIZG+4=; b=UO+LEIalmyPBGCgrN0boVWX1fSYqki2z9kZCgVyrkpiWg1I4hqFZAZiYSG88TJEZ9O hegffp0c1YOIHiDeChxIGeBx4JkiodMOXLWBEfrFgJDhxn2cSpx4dfOWPKQ7tVCDJEYR QaMPEOgvJJjgv8jJz0orJHdx8l2q/L+HpNIs768JmIFPYJkuFShEHJHsoYGf/aewR4yP M+3zurEiqqjbP7s21GoGRqt8k4iG9k8vmd9oFN+MsItL7e4Y2WHpEQeV5dtJzM6RM+60 /VTArz54sS618CUzz1EfZ+qn2DXa4Y8z0GlT6FzAnAKHCHJ86L26HMNFx269vDnHbu8L awbQ== X-Gm-Message-State: AOAM531NKR8Q3g93lnbpmsazPEBkd8GeApcRNr9vA8RbkOQuZ+L4GPSq Rr6q1z7xrogO6ZLeAr0xKoxUNA== X-Google-Smtp-Source: ABdhPJwx/GwY1vsKuE+ZykhwdU5XFj+Q/8T4Jjrzzd8kbh1afM17NqsLxZ988EMini1U8GWrTVGnNg== X-Received: by 2002:a63:1445:: with SMTP id 5mr5119858pgu.357.1605649945756; Tue, 17 Nov 2020 13:52:25 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id b29sm1039089pgn.87.2020.11.17.13.52.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Nov 2020 13:52:24 -0800 (PST) Date: Tue, 17 Nov 2020 13:52:23 -0800 From: Kees Cook To: Nathan Chancellor Subject: Re: [PATCH 1/2] kbuild: Hoist '--orphan-handling' into Kconfig Message-ID: <202011171351.728E1194EF@keescook> References: <20201113195553.1487659-1-natechancellor@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201113195553.1487659-1-natechancellor@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201117_165228_224278_8C1788D4 X-CRM114-Status: GOOD ( 20.00 ) 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: Michal Marek , linux-kbuild@vger.kernel.org, Catalin Marinas , Masahiro Yamada , x86@kernel.org, Nick Desaulniers , Russell King , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Arvind Sankar , Ingo Molnar , Borislav Petkov , clang-built-linux@googlegroups.com, Michael Ellerman , Thomas Gleixner , Will Deacon , linux-arm-kernel@lists.infradead.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, Nov 13, 2020 at 12:55:52PM -0700, Nathan Chancellor wrote: > Currently, '--orphan-handling=warn' is spread out across four different > architectures in their respective Makefiles, which makes it a little > unruly to deal with in case it needs to be disabled for a specific > linker version (in this case, ld.lld 10.0.1). > > To make it easier to control this, hoist this warning into Kconfig and > the main Makefile so that disabling it is simpler, as the warning will > only be enabled in a couple places (main Makefile and a couple of > compressed boot folders that blow away LDFLAGS_vmlinx) and making it > conditional is easier due to Kconfig syntax. One small additional > benefit of this is saving a call to ld-option on incremental builds > because we will have already evaluated it for CONFIG_LD_ORPHAN_WARN. > > To keep the list of supported architectures the same, introduce > CONFIG_ARCH_WANT_LD_ORPHAN_WARN, which an architecture can select to > gain this automatically after all of the sections are specified and size > asserted. A special thanks to Kees Cook for the help text on this > config. > > Link: https://github.com/ClangBuiltLinux/linux/issues/1187 > Signed-off-by: Nathan Chancellor Looks good to me. With the other suggestions from the thread added, please consider it: Acked-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