Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp35537imm; Thu, 30 Aug 2018 13:41:32 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaEMOT20qLv6C+BN+CpHzStJmYyXzJgj2nzJqBtHp8An47FC4sC9qU7C8lf2QyXcrc2eETu X-Received: by 2002:a17:902:6a83:: with SMTP id n3-v6mr11669770plk.246.1535661692101; Thu, 30 Aug 2018 13:41:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535661692; cv=none; d=google.com; s=arc-20160816; b=GhBsWmgT+Jo+BtBGrr410Q91gWz6vEmyi9sIKyaipuG7D7cV7Hzk+tbz2WMnViFXwr WKGiplLHDjaWmcULi93aqCZu2ZawhS8rfS4NmMpQak/Cs9gP1IML64/xeMAcyR8mDnib nSexZracgd10Lz+NAytsuHOXk+seKSFFX87+LXVgA2VjIEk9F6K7h6IT6uQjJi8xKjI1 kbUmnTF8ttDNoYTR+LZR7hoUQCavVrx3cglLWacQbxx6WSU8ywZcJhSBaoQLvn5Fs/KE im+NJq624Oj/94AbvTILUW+gTBJjceZFzLZfkZHPKbtjbgYlxD5NOr7QAIlA+6KgSJrN 3q/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=UKRQkxiitdy6kioq1KFa1Oi10RNlIEcZLneNmcgWS18=; b=d/7h9rQOtEFb/xDzAPfumjPyTxt4WHYjFs0tXA2uSe8sDN0LYuhn5NYQw0Fowlm/ZQ mV+gaS8o7InGT2fRzHfnUdcdhDrVLmkHwe5tv9o/l02l2FXnZy0fTo/VXVScgf3xVZqC BldR2mSNJ+HjjQd3fW0sIucAHDGTUoTg0OCztpw/hUJqPskmsNVHB8nFjkwy+dlnRIOI cYoXMwPdDxFtHfRO5DWiboyNJFaPOVwuA+pcn5E5+8KG1r78eMTFd4n3eaJrx+dtlpCQ kbG1ukNZD/WekdhOTJgvwBZUXXdpbD5VY6FLX9nxPaxbXOZBpKGbzhlygacBAW5IHdhz j5sQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j2-v6si7292337pfc.102.2018.08.30.13.41.13; Thu, 30 Aug 2018 13:41:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727453AbeHaAnv (ORCPT + 99 others); Thu, 30 Aug 2018 20:43:51 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:51818 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727258AbeHaAnu (ORCPT ); Thu, 30 Aug 2018 20:43:50 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 8BD6380552; Thu, 30 Aug 2018 22:39:49 +0200 (CEST) Date: Thu, 30 Aug 2018 22:39:48 +0200 From: Pavel Machek To: Yu-cheng Yu Cc: 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 , Cyrill Gorcunov , Dave Hansen , Florian Weimer , "H.J. Lu" , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz , Nadav Amit , Oleg Nesterov , Peter Zijlstra , "Ravi V. Shankar" , Vedvyas Shanbhogue Subject: Re: [RFC PATCH v3 05/24] Documentation/x86: Add CET description Message-ID: <20180830203948.GB1936@amd> References: <20180830143904.3168-1-yu-cheng.yu@intel.com> <20180830143904.3168-6-yu-cheng.yu@intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="z6Eq5LdranGa6ru8" Content-Disposition: inline In-Reply-To: <20180830143904.3168-6-yu-cheng.yu@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --z6Eq5LdranGa6ru8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentat= ion/admin-guide/kernel-parameters.txt > index 9871e649ffef..b090787188b4 100644 > --- a/Documentation/admin-guide/kernel-parameters.txt > +++ b/Documentation/admin-guide/kernel-parameters.txt > @@ -2764,6 +2764,12 @@ > noexec=3Don: enable non-executable mappings (default) > noexec=3Doff: disable non-executable mappings > =20 > + no_cet_ibt [X86-64] Disable indirect branch tracking for user-mode > + applications > + > + no_cet_shstk [X86-64] Disable shadow stack support for user-mode > + applications Hmm, not too consistent with "nosmap" below. Would it make sense to have cet=3Don/off/ibt/shstk instead? > +++ b/Documentation/x86/intel_cet.rst > @@ -0,0 +1,252 @@ > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +Control Flow Enforcement Technology (CET) > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +[1] Overview > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +Control Flow Enforcement Technology (CET) provides protection against > +return/jump-oriented programing (ROP) attacks. Can you add something like "It attempts to protect process from running arbitrary code even after attacker has control of its stack" -- for people that don't know what ROP is, and perhaps link to wikipedia explaining ROP or something... > It can be implemented > +to protect both the kernel and applications. In the first phase, > +only the user-mode protection is implemented for the 64-bit kernel. > +Thirty-two bit applications are supported under the compatibility 32-bit (for consistency). Ok, so CET stops execution of malicious code before architectural effects are visible, correct? Does it prevent micro-architectural effects of the malicious code? (cache content would be one example; see Spectre). > +[3] Application Enabling > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D "Enabling CET in applications" ? > +Signal > +------ > + > +The main program and its signal handlers use the same SHSTK. Because > +the SHSTK stores only return addresses, we can estimate a large > +enough SHSTK to cover the condition that both the program stack and > +the sigaltstack run out. English? Is it estimate or is it large enough? "a large" -- "a" should be deleted AFAICT. =20 --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --z6Eq5LdranGa6ru8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAluIVhQACgkQMOfwapXb+vJ0KACgu6nabChmCkBFO6OaHfHWveVH 9MgAn36uXjrnPChLkXN2JkbfiY+qF9bI =mbZW -----END PGP SIGNATURE----- --z6Eq5LdranGa6ru8--