Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1469739pxk; Fri, 18 Sep 2020 13:26:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCfPu9qrGv0REqcZ7/c8O2uOmzdbI2ych48DWY9aZJQmSlQn7kmzYECGZPm1dFM/XCORU6 X-Received: by 2002:a17:906:70d4:: with SMTP id g20mr39797838ejk.413.1600460775865; Fri, 18 Sep 2020 13:26:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600460775; cv=none; d=google.com; s=arc-20160816; b=LcEUwfOxrJm5Qs0guQSIH8GUBVZBjuHoYj72PEU0VW4EuuNUhY5ifr87jKagO/HHMD yjrxuK7m473v29nh+VkcyF7v4nvYCtJJRHk+Y/UCMedkXvLsO0kThimKIIsvSWarMNe2 3c8jfUmeJxpchEuCSFO5WL1kXFAEKzsQ/R6kei/ETloPWBdJm1XmU0DMFpOimv7qSNs7 4oftvLEiIAtyLCyZRAzdbLBvifO8LS87AYAuVfdbI5we5uMS7+cd1gnMBEngVObZkA+N jwgrinsJA7x0zWveXX9Shqn7qws9kEX+5u11kM5N+dug+J3dEOB6FrAWeyLjM6en/s0w NJ5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject:dkim-signature; bh=yAMhSupJBbZkPaKwYOyhZeq16yiQVbhqGBu9I9QwZJ8=; b=siRPF2u0RuiDilSTYlcepCJm2IWs16ZUov2bC6OwE9ZZtSNoIsMDMshva9hb0EVLdq cVKg0lZ9YuyCnkjQXVreyMGZ2OYB6/EHILvYlQGWbrH49MOQ22cHJMvLLaNKJ46sNm9C vwf2/yd2u/u8jydn6JRO51Eqgqjl5g4aPh8zL1BguvXUdSzhlJc+1EepbEWq0Mm4Nnyv 5JOmRnO4BkaI797nfQG+NMMvcFBKwtPDnJAM2fHNLhM/D+nJMltUu5P9RD84kmuoVmsD 5/kfa1ntrATOx2+bsK5s8kThq2CORPhUpxUKM0nWyahyvrnT8kSRaK0lcq7NmGEyKDPK KnAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=RQptF1yK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id yj16si3348132ejb.751.2020.09.18.13.25.53; Fri, 18 Sep 2020 13:26:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=RQptF1yK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726481AbgIRUY5 (ORCPT + 99 others); Fri, 18 Sep 2020 16:24:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726118AbgIRUY5 (ORCPT ); Fri, 18 Sep 2020 16:24:57 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BEBF7C0613CE; Fri, 18 Sep 2020 13:24:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:To:Subject:Sender: Reply-To:Cc:Content-ID:Content-Description; bh=yAMhSupJBbZkPaKwYOyhZeq16yiQVbhqGBu9I9QwZJ8=; b=RQptF1yKQdaMfvH2IgafRgkWxV mb4GAZQaANOjCgO0bQShHHOeqS2Fcp47TLzLJDI7JZziWojmB1dMU84PNmdHFX1i32Gzma+r59q3u GMwDCEfkbwLX9j/GqqUmQGvVQeEDoFXotxbPGssyVoNds3EbNvzI9g1X7+bPPyGT6enQhQZMr+C3F pt6pAhDnei4+UsHrvmwbIz77O0NrQp9r+A7ma4dnzItBuSqCjJrl+U2ojV0opWzF1X+dzvOk87QG3 UTXBWdFVyKRX+mCkCmNvb96C24bp866cQi972lyvXFgg4J0TsaCmL5ee5aYdFV/ivgsIGiYfQFz2H 9i++2+3g==; Received: from [2601:1c0:6280:3f0::19c2] by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJMve-0005x8-EQ; Fri, 18 Sep 2020 20:24:22 +0000 Subject: Re: [PATCH v12 1/8] x86/cet/ibt: Add Kconfig option for user-mode Indirect Branch Tracking To: Yu-cheng Yu , x86@kernel.org, "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org, Arnd Bergmann , Andy Lutomirski , Balbir Singh , Borislav Petkov , Cyrill Gorcunov , Dave Hansen , Eugene Syromiatnikov , Florian Weimer , "H.J. Lu" , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , Peter Zijlstra , "Ravi V. Shankar" , Vedvyas Shanbhogue , Dave Martin , Weijiang Yang References: <20200918192312.25978-1-yu-cheng.yu@intel.com> <20200918192312.25978-2-yu-cheng.yu@intel.com> From: Randy Dunlap Message-ID: Date: Fri, 18 Sep 2020 13:24:13 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20200918192312.25978-2-yu-cheng.yu@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, If you do another version of this: On 9/18/20 12:23 PM, Yu-cheng Yu wrote: > Introduce Kconfig option X86_INTEL_BRANCH_TRACKING_USER. > > Indirect Branch Tracking (IBT) provides protection against CALL-/JMP- > oriented programming attacks. It is active when the kernel has this > feature enabled, and the processor and the application support it. > When this feature is enabled, legacy non-IBT applications continue to > work, but without IBT protection. > > Signed-off-by: Yu-cheng Yu > --- > v10: > - Change build-time CET check to config depends on. > > arch/x86/Kconfig | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > index 6b6dad011763..b047e0a8d1c2 100644 > --- a/arch/x86/Kconfig > +++ b/arch/x86/Kconfig > @@ -1963,6 +1963,22 @@ config X86_INTEL_SHADOW_STACK_USER > > If unsure, say y. > > +config X86_INTEL_BRANCH_TRACKING_USER > + prompt "Intel Indirect Branch Tracking for user-mode" > + def_bool n > + depends on CPU_SUP_INTEL && X86_64 > + depends on $(cc-option,-fcf-protection) > + select X86_INTEL_CET > + help > + Indirect Branch Tracking (IBT) provides protection against > + CALL-/JMP-oriented programming attacks. It is active when > + the kernel has this feature enabled, and the processor and > + the application support it. When this feature is enabled, > + legacy non-IBT applications continue to work, but without > + IBT protection. > + > + If unsure, say y If unsure, say y. > + > config EFI > bool "EFI runtime service support" > depends on ACPI > -- ~Randy