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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 DEE09C63777 for ; Mon, 30 Nov 2020 19:48:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 99BBA20674 for ; Mon, 30 Nov 2020 19:48:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728864AbgK3TsP (ORCPT ); Mon, 30 Nov 2020 14:48:15 -0500 Received: from mga03.intel.com ([134.134.136.65]:60307 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729194AbgK3TsO (ORCPT ); Mon, 30 Nov 2020 14:48:14 -0500 IronPort-SDR: Fa5ywpL0Q9iyDBlloG20yGVYGU8RVzRYsw5qJTFkETcY+uHZ7BgIkdfnrtGmlZ+1VL+8R+UBc2 /RP1vwkxAFEA== X-IronPort-AV: E=McAfee;i="6000,8403,9821"; a="172800330" X-IronPort-AV: E=Sophos;i="5.78,382,1599548400"; d="scan'208";a="172800330" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2020 11:47:33 -0800 IronPort-SDR: orzMZuJ32woFCZ7q36QfA9/NJY3Ac/tcD/xJWvuX5MZfyK9drPO8O/V1TgLerY62KI4YLy9zco QzvT6RXgKkIA== X-IronPort-AV: E=Sophos;i="5.78,382,1599548400"; d="scan'208";a="372623976" Received: from yyu32-mobl1.amr.corp.intel.com (HELO [10.212.122.22]) ([10.212.122.22]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2020 11:47:32 -0800 Subject: Re: [PATCH v15 01/26] Documentation/x86: Add CET description To: =?UTF-8?B?RsSBbmctcnXDrCBTw7JuZw==?= Cc: Nick Desaulniers , Dave P Martin , Arnd Bergmann , Borislav Petkov , bsingharora@gmail.com, Jonathan Corbet , dave.hansen@linux.intel.com, esyr@redhat.com, Florian Weimer , gorcunov@gmail.com, "H.J. Lu" , "H. Peter Anvin" , jannh@google.com, Kees Cook , linux-api@vger.kernel.org, linux-arch , Linux Doc Mailing List , LKML , linux-mm@kvack.org, luto@kernel.org, mike.kravetz@oracle.com, Ingo Molnar , nadav.amit@gmail.com, oleg@redhat.com, pavel@ucw.cz, pengfei.xu@intel.com, Peter Zijlstra , ravi.v.shankar@intel.com, Randy Dunlap , Thomas Gleixner , vedvyas.shanbhogue@intel.com, weijiang.yang@intel.com, X86 ML , Luis Lozano , clang-built-linux , erich.keane@intel.com References: <20201110162211.9207-2-yu-cheng.yu@intel.com> <20201130182641.29812-1-ndesaulniers@google.com> <4fad528b-e467-f96d-b7fb-9484fd975886@intel.com> From: "Yu, Yu-cheng" Message-ID: Date: Mon, 30 Nov 2020 11:47:31 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On 11/30/2020 11:38 AM, Fāng-ruì Sòng wrote: > On Mon, Nov 30, 2020 at 10:34 AM Yu, Yu-cheng wrote: >> >> On 11/30/2020 10:26 AM, Nick Desaulniers wrote: >>> (In response to https://lore.kernel.org/lkml/20201110162211.9207-2-yu-cheng.yu@intel.com/) >>> >>>> These need to be enabled to build a CET-enabled kernel, and Binutils v2.31 >>>> and GCC v8.1 or later are required to build a CET kernel. >>> >>> What about LLVM? Surely CrOS might be of interest to ship this on (we ship the >>> equivalent for aarch64 on Android). >>> >> >> I have not built with LLVM, but think it probably will work as well. I >> will test it. >> >>>> An application's CET capability is marked in its ELF header and can be >>>> verified from the following command output, in the NT_GNU_PROPERTY_TYPE_0 >>>> field: >>>> >>>> readelf -n | grep SHSTK >>>> properties: x86 feature: IBT, SHSTK >>> >>> Same for llvm-readelf. >>> >> >> I will add that to the document. >> >> Thanks, >> Yu-cheng > > The baseline LLVM version is 10.0.1, which is good enough for clang > -fcf-protection=full, llvm-readelf -n, LLD's .note.gnu.property > handling (the LLD option is `-z force-ibt`, though) > > Thanks! Yu-cheng