From owner-freebsd-hackers@FreeBSD.ORG Wed May 18 01:04:01 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 965FF106566B for ; Wed, 18 May 2011 01:04:01 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 154C98FC14 for ; Wed, 18 May 2011 01:04:00 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p4I13vwr026745 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 18 May 2011 04:03:57 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p4I13uld096623; Wed, 18 May 2011 04:03:56 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p4I13uLu096622; Wed, 18 May 2011 04:03:56 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 18 May 2011 04:03:55 +0300 From: Kostik Belousov To: Oliver Pinter Message-ID: <20110518010353.GQ48734@deviant.kiev.zoral.com.ua> References: <1305581685-5144-1-git-send-email-fenghua.yu@intel.com> <1305581685-5144-4-git-send-email-fenghua.yu@intel.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="H6JajqBy5V+yykme" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-hackers@freebsd.org Subject: Re: Fwd: [PATCH v2 3/4] x86, head_32/64.S: Enable SMEP X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 May 2011 01:04:01 -0000 --H6JajqBy5V+yykme Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 18, 2011 at 02:03:07AM +0200, Oliver Pinter wrote: > ---------- Forwarded message ---------- > From: Fenghua Yu > Date: Mon, 16 May 2011 14:34:44 -0700 > Subject: [PATCH v2 3/4] x86, head_32/64.S: Enable SMEP > To: Ingo Molnar , Thomas Gleixner , > H Peter Anvin , Asit K Mallick > , Linus Torvalds > , Avi Kivity , Arjan > van de Ven , Andrew Morton > , Andi Kleen > Cc: linux-kernel , Fenghua Yu > >=20 > From: Fenghua Yu >=20 > Enable newly documented SMEP (Supervisor Mode Execution Protection) CPU > feature in kernel. >=20 > SMEP prevents the CPU in kernel-mode to jump to an executable page that d= oes > not have the kernel/system flag set in the pte. This prevents the kernel > from executing user-space code accidentally or maliciously, so it for exa= mple > prevents kernel exploits from jumping to specially prepared user-mode she= ll > code. The violation will cause page fault #PF and will have error code > identical to XD violation. >=20 > CR4.SMEP (bit 20) is 0 at power-on. If the feature is supported by CPU > (X86_FEATURE_SMEP), enable SMEP by setting CR4.SMEP. New kernel > option nosmep disables the feature even if the feature is supported by CP= U. >=20 > Signed-off-by: Fenghua Yu So, where is the mentioned documentation for SMEP ? Rev. 38 of the Intel(R) 64 and IA-32 Architectures Software Developer's Manual does not contain the description, at least at the places where I looked and expected to find it. Looking forward to hear from you. --H6JajqBy5V+yykme Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk3TGvkACgkQC3+MBN1Mb4grKQCeLFCbpD4Im9Es+5wj7T1F49Zp rTcAoIoLUlOSTGGqJSWOH6UVihcuiHVG =yV+Y -----END PGP SIGNATURE----- --H6JajqBy5V+yykme--