From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 52F9D138CCC for ; Wed, 6 May 2015 23:28:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D57A1E087F; Wed, 6 May 2015 23:28:01 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6658BE087F for ; Wed, 6 May 2015 23:28:01 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4CFAB340DD7 for ; Wed, 6 May 2015 23:28:00 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A8EEB9B1 for ; Wed, 6 May 2015 23:27:58 +0000 (UTC) From: "Jason Zaman" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jason Zaman" Message-ID: <1430954866.3bf93797179b43e8d97a66356a9bddefe44d1ccf.perfinion@gentoo> Subject: [gentoo-commits] proj/hardened-dev:master commit in: sys-boot/tboot/, sys-boot/tboot/files/ X-VCS-Repository: proj/hardened-dev X-VCS-Files: sys-boot/tboot/files/tboot-1.8.2-disable-pcid.patch sys-boot/tboot/tboot-1.8.2.ebuild X-VCS-Directories: sys-boot/tboot/ sys-boot/tboot/files/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: 3bf93797179b43e8d97a66356a9bddefe44d1ccf X-VCS-Branch: master Date: Wed, 6 May 2015 23:27:58 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 300735c3-c60a-4bce-a542-142ae6c80088 X-Archives-Hash: 6e612139d9b5a0e7f38de239af539f76 commit: 3bf93797179b43e8d97a66356a9bddefe44d1ccf Author: Jason Zaman perfinion com> AuthorDate: Wed May 6 23:26:58 2015 +0000 Commit: Jason Zaman gentoo org> CommitDate: Wed May 6 23:27:46 2015 +0000 URL: https://gitweb.gentoo.org/proj/hardened-dev.git/commit/?id=3bf93797 tboot: add pcid disable patch .../tboot/files/tboot-1.8.2-disable-pcid.patch | 26 ++++++++++++++++++++++ sys-boot/tboot/tboot-1.8.2.ebuild | 9 ++++---- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/sys-boot/tboot/files/tboot-1.8.2-disable-pcid.patch b/sys-boot/tboot/files/tboot-1.8.2-disable-pcid.patch new file mode 100644 index 0000000..383338e --- /dev/null +++ b/sys-boot/tboot/files/tboot-1.8.2-disable-pcid.patch @@ -0,0 +1,26 @@ +diff -ur tboot-1.8.2.orig/tboot/common/shutdown.S tboot-1.8.2/tboot/common/shutdown.S +--- tboot-1.8.2.orig/tboot/common/shutdown.S 2014-07-28 12:24:22.000000000 +0400 ++++ tboot-1.8.2/tboot/common/shutdown.S 2015-05-07 03:05:47.300985413 +0400 +@@ -34,6 +34,11 @@ + */ + + compat_mode_entry: ++ /* Disable PCID */ ++ movl %cr4, %eax ++ andl $~CR4_PCIDE, %eax ++ movl %eax, %cr4 ++ + /* Disable paging and therefore leave 64 bit mode. */ + movl %cr0, %eax + andl $~CR0_PG, %eax +diff -ur tboot-1.8.2.orig/tboot/include/processor.h tboot-1.8.2/tboot/include/processor.h +--- tboot-1.8.2.orig/tboot/include/processor.h 2014-07-28 12:24:22.000000000 +0400 ++++ tboot-1.8.2/tboot/include/processor.h 2015-05-07 03:04:58.721244858 +0400 +@@ -92,6 +92,7 @@ + #define CR4_XMM 0x00000400 /* enable SIMD/MMX2 to use except 16 */ + #define CR4_VMXE 0x00002000/* enable VMX */ + #define CR4_SMXE 0x00004000/* enable SMX */ ++#define CR4_PCIDE 0x00020000/* enable PCID */ + + #ifndef __ASSEMBLY__ + diff --git a/sys-boot/tboot/tboot-1.8.2.ebuild b/sys-boot/tboot/tboot-1.8.2.ebuild index 389c93c..bcfc004 100644 --- a/sys-boot/tboot/tboot-1.8.2.ebuild +++ b/sys-boot/tboot/tboot-1.8.2.ebuild @@ -26,10 +26,11 @@ sys-boot/grub:2" DOCS=(README COPYING CHANGELOG) src_prepare() { - epatch "${FILESDIR}/${P}-genkernel_arch.patch" - epatch "${FILESDIR}/${P}-stack-check-no.patch" # breaks with ssp - sed -i 's/ -Werror//g' Config.mk - sed -i 's/^INSTALL_STRIP = -s$//' Config.mk # QA Errors + epatch "${FILESDIR}/tboot-1.8.2-genkernel_arch.patch" + epatch "${FILESDIR}/tboot-1.8.2-stack-check-no.patch" # breaks with ssp + epatch "${FILESDIR}/tboot-1.8.2-disable-pcid.patch" # PaX enables pcid + sed -i 's/ -Werror//g' Config.mk || die + sed -i 's/^INSTALL_STRIP = -s$//' Config.mk || die # QA Errors # the version number is wrong in the grub files sed -i 's/tboot_version="1.8.1"/tboot_version="1.8.2"/' tboot/20_linux*tboot