perfinion    15/05/07 19:41:35

  Added:                tboot-1.8.2-stack-check-no.patch
                        tboot-1.8.2-genkernel_arch.patch
                        tboot-1.8.2-disable-pcid.patch
  Log:
  Initial commit of tboot
  
  (Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 
0x7EF137EC935B0EAF)

Revision  Changes    Path
1.1                  sys-boot/tboot/files/tboot-1.8.2-stack-check-no.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-boot/tboot/files/tboot-1.8.2-stack-check-no.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-boot/tboot/files/tboot-1.8.2-stack-check-no.patch?rev=1.1&content-type=text/plain

Index: tboot-1.8.2-stack-check-no.patch
===================================================================
diff -ur tboot-1.8.2.orig/tboot/Config.mk tboot-1.8.2/tboot/Config.mk
--- tboot-1.8.2.orig/tboot/Config.mk    2014-07-28 12:24:21.000000000 +0400
+++ tboot-1.8.2/tboot/Config.mk 2015-05-05 02:14:26.333222301 +0400
@@ -30,6 +30,7 @@
 CFLAGS         += $(call cc-option,$(CC),-nopie,)
 CFLAGS         += $(call cc-option,$(CC),-fno-stack-protector,)
 CFLAGS         += $(call cc-option,$(CC),-fno-stack-protector-all,)
+CFLAGS         += $(call cc-option,$(CC),-fstack-check=no,)
 
 # changeset variable for banner
 CFLAGS         += -DTBOOT_CHANGESET=\""$(shell ((hg parents --template 
"{isodate|isodate} {rev}:{node|short}" >/dev/null && hg parents --template 
"{isodate|isodate} {rev}:{node|short}") || echo "2014-07-28 12:00 +0800 1.8.2") 
2>/dev/null)"\"



1.1                  sys-boot/tboot/files/tboot-1.8.2-genkernel_arch.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-boot/tboot/files/tboot-1.8.2-genkernel_arch.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-boot/tboot/files/tboot-1.8.2-genkernel_arch.patch?rev=1.1&content-type=text/plain

Index: tboot-1.8.2-genkernel_arch.patch
===================================================================
diff -ru tboot-1.8.2.orig/tboot/20_linux_tboot tboot-1.8.2/tboot/20_linux_tboot
--- tboot-1.8.2.orig/tboot/20_linux_tboot       2014-08-02 00:18:58.397147454 
+0400
+++ tboot-1.8.2/tboot/20_linux_tboot    2014-08-02 00:20:09.766700748 +0400
@@ -121,6 +121,15 @@
 EOF
 }
 
+machine=`uname -m`
+case "$machine" in
+    i?86) GENKERNEL_ARCH="x86" ;;
+    mips|mips64) GENKERNEL_ARCH="mips" ;;
+    mipsel|mips64el) GENKERNEL_ARCH="mipsel" ;;
+    arm*) GENKERNEL_ARCH="arm" ;;
+    *) GENKERNEL_ARCH="$machine" ;;
+esac
+
 linux_list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do
        basename=$(basename $i)
        version=$(echo $basename | sed -e "s,^[^0-9]*-,,g")
@@ -159,6 +168,8 @@
                 "initrd-${version}" "initramfs-${version}.img" \
                 "initrd.img-${alt_version}" "initrd-${alt_version}.img" \
                 "initrd-${alt_version}" "initramfs-${alt_version}.img" \
+                "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \
+                "initramfs-genkernel-${GENKERNEL_ARCH}-${alt_version}" \
                 "initramfs-genkernel-${version}" \
                 "initramfs-genkernel-${alt_version}"; do
            if test -e "${dirname}/${i}" ; then
diff -ru tboot-1.8.2.orig/tboot/20_linux_xen_tboot 
tboot-1.8.2/tboot/20_linux_xen_tboot
--- tboot-1.8.2.orig/tboot/20_linux_xen_tboot   2014-08-02 00:18:58.397147454 
+0400
+++ tboot-1.8.2/tboot/20_linux_xen_tboot        2014-08-02 00:21:12.840438230 
+0400
@@ -147,6 +147,16 @@
 if [ "x${linux_list}" = "x" ] ; then
     exit 0
 fi
+
+machine=`uname -m`
+case "$machine" in
+    i?86) GENKERNEL_ARCH="x86" ;;
+    mips|mips64) GENKERNEL_ARCH="mips" ;;
+    mipsel|mips64el) GENKERNEL_ARCH="mipsel" ;;
+    arm*) GENKERNEL_ARCH="arm" ;;
+    *) GENKERNEL_ARCH="$machine" ;;
+esac
+
 xen_list=`for i in /boot/xen*; do
         if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
       done`
@@ -188,6 +198,8 @@
             for i in "initrd.img-${version}" "initrd-${version}.img" \
                 "initrd-${version}" "initrd.img-${alt_version}" \
                 "initrd-${alt_version}.img" "initrd-${alt_version}" \
+                "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \
+                "initramfs-genkernel-${GENKERNEL_ARCH}-${alt_version}" \
                 "initramfs-genkernel-${version}" \
                 "initramfs-genkernel-${alt_version}" ; do
                 if test -e "${dirname}/${i}" ; then



1.1                  sys-boot/tboot/files/tboot-1.8.2-disable-pcid.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-boot/tboot/files/tboot-1.8.2-disable-pcid.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-boot/tboot/files/tboot-1.8.2-disable-pcid.patch?rev=1.1&content-type=text/plain

Index: tboot-1.8.2-disable-pcid.patch
===================================================================
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__
 




Reply via email to