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 0CBF3C5519F for ; Sat, 21 Nov 2020 00:09:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AEC2623A65 for ; Sat, 21 Nov 2020 00:09:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="jdjYaxbU" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728065AbgKUAIr (ORCPT ); Fri, 20 Nov 2020 19:08:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726426AbgKUAIr (ORCPT ); Fri, 20 Nov 2020 19:08:47 -0500 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A17ADC061A04 for ; Fri, 20 Nov 2020 16:08:45 -0800 (PST) Received: by mail-pf1-x443.google.com with SMTP id a18so9442122pfl.3 for ; Fri, 20 Nov 2020 16:08:45 -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=ZrI6T0ydbBGHVkvNAITM1/rIzBX4TKDzD+4JBPsjVAU=; b=jdjYaxbUzlqk4snx5STJs9c411mkqGRvaAvaha/amTKXJU9fZPQWsoZ8Ed3KIQw4ja mBRbalwnztTkPDbdJI5G2sIfrSCr7If5HYlFrLCJbofKQbI0ZoWG8UUmNU8xPtQqLFiR RQcHeEoMBRUOZMePca3LRVAiz6fVXCeRkfjAQ= 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=ZrI6T0ydbBGHVkvNAITM1/rIzBX4TKDzD+4JBPsjVAU=; b=ZuUOIrSUwCLgLdQAyOJkU1lUywFu157xYZTX8WEbe4qTgr3CNSf71V77/f88ubojKv DznY6/zXhTP64hTlpEnFL2YAL+NiYLmH6KLr1Xi/AfiWBvuxE+aX6DEEKVO2Uh2hsFl5 y7gKm4LDz/yE5U/Z8FrbG+8h8r60cB52LTGvLb6SQtdd5iGJTk2scBJcUGzmmo88AaT8 jkjirPQOg+tJdbR2X9sbXvCrTxuQ5vs+4EWMhE5pFWcMVc1JeuMWZviO05xNU7ng9ieG 6TSngDsyTr3bOxhfVt1dMhs0ff6bxfkuBphdeZgPLwpZ9TCzvLNCFMLIkwxNWBCXi9p7 wuJw== X-Gm-Message-State: AOAM530eND3J9O3QG7VTAANuleq40pzi7cG+KmTUlvlD53cTDzX48H5K 4lX4rtYJIYgdoNT47jCT36HhCA== X-Google-Smtp-Source: ABdhPJz2VCMT0GkwPGQ5DfLfgvDeslgTacR3q9aKQe4GBKPv6eKou3aGHdxLiBBAYPFreVGoa8LMSA== X-Received: by 2002:a62:cd0d:0:b029:18b:a1cc:a5be with SMTP id o13-20020a62cd0d0000b029018ba1cca5bemr16150890pfg.67.1605917325096; Fri, 20 Nov 2020 16:08:45 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id fu5sm5201126pjb.11.2020.11.20.16.08.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Nov 2020 16:08:44 -0800 (PST) Date: Fri, 20 Nov 2020 16:08:43 -0800 From: Kees Cook To: Masahiro Yamada Cc: Nathan Chancellor , 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 v2 1/2] kbuild: Hoist '--orphan-handling' into Kconfig Message-ID: <202011201607.75FA476@keescook> References: <20201113195553.1487659-1-natechancellor@gmail.com> <20201119204656.3261686-1-natechancellor@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201119204656.3261686-1-natechancellor@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 19, 2020 at 01:46:56PM -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 > Acked-by: Kees Cook > Acked-by: Michael Ellerman (powerpc) > Reviewed-by: Nick Desaulniers > Tested-by: Nick Desaulniers > Signed-off-by: Nathan Chancellor Masahiro, do you want to take these to get them to Linus for v5.10? I can send them if you'd prefer. -Kees -- 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.6 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 CE4A4C2D0E4 for ; Sat, 21 Nov 2020 00:10:25 +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 B86A122470 for ; Sat, 21 Nov 2020 00:10:24 +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="jdjYaxbU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B86A122470 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 4CdDMK6ZDszDr4m for ; Sat, 21 Nov 2020 11:10:21 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=chromium.org (client-ip=2607:f8b0:4864:20::443; helo=mail-pf1-x443.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=jdjYaxbU; dkim-atps=neutral Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) (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 4CdDKZ4t5HzDr0d for ; Sat, 21 Nov 2020 11:08:48 +1100 (AEDT) Received: by mail-pf1-x443.google.com with SMTP id c66so9444950pfa.4 for ; Fri, 20 Nov 2020 16:08:48 -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=ZrI6T0ydbBGHVkvNAITM1/rIzBX4TKDzD+4JBPsjVAU=; b=jdjYaxbUzlqk4snx5STJs9c411mkqGRvaAvaha/amTKXJU9fZPQWsoZ8Ed3KIQw4ja mBRbalwnztTkPDbdJI5G2sIfrSCr7If5HYlFrLCJbofKQbI0ZoWG8UUmNU8xPtQqLFiR RQcHeEoMBRUOZMePca3LRVAiz6fVXCeRkfjAQ= 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=ZrI6T0ydbBGHVkvNAITM1/rIzBX4TKDzD+4JBPsjVAU=; b=hiyQqrjp7zl0pdQvOBXAwj/8WtFRs3f5eONP8G3bKdy+AFR6Ib+JZzBug23lyBUfkx uzFRw7yw+ZHxd0LIdqpuHkaVLgkxQxlKtUw4vtqja77bVU1DqJ42xOsv1IrboAfJPsm4 YdLSxONEI2dPNIonAdDey1vpBDB32FhzWwb5QybPFTNYRfePdN0wutlTkqIh4WMPdUTS b5yyQwtaH9uCVPncdyUt9Cqo7hQES7GYL93/QagvJb/EStuU4yrDIfwPDrrz8yHKAgoo 5bSq9oDhlVVLeFqz5QnX8s/78QlnhuCFozsuUPXpRl+99ceYNwQGEMe3eTQoyOBl1z0Z 0RKg== X-Gm-Message-State: AOAM530ZhtHhvIS6u3TSrgdFYGVTCHH3fJ+F9TE6Kkd19a6tJOSrA2pC eQo5u4XNXM+LTA5gOIDwivCqag== X-Google-Smtp-Source: ABdhPJz2VCMT0GkwPGQ5DfLfgvDeslgTacR3q9aKQe4GBKPv6eKou3aGHdxLiBBAYPFreVGoa8LMSA== X-Received: by 2002:a62:cd0d:0:b029:18b:a1cc:a5be with SMTP id o13-20020a62cd0d0000b029018ba1cca5bemr16150890pfg.67.1605917325096; Fri, 20 Nov 2020 16:08:45 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id fu5sm5201126pjb.11.2020.11.20.16.08.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Nov 2020 16:08:44 -0800 (PST) Date: Fri, 20 Nov 2020 16:08:43 -0800 From: Kees Cook To: Masahiro Yamada Subject: Re: [PATCH v2 1/2] kbuild: Hoist '--orphan-handling' into Kconfig Message-ID: <202011201607.75FA476@keescook> References: <20201113195553.1487659-1-natechancellor@gmail.com> <20201119204656.3261686-1-natechancellor@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201119204656.3261686-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 , 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, Nathan Chancellor , Will Deacon , Thomas Gleixner , linux-arm-kernel@lists.infradead.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Thu, Nov 19, 2020 at 01:46:56PM -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 > Acked-by: Kees Cook > Acked-by: Michael Ellerman (powerpc) > Reviewed-by: Nick Desaulniers > Tested-by: Nick Desaulniers > Signed-off-by: Nathan Chancellor Masahiro, do you want to take these to get them to Linus for v5.10? I can send them if you'd prefer. -Kees -- 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 A5449C2D0E4 for ; Sat, 21 Nov 2020 00:09:30 +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 36CA722470 for ; Sat, 21 Nov 2020 00:09:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="c7bBSmHq"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="jdjYaxbU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 36CA722470 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=BDhTyY5kve6uOktbFxlniPIyEDTMO8vtKCMpavYkerI=; b=c7bBSmHqZyE6Tifzgxdsk0caw p3KFMTJl0K0+SbaCOaXWUVUAwyXnGQe2A8jssixCJ9zpSJw1M5IUVkmPNpM5gdxDCjJujVccxC2k+ CJrHTOFD7MWp1Oek3O38E3yUbFvZpW0I8EhsLXYebA57opiTKvaOsXhJAi9qeHXbTju9ctvnJVe6j unQkeNYfqaAtChXE1ZQcB+ysp8TvkwGujkpb43XkAWVebcYHpIjSXAT6j/za9WedEKpXtbouRtb3y KMI9AMnnDhBOs+yHCJiPIilh4ZN+nSNGu/6IpGLrYxG1PsYhUAjMc8PNSqd/kHRRtP1pnNRddrs7w XTw/A8KbA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kgGSQ-0000wv-NZ; Sat, 21 Nov 2020 00:08:50 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kgGSN-0000wW-Ft for linux-arm-kernel@lists.infradead.org; Sat, 21 Nov 2020 00:08:48 +0000 Received: by mail-pf1-x444.google.com with SMTP id w6so9457975pfu.1 for ; Fri, 20 Nov 2020 16:08:46 -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=ZrI6T0ydbBGHVkvNAITM1/rIzBX4TKDzD+4JBPsjVAU=; b=jdjYaxbUzlqk4snx5STJs9c411mkqGRvaAvaha/amTKXJU9fZPQWsoZ8Ed3KIQw4ja mBRbalwnztTkPDbdJI5G2sIfrSCr7If5HYlFrLCJbofKQbI0ZoWG8UUmNU8xPtQqLFiR RQcHeEoMBRUOZMePca3LRVAiz6fVXCeRkfjAQ= 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=ZrI6T0ydbBGHVkvNAITM1/rIzBX4TKDzD+4JBPsjVAU=; b=HXutpemkYnVdHU5aCVLvk8LIwiDPzXebs2JdiLpHV5SOqTe0v4VJ/GzmLfUW02NTNK VbBQ6/KPz705DcJoaFSS3HGNUjBlaVvqFrub6c4TASOLqvqCBnOzjuPIBc3H9tBLIbiJ kg6kVR9MldRQE8YWdzs6/R+WXkuGn+0fNbsowQ+kQ1rtzFkDb1Oo72QRhzVM+s2uVOKd P3idICkdeyFFTruLppYyeW/wgoBxw+SpcCpkT4U6LFbfA6/Iwuh+NE3+qNN99U8Pc6Pb SG+bydbh3XB13a9TlehKNIOGR+5YNmSHtxFv9yElWv8OXEBwS35ggecXEYQe3A9WNil3 wR+A== X-Gm-Message-State: AOAM533IYna+XtJ1m79F4eeP8E5w2qolLJgUpNIpaw2fEBcLsOE0sydI v4ktZGFkMzyatLUwLdfKTQ+QdWhmb85vim7W X-Google-Smtp-Source: ABdhPJz2VCMT0GkwPGQ5DfLfgvDeslgTacR3q9aKQe4GBKPv6eKou3aGHdxLiBBAYPFreVGoa8LMSA== X-Received: by 2002:a62:cd0d:0:b029:18b:a1cc:a5be with SMTP id o13-20020a62cd0d0000b029018ba1cca5bemr16150890pfg.67.1605917325096; Fri, 20 Nov 2020 16:08:45 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id fu5sm5201126pjb.11.2020.11.20.16.08.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Nov 2020 16:08:44 -0800 (PST) Date: Fri, 20 Nov 2020 16:08:43 -0800 From: Kees Cook To: Masahiro Yamada Subject: Re: [PATCH v2 1/2] kbuild: Hoist '--orphan-handling' into Kconfig Message-ID: <202011201607.75FA476@keescook> References: <20201113195553.1487659-1-natechancellor@gmail.com> <20201119204656.3261686-1-natechancellor@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201119204656.3261686-1-natechancellor@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201120_190847_584318_7D89A1BB X-CRM114-Status: GOOD ( 20.27 ) 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 , 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 , Nathan Chancellor , Will Deacon , Thomas Gleixner , 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 Thu, Nov 19, 2020 at 01:46:56PM -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 > Acked-by: Kees Cook > Acked-by: Michael Ellerman (powerpc) > Reviewed-by: Nick Desaulniers > Tested-by: Nick Desaulniers > Signed-off-by: Nathan Chancellor Masahiro, do you want to take these to get them to Linus for v5.10? I can send them if you'd prefer. -Kees -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel