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.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL 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 A895DC4167B for ; Sun, 6 Dec 2020 20:10:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7E76D2310B for ; Sun, 6 Dec 2020 20:10:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727780AbgLFUKZ (ORCPT ); Sun, 6 Dec 2020 15:10:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727511AbgLFUKY (ORCPT ); Sun, 6 Dec 2020 15:10:24 -0500 Received: from mail-ua1-x943.google.com (mail-ua1-x943.google.com [IPv6:2607:f8b0:4864:20::943]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6283C0613D3 for ; Sun, 6 Dec 2020 12:09:43 -0800 (PST) Received: by mail-ua1-x943.google.com with SMTP id q68so3795088uaq.3 for ; Sun, 06 Dec 2020 12:09:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=iz05We4T6eIjQaXBvxz0eSpPimwSlGMKW8WGflLLLgw=; b=iS/yxV/uv33bWygYcp3w94mm68WCg/cooZBDHGRBRFCb+HEVGfBEws+dpr/6P25Mqk CGF0txaBIDtDjqi1yLxaRHzbKNu312tAIiWry1c6H2XUemwifDXDJ3xgms3nJQh018Ju tSfem3j42gdxUipuE2UCBGdP6HbCXjgyA35rk3ybR2x5sUXsvaX34+w/11PCnDP3wUw3 VXU3d3GrfxpXDM3mNsWNN8WzS04oerefikrSUgI3Sa41DzU+d/SyYsbVuDLVrcBbBAFd TPfpfk+LViEDwCmkthUfnAh26cBtd4O/zl0ILiNY2vgWj3ccwdwRthGGUZbaHtAB4IuL 4E/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=iz05We4T6eIjQaXBvxz0eSpPimwSlGMKW8WGflLLLgw=; b=g5zyHfB47jTNfJHRs2o+QwMOc+4Y5kXuUf4RszDFCpX+5XROFGa+aM5E+h8cuYDh8e QUbJ3dFp+q3Ea9tIY0YyMsGNQ9sf5rADDfJiqzLQOK9cZoXzaA2q+hyHk4WXSI8V+9kP lOIELVnC5doYeYOvItRRPdX1+L2NNVcca8CZPisp9F3xelTFBMDap7SBCSduwr3PmCm9 SIDTvHA+gbMnFBWcfiUJq2VqqQ4BcHnqiAKsc0dCLedOsbNoBR88zNClBh2jGqVYUKVZ KIHE9V1KGwCg4V6KvTs08yaWUEGheKGm5R3vq1A6vAokC77WbWFdLV1qBXNIk/rGBdsD ZELQ== X-Gm-Message-State: AOAM533N4D6o8QckULL2hxwqy4zJ6AHkmWYNTVRu/UcOgwoknBg7JBEh EfZZBeWS8iLTCyHGQJXHj5BiP9GfJVhbz2/zRgMDUA== X-Google-Smtp-Source: ABdhPJyKCb8VYAdpRAyuT9QnDEa4WUbLFAwf7yIvP0eytyeCFIBxggFhwRm1Itv8d1sjhOU4I4dMU+iMqgn79bJuOn0= X-Received: by 2002:ab0:6f0f:: with SMTP id r15mr3484878uah.52.1607285382144; Sun, 06 Dec 2020 12:09:42 -0800 (PST) MIME-Version: 1.0 References: <20201201213707.541432-1-samitolvanen@google.com> <20201203112622.GA31188@willie-the-truck> <20201203182252.GA32011@willie-the-truck> <20201206065028.GA2819096@ubuntu-m3-large-x86> In-Reply-To: <20201206065028.GA2819096@ubuntu-m3-large-x86> From: Sami Tolvanen Date: Sun, 6 Dec 2020 12:09:31 -0800 Message-ID: Subject: Re: [PATCH v8 00/16] Add support for Clang LTO To: Nathan Chancellor Cc: Nick Desaulniers , Will Deacon , Masahiro Yamada , Steven Rostedt , Josh Poimboeuf , Peter Zijlstra , Greg Kroah-Hartman , "Paul E. McKenney" , Kees Cook , clang-built-linux , Kernel Hardening , linux-arch , linux-arm-kernel , linux-kbuild , LKML , PCI , Jian Cai , Kristof Beyls Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Dec 5, 2020 at 10:50 PM Nathan Chancellor wrote: > > On Fri, Dec 04, 2020 at 02:52:41PM -0800, Sami Tolvanen wrote: > > On Thu, Dec 3, 2020 at 2:32 PM Nick Desaulniers wrote: > > > > > > So I'd recommend to Sami to simply make the Kconfig also depend on > > > clang's integrated assembler (not just llvm-nm and llvm-ar). > > > > Sure, sounds good to me. What's the preferred way to test for this in Kconfig? > > > > It looks like actually trying to test if we have an LLVM assembler > > (e.g. using $(as-instr,.section > > ".linker-options","e",@llvm_linker_options)) doesn't work as Kconfig > > doesn't pass -no-integrated-as to clang here. After a closer look, that's actually not correct, this seems to work with Clang+LLD no matter which assembler is used. I suppose we could test for .gasversion. to detect GNU as, but that's hardly ideal. > >I could do something > > simple like $(success,echo $(LLVM) $(LLVM_IAS) | grep -q "1 1"). > > > > Thoughts? > > > > Sami > > I think > > depends on $(success,test $(LLVM_IAS) -eq 1) > > should work, at least according to my brief test. Sure, looks good to me. However, I think we should also test for LLVM=1 to avoid possible further issues with mismatched toolchains instead of only checking for llvm-nm and llvm-ar. Sami 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=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 91758C4361B for ; Sun, 6 Dec 2020 20:11:41 +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 3E6182310B for ; Sun, 6 Dec 2020 20:11:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3E6182310B Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com 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:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=p7arSBSayeMYCHewh3LmB9ZEf5SVmqeKlaB1D73685U=; b=zTdXs8xoo8zuhVmkaIxeXNIby yBX0w0+pyjaQHNEiijaNcdQjJO0p0NUjggjlfyU4kaj77/OSBgZsqmpBocP3r1zrT9KZWd+2YaF8Z 6J/MlJkRKf3zfLderjMXVayJHxmHrjWmDTvorP9H+IwAXxO6QjT2zBfo8FLIC/3m9K+/AzLPAMev3 wpnzgkeWMEgESpNKDVdfKIHVrZjnSxJFav1P80f12KVTiBKnKqdGowUBw/DdSRqZA4TTzdJ0Vsfva nhBwEg+qbyE2oiYft7Md+KeQlOm0nPcTtKqY1wq5aKroJe5XWP8S7FxDqPXaiWfbD4CLo1NKyVJwH lvKkPrJng==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1km0Ls-00022r-LJ; Sun, 06 Dec 2020 20:09:48 +0000 Received: from mail-ua1-x941.google.com ([2607:f8b0:4864:20::941]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1km0Lq-00022G-5J for linux-arm-kernel@lists.infradead.org; Sun, 06 Dec 2020 20:09:47 +0000 Received: by mail-ua1-x941.google.com with SMTP id y26so3797181uan.5 for ; Sun, 06 Dec 2020 12:09:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=iz05We4T6eIjQaXBvxz0eSpPimwSlGMKW8WGflLLLgw=; b=iS/yxV/uv33bWygYcp3w94mm68WCg/cooZBDHGRBRFCb+HEVGfBEws+dpr/6P25Mqk CGF0txaBIDtDjqi1yLxaRHzbKNu312tAIiWry1c6H2XUemwifDXDJ3xgms3nJQh018Ju tSfem3j42gdxUipuE2UCBGdP6HbCXjgyA35rk3ybR2x5sUXsvaX34+w/11PCnDP3wUw3 VXU3d3GrfxpXDM3mNsWNN8WzS04oerefikrSUgI3Sa41DzU+d/SyYsbVuDLVrcBbBAFd TPfpfk+LViEDwCmkthUfnAh26cBtd4O/zl0ILiNY2vgWj3ccwdwRthGGUZbaHtAB4IuL 4E/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=iz05We4T6eIjQaXBvxz0eSpPimwSlGMKW8WGflLLLgw=; b=XwpRKxr3f2ixYoh3Q0BkSd7vSAcEQCe1liUWYtBVjI1EHGWPLmwc09oA42YteRs9Gp R187/8UR71BVb8miGDUMneEE5DzXkJ2OCvthrJPaSyFWYsUTWKT1e+W8hBpQpmvNoBkf lY00b8dYd1Ur848Kl32MlZis5Y7CQOoIZm3nlP8V9jyltuADC3qZ4NC2v3Oiyjd7UBrj 8uGrRpSu4Gvqm6H5q+em9kBm6w2U+d89Vf+CSOcNDhjfX/5zQ+9f1t154I7r1yqCz9JO 8EaobqmL30+7fIkdnu61YP7PUMPhfMdhtRZGsHu3q4Hv5VlhXlMjdzln8+N4zhgNZdjz egqQ== X-Gm-Message-State: AOAM531CNI0KENNFTiQLIvYj97YkpH6zRCZroK2qB2YlIzBrxb2grhwb k0dTjAysmiE4qnZZLhNuK7ShGoVd70fWaEIrRRvOEw== X-Google-Smtp-Source: ABdhPJyKCb8VYAdpRAyuT9QnDEa4WUbLFAwf7yIvP0eytyeCFIBxggFhwRm1Itv8d1sjhOU4I4dMU+iMqgn79bJuOn0= X-Received: by 2002:ab0:6f0f:: with SMTP id r15mr3484878uah.52.1607285382144; Sun, 06 Dec 2020 12:09:42 -0800 (PST) MIME-Version: 1.0 References: <20201201213707.541432-1-samitolvanen@google.com> <20201203112622.GA31188@willie-the-truck> <20201203182252.GA32011@willie-the-truck> <20201206065028.GA2819096@ubuntu-m3-large-x86> In-Reply-To: <20201206065028.GA2819096@ubuntu-m3-large-x86> From: Sami Tolvanen Date: Sun, 6 Dec 2020 12:09:31 -0800 Message-ID: Subject: Re: [PATCH v8 00/16] Add support for Clang LTO To: Nathan Chancellor X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201206_150946_290231_98DFBA39 X-CRM114-Status: GOOD ( 19.44 ) 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-arch , Kees Cook , "Paul E. McKenney" , Kernel Hardening , Peter Zijlstra , Greg Kroah-Hartman , Masahiro Yamada , linux-kbuild , Nick Desaulniers , LKML , Steven Rostedt , Jian Cai , clang-built-linux , PCI , Josh Poimboeuf , Kristof Beyls , Will Deacon , linux-arm-kernel 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 Sat, Dec 5, 2020 at 10:50 PM Nathan Chancellor wrote: > > On Fri, Dec 04, 2020 at 02:52:41PM -0800, Sami Tolvanen wrote: > > On Thu, Dec 3, 2020 at 2:32 PM Nick Desaulniers wrote: > > > > > > So I'd recommend to Sami to simply make the Kconfig also depend on > > > clang's integrated assembler (not just llvm-nm and llvm-ar). > > > > Sure, sounds good to me. What's the preferred way to test for this in Kconfig? > > > > It looks like actually trying to test if we have an LLVM assembler > > (e.g. using $(as-instr,.section > > ".linker-options","e",@llvm_linker_options)) doesn't work as Kconfig > > doesn't pass -no-integrated-as to clang here. After a closer look, that's actually not correct, this seems to work with Clang+LLD no matter which assembler is used. I suppose we could test for .gasversion. to detect GNU as, but that's hardly ideal. > >I could do something > > simple like $(success,echo $(LLVM) $(LLVM_IAS) | grep -q "1 1"). > > > > Thoughts? > > > > Sami > > I think > > depends on $(success,test $(LLVM_IAS) -eq 1) > > should work, at least according to my brief test. Sure, looks good to me. However, I think we should also test for LLVM=1 to avoid possible further issues with mismatched toolchains instead of only checking for llvm-nm and llvm-ar. Sami _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL 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 9136EC433FE for ; Sun, 6 Dec 2020 20:10:05 +0000 (UTC) Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.kernel.org (Postfix) with SMTP id 504582310B for ; Sun, 6 Dec 2020 20:10:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 504582310B Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernel-hardening-return-20537-kernel-hardening=archiver.kernel.org@lists.openwall.com Received: (qmail 20063 invoked by uid 550); 6 Dec 2020 20:09:55 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Received: (qmail 20036 invoked from network); 6 Dec 2020 20:09:54 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=iz05We4T6eIjQaXBvxz0eSpPimwSlGMKW8WGflLLLgw=; b=iS/yxV/uv33bWygYcp3w94mm68WCg/cooZBDHGRBRFCb+HEVGfBEws+dpr/6P25Mqk CGF0txaBIDtDjqi1yLxaRHzbKNu312tAIiWry1c6H2XUemwifDXDJ3xgms3nJQh018Ju tSfem3j42gdxUipuE2UCBGdP6HbCXjgyA35rk3ybR2x5sUXsvaX34+w/11PCnDP3wUw3 VXU3d3GrfxpXDM3mNsWNN8WzS04oerefikrSUgI3Sa41DzU+d/SyYsbVuDLVrcBbBAFd TPfpfk+LViEDwCmkthUfnAh26cBtd4O/zl0ILiNY2vgWj3ccwdwRthGGUZbaHtAB4IuL 4E/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=iz05We4T6eIjQaXBvxz0eSpPimwSlGMKW8WGflLLLgw=; b=oVi9SZNwosmgtcmCT6D+Rx/ZB3QU8Q7rYeb89d4d8N+ky1YkRiVUry7lwS3usG2OfX wb8IaKIWad5xGAjxAi1KMQdJPZJQmAJPTrRiYLeq0CYgRNO25FrZYhGu9ykYY8vTFu3f 0YUKHr9U722w3cnjlQ8+4L8w7rdjWtSacVDFHp6NrN3qh+ZgKtIaUAwwbRm7eS3ysSJM NrAQhmbfHjbXy76iepEQTIZTH97jMcPQmPEYZ/uoFvnFHCxxbUMDHDrzbS/0cVRM3LSs X/Ml0zmWiQ14H6k9l9rAl9vYUuDaiPsWlbV2s5KKGMI4RSgZtNigfEw9eocOs6XlqWMv CIxw== X-Gm-Message-State: AOAM531NfEUtHCHQm7Nd70jCoHKNxbb3qLIBk+5eiBCCJ83qkyv4ZLJh poB77irO/xWLJINAuyUyTytPVA4uWCugnrySLrXf+g== X-Google-Smtp-Source: ABdhPJyKCb8VYAdpRAyuT9QnDEa4WUbLFAwf7yIvP0eytyeCFIBxggFhwRm1Itv8d1sjhOU4I4dMU+iMqgn79bJuOn0= X-Received: by 2002:ab0:6f0f:: with SMTP id r15mr3484878uah.52.1607285382144; Sun, 06 Dec 2020 12:09:42 -0800 (PST) MIME-Version: 1.0 References: <20201201213707.541432-1-samitolvanen@google.com> <20201203112622.GA31188@willie-the-truck> <20201203182252.GA32011@willie-the-truck> <20201206065028.GA2819096@ubuntu-m3-large-x86> In-Reply-To: <20201206065028.GA2819096@ubuntu-m3-large-x86> From: Sami Tolvanen Date: Sun, 6 Dec 2020 12:09:31 -0800 Message-ID: Subject: Re: [PATCH v8 00/16] Add support for Clang LTO To: Nathan Chancellor Cc: Nick Desaulniers , Will Deacon , Masahiro Yamada , Steven Rostedt , Josh Poimboeuf , Peter Zijlstra , Greg Kroah-Hartman , "Paul E. McKenney" , Kees Cook , clang-built-linux , Kernel Hardening , linux-arch , linux-arm-kernel , linux-kbuild , LKML , PCI , Jian Cai , Kristof Beyls Content-Type: text/plain; charset="UTF-8" On Sat, Dec 5, 2020 at 10:50 PM Nathan Chancellor wrote: > > On Fri, Dec 04, 2020 at 02:52:41PM -0800, Sami Tolvanen wrote: > > On Thu, Dec 3, 2020 at 2:32 PM Nick Desaulniers wrote: > > > > > > So I'd recommend to Sami to simply make the Kconfig also depend on > > > clang's integrated assembler (not just llvm-nm and llvm-ar). > > > > Sure, sounds good to me. What's the preferred way to test for this in Kconfig? > > > > It looks like actually trying to test if we have an LLVM assembler > > (e.g. using $(as-instr,.section > > ".linker-options","e",@llvm_linker_options)) doesn't work as Kconfig > > doesn't pass -no-integrated-as to clang here. After a closer look, that's actually not correct, this seems to work with Clang+LLD no matter which assembler is used. I suppose we could test for .gasversion. to detect GNU as, but that's hardly ideal. > >I could do something > > simple like $(success,echo $(LLVM) $(LLVM_IAS) | grep -q "1 1"). > > > > Thoughts? > > > > Sami > > I think > > depends on $(success,test $(LLVM_IAS) -eq 1) > > should work, at least according to my brief test. Sure, looks good to me. However, I think we should also test for LLVM=1 to avoid possible further issues with mismatched toolchains instead of only checking for llvm-nm and llvm-ar. Sami