Change-Id: I3ceeb1c01de0264d257f812a02c7eb8686d71323
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/5510
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Sharath George
| 1 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,87 +0,0 @@ |
| 1 |
-From 7e39d8ccbb0889c03ce6dc0dee0e63d78f37d0a9 Mon Sep 17 00:00:00 2001 |
|
| 2 |
-From: Kees Cook <keescook@chromium.org> |
|
| 3 |
-Date: Fri, 20 Apr 2018 14:55:31 -0700 |
|
| 4 |
-Subject: [PATCH] fork: unconditionally clear stack on fork |
|
| 5 |
- |
|
| 6 |
-commit e01e80634ecdde1dd113ac43b3adad21b47f3957 upstream. |
|
| 7 |
- |
|
| 8 |
-One of the classes of kernel stack content leaks[1] is exposing the |
|
| 9 |
-contents of prior heap or stack contents when a new process stack is |
|
| 10 |
-allocated. Normally, those stacks are not zeroed, and the old contents |
|
| 11 |
-remain in place. In the face of stack content exposure flaws, those |
|
| 12 |
-contents can leak to userspace. |
|
| 13 |
- |
|
| 14 |
-Fixing this will make the kernel no longer vulnerable to these flaws, as |
|
| 15 |
-the stack will be wiped each time a stack is assigned to a new process. |
|
| 16 |
-There's not a meaningful change in runtime performance; it almost looks |
|
| 17 |
-like it provides a benefit. |
|
| 18 |
- |
|
| 19 |
-Performing back-to-back kernel builds before: |
|
| 20 |
- Run times: 157.86 157.09 158.90 160.94 160.80 |
|
| 21 |
- Mean: 159.12 |
|
| 22 |
- Std Dev: 1.54 |
|
| 23 |
- |
|
| 24 |
-and after: |
|
| 25 |
- Run times: 159.31 157.34 156.71 158.15 160.81 |
|
| 26 |
- Mean: 158.46 |
|
| 27 |
- Std Dev: 1.46 |
|
| 28 |
- |
|
| 29 |
-Instead of making this a build or runtime config, Andy Lutomirski |
|
| 30 |
-recommended this just be enabled by default. |
|
| 31 |
- |
|
| 32 |
-[1] A noisy search for many kinds of stack content leaks can be seen here: |
|
| 33 |
-https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=linux+kernel+stack+leak |
|
| 34 |
- |
|
| 35 |
-I did some more with perf and cycle counts on running 100,000 execs of |
|
| 36 |
-/bin/true. |
|
| 37 |
- |
|
| 38 |
-before: |
|
| 39 |
-Cycles: 218858861551 218853036130 214727610969 227656844122 224980542841 |
|
| 40 |
-Mean: 221015379122.60 |
|
| 41 |
-Std Dev: 4662486552.47 |
|
| 42 |
- |
|
| 43 |
-after: |
|
| 44 |
-Cycles: 213868945060 213119275204 211820169456 224426673259 225489986348 |
|
| 45 |
-Mean: 217745009865.40 |
|
| 46 |
-Std Dev: 5935559279.99 |
|
| 47 |
- |
|
| 48 |
-It continues to look like it's faster, though the deviation is rather |
|
| 49 |
-wide, but I'm not sure what I could do that would be less noisy. I'm |
|
| 50 |
-open to ideas! |
|
| 51 |
- |
|
| 52 |
-Link: http://lkml.kernel.org/r/20180221021659.GA37073@beast |
|
| 53 |
-Signed-off-by: Kees Cook <keescook@chromium.org> |
|
| 54 |
-Acked-by: Michal Hocko <mhocko@suse.com> |
|
| 55 |
-Reviewed-by: Andrew Morton <akpm@linux-foundation.org> |
|
| 56 |
-Cc: Andy Lutomirski <luto@kernel.org> |
|
| 57 |
-Cc: Laura Abbott <labbott@redhat.com> |
|
| 58 |
-Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk> |
|
| 59 |
-Cc: Mel Gorman <mgorman@techsingularity.net> |
|
| 60 |
-Signed-off-by: Andrew Morton <akpm@linux-foundation.org> |
|
| 61 |
-Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> |
|
| 62 |
-[ Srivatsa: Backported to 4.4.y ] |
|
| 63 |
-Signed-off-by: Srivatsa S. Bhat <srivatsa@csail.mit.edu> |
|
| 64 |
- include/linux/thread_info.h | 6 +----- |
|
| 65 |
- 1 file changed, 1 insertion(+), 5 deletions(-) |
|
| 66 |
- |
|
| 67 |
-diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h |
|
| 68 |
-index ff307b5..646891f 100644 |
|
| 69 |
-+++ b/include/linux/thread_info.h |
|
| 70 |
-@@ -55,11 +55,7 @@ extern long do_no_restart_syscall(struct restart_block *parm); |
|
| 71 |
- |
|
| 72 |
- #ifdef __KERNEL__ |
|
| 73 |
- |
|
| 74 |
--#ifdef CONFIG_DEBUG_STACK_USAGE |
|
| 75 |
--# define THREADINFO_GFP (GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO) |
|
| 76 |
--#else |
|
| 77 |
--# define THREADINFO_GFP (GFP_KERNEL | __GFP_NOTRACK) |
|
| 78 |
--#endif |
|
| 79 |
-+#define THREADINFO_GFP (GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO) |
|
| 80 |
- |
|
| 81 |
- /* |
|
| 82 |
- * flag set/clear/test wrappers |
|
| 83 |
-2.7.4 |
|
| 84 |
- |
| ... | ... |
@@ -1,6 +1,6 @@ |
| 1 | 1 |
# |
| 2 | 2 |
# Automatically generated file; DO NOT EDIT. |
| 3 |
-# Linux/x86 4.4.139 Kernel Configuration |
|
| 3 |
+# Linux/x86 4.4.148 Kernel Configuration |
|
| 4 | 4 |
# |
| 5 | 5 |
CONFIG_64BIT=y |
| 6 | 6 |
CONFIG_X86_64=y |
| ... | ... |
@@ -37,7 +37,6 @@ CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y |
| 37 | 37 |
CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y |
| 38 | 38 |
CONFIG_HAVE_INTEL_TXT=y |
| 39 | 39 |
CONFIG_X86_64_SMP=y |
| 40 |
-CONFIG_ARCH_HWEIGHT_CFLAGS="-fcall-saved-rdi -fcall-saved-rsi -fcall-saved-rdx -fcall-saved-rcx -fcall-saved-r8 -fcall-saved-r9 -fcall-saved-r10 -fcall-saved-r11" |
|
| 41 | 40 |
CONFIG_ARCH_SUPPORTS_UPROBES=y |
| 42 | 41 |
CONFIG_FIX_EARLYCON_MEM=y |
| 43 | 42 |
CONFIG_PGTABLE_LEVELS=4 |
| ... | ... |
@@ -386,6 +385,7 @@ CONFIG_FREEZER=y |
| 386 | 386 |
# CONFIG_ZONE_DMA is not set |
| 387 | 387 |
CONFIG_SMP=y |
| 388 | 388 |
CONFIG_X86_FEATURE_NAMES=y |
| 389 |
+CONFIG_X86_FAST_FEATURE_TESTS=y |
|
| 389 | 390 |
CONFIG_X86_X2APIC=y |
| 390 | 391 |
# CONFIG_X86_MPPARSE is not set |
| 391 | 392 |
CONFIG_RETPOLINE=y |
| ... | ... |
@@ -4208,7 +4208,6 @@ CONFIG_DEFAULT_IO_DELAY_TYPE=0 |
| 4208 | 4208 |
CONFIG_OPTIMIZE_INLINING=y |
| 4209 | 4209 |
# CONFIG_DEBUG_ENTRY is not set |
| 4210 | 4210 |
# CONFIG_DEBUG_NMI_SELFTEST is not set |
| 4211 |
-# CONFIG_X86_DEBUG_STATIC_CPU_HAS is not set |
|
| 4212 | 4211 |
# CONFIG_X86_DEBUG_FPU is not set |
| 4213 | 4212 |
# CONFIG_PUNIT_ATOM_DEBUG is not set |
| 4214 | 4213 |
|
| ... | ... |
@@ -1,6 +1,6 @@ |
| 1 | 1 |
# |
| 2 | 2 |
# Automatically generated file; DO NOT EDIT. |
| 3 |
-# Linux/x86 4.4.139 Kernel Configuration |
|
| 3 |
+# Linux/x86 4.4.148 Kernel Configuration |
|
| 4 | 4 |
# |
| 5 | 5 |
CONFIG_64BIT=y |
| 6 | 6 |
CONFIG_X86_64=y |
| ... | ... |
@@ -36,7 +36,6 @@ CONFIG_AUDIT_ARCH=y |
| 36 | 36 |
CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y |
| 37 | 37 |
CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y |
| 38 | 38 |
CONFIG_X86_64_SMP=y |
| 39 |
-CONFIG_ARCH_HWEIGHT_CFLAGS="-fcall-saved-rdi -fcall-saved-rsi -fcall-saved-rdx -fcall-saved-rcx -fcall-saved-r8 -fcall-saved-r9 -fcall-saved-r10 -fcall-saved-r11" |
|
| 40 | 39 |
CONFIG_ARCH_SUPPORTS_UPROBES=y |
| 41 | 40 |
CONFIG_FIX_EARLYCON_MEM=y |
| 42 | 41 |
CONFIG_PGTABLE_LEVELS=4 |
| ... | ... |
@@ -374,6 +373,7 @@ CONFIG_FREEZER=y |
| 374 | 374 |
# CONFIG_ZONE_DMA is not set |
| 375 | 375 |
CONFIG_SMP=y |
| 376 | 376 |
CONFIG_X86_FEATURE_NAMES=y |
| 377 |
+CONFIG_X86_FAST_FEATURE_TESTS=y |
|
| 377 | 378 |
CONFIG_X86_X2APIC=y |
| 378 | 379 |
CONFIG_X86_MPPARSE=y |
| 379 | 380 |
CONFIG_RETPOLINE=y |
| ... | ... |
@@ -2966,7 +2966,6 @@ CONFIG_DEFAULT_IO_DELAY_TYPE=3 |
| 2966 | 2966 |
# CONFIG_OPTIMIZE_INLINING is not set |
| 2967 | 2967 |
# CONFIG_DEBUG_ENTRY is not set |
| 2968 | 2968 |
# CONFIG_DEBUG_NMI_SELFTEST is not set |
| 2969 |
-# CONFIG_X86_DEBUG_STATIC_CPU_HAS is not set |
|
| 2970 | 2969 |
# CONFIG_X86_DEBUG_FPU is not set |
| 2971 | 2970 |
# CONFIG_PUNIT_ATOM_DEBUG is not set |
| 2972 | 2971 |
|
| ... | ... |
@@ -3001,6 +3000,7 @@ CONFIG_CRYPTO_HASH=y |
| 3001 | 3001 |
CONFIG_CRYPTO_HASH2=y |
| 3002 | 3002 |
CONFIG_CRYPTO_RNG=y |
| 3003 | 3003 |
CONFIG_CRYPTO_RNG2=y |
| 3004 |
+CONFIG_CRYPTO_RNG_DEFAULT=m |
|
| 3004 | 3005 |
CONFIG_CRYPTO_PCOMP2=y |
| 3005 | 3006 |
CONFIG_CRYPTO_AKCIPHER2=y |
| 3006 | 3007 |
CONFIG_CRYPTO_AKCIPHER=y |
| ... | ... |
@@ -3028,7 +3028,7 @@ CONFIG_CRYPTO_GLUE_HELPER_X86=m |
| 3028 | 3028 |
# CONFIG_CRYPTO_GCM is not set |
| 3029 | 3029 |
# CONFIG_CRYPTO_CHACHA20POLY1305 is not set |
| 3030 | 3030 |
# CONFIG_CRYPTO_SEQIV is not set |
| 3031 |
-# CONFIG_CRYPTO_ECHAINIV is not set |
|
| 3031 |
+CONFIG_CRYPTO_ECHAINIV=m |
|
| 3032 | 3032 |
|
| 3033 | 3033 |
# |
| 3034 | 3034 |
# Block modes |
| ... | ... |
@@ -3130,8 +3130,12 @@ CONFIG_CRYPTO_DEFLATE=m |
| 3130 | 3130 |
# Random Number Generation |
| 3131 | 3131 |
# |
| 3132 | 3132 |
CONFIG_CRYPTO_ANSI_CPRNG=m |
| 3133 |
-# CONFIG_CRYPTO_DRBG_MENU is not set |
|
| 3134 |
-# CONFIG_CRYPTO_JITTERENTROPY is not set |
|
| 3133 |
+CONFIG_CRYPTO_DRBG_MENU=m |
|
| 3134 |
+CONFIG_CRYPTO_DRBG_HMAC=y |
|
| 3135 |
+CONFIG_CRYPTO_DRBG_HASH=y |
|
| 3136 |
+CONFIG_CRYPTO_DRBG_CTR=y |
|
| 3137 |
+CONFIG_CRYPTO_DRBG=m |
|
| 3138 |
+CONFIG_CRYPTO_JITTERENTROPY=m |
|
| 3135 | 3139 |
CONFIG_CRYPTO_USER_API=y |
| 3136 | 3140 |
CONFIG_CRYPTO_USER_API_HASH=y |
| 3137 | 3141 |
CONFIG_CRYPTO_USER_API_SKCIPHER=y |
| ... | ... |
@@ -1,7 +1,7 @@ |
| 1 | 1 |
%global security_hardening none |
| 2 | 2 |
Summary: Kernel |
| 3 | 3 |
Name: linux-esx |
| 4 |
-Version: 4.4.147 |
|
| 4 |
+Version: 4.4.148 |
|
| 5 | 5 |
Release: 1%{?dist}
|
| 6 | 6 |
License: GPLv2 |
| 7 | 7 |
URL: http://www.kernel.org/ |
| ... | ... |
@@ -9,7 +9,7 @@ Group: System Environment/Kernel |
| 9 | 9 |
Vendor: VMware, Inc. |
| 10 | 10 |
Distribution: Photon |
| 11 | 11 |
Source0: http://www.kernel.org/pub/linux/kernel/v4.x/linux-%{version}.tar.xz
|
| 12 |
-%define sha1 linux=0d15c05764b90855d0ce5521dd378cb90ea28745 |
|
| 12 |
+%define sha1 linux=bf904804cb2a24b709e4de424cb7e08f2f79dd1b |
|
| 13 | 13 |
Source1: config-esx |
| 14 | 14 |
Patch0: double-tcp_mem-limits.patch |
| 15 | 15 |
Patch1: linux-4.4-sysctl-sched_weighted_cpuload_uses_rla.patch |
| ... | ... |
@@ -66,9 +66,6 @@ Patch48: 0008-xfs-enhance-dinode-verifier.patch |
| 66 | 66 |
# For Spectre |
| 67 | 67 |
Patch67: 0169-x86-syscall-Clear-unused-extra-registers-on-syscall-.patch |
| 68 | 68 |
|
| 69 |
-Patch70: 0001-fork-unconditionally-clear-stack-on-fork.patch |
|
| 70 |
- |
|
| 71 |
- |
|
| 72 | 69 |
BuildRequires: bc |
| 73 | 70 |
BuildRequires: kbd |
| 74 | 71 |
BuildRequires: kmod |
| ... | ... |
@@ -151,8 +148,6 @@ The Linux package contains the Linux kernel doc files |
| 151 | 151 |
|
| 152 | 152 |
%patch67 -p1 |
| 153 | 153 |
|
| 154 |
-%patch70 -p1 |
|
| 155 |
- |
|
| 156 | 154 |
%build |
| 157 | 155 |
# patch vmw_balloon driver |
| 158 | 156 |
sed -i 's/module_init/late_initcall/' drivers/misc/vmw_balloon.c |
| ... | ... |
@@ -240,6 +235,8 @@ ln -sf linux-%{uname_r}.cfg /boot/photon.cfg
|
| 240 | 240 |
/usr/src/linux-headers-%{uname_r}
|
| 241 | 241 |
|
| 242 | 242 |
%changelog |
| 243 |
+* Fri Aug 17 2018 Bo Gan <ganb@vmware.com> 4.4.148-1 |
|
| 244 |
+- Update to version 4.4.148 (l1tf fixes) |
|
| 243 | 245 |
* Thu Aug 09 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 4.4.147-1 |
| 244 | 246 |
- Update to version 4.4.147 to fix CVE-2018-12233. |
| 245 | 247 |
* Tue Aug 07 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 4.4.146-1 |
| ... | ... |
@@ -1,7 +1,7 @@ |
| 1 | 1 |
%global security_hardening none |
| 2 | 2 |
Summary: Kernel |
| 3 | 3 |
Name: linux |
| 4 |
-Version: 4.4.147 |
|
| 4 |
+Version: 4.4.148 |
|
| 5 | 5 |
Release: 1%{?kat_build:.%kat_build}%{?dist}
|
| 6 | 6 |
License: GPLv2 |
| 7 | 7 |
URL: http://www.kernel.org/ |
| ... | ... |
@@ -9,7 +9,7 @@ Group: System Environment/Kernel |
| 9 | 9 |
Vendor: VMware, Inc. |
| 10 | 10 |
Distribution: Photon |
| 11 | 11 |
Source0: http://www.kernel.org/pub/linux/kernel/v4.x/%{name}-%{version}.tar.xz
|
| 12 |
-%define sha1 linux=0d15c05764b90855d0ce5521dd378cb90ea28745 |
|
| 12 |
+%define sha1 linux=bf904804cb2a24b709e4de424cb7e08f2f79dd1b |
|
| 13 | 13 |
Source1: config |
| 14 | 14 |
%define ena_version 1.1.3 |
| 15 | 15 |
Source2: https://github.com/amzn/amzn-drivers/archive/ena_linux_1.1.3.tar.gz |
| ... | ... |
@@ -66,8 +66,6 @@ Patch41: 0008-xfs-enhance-dinode-verifier.patch |
| 66 | 66 |
# For Spectre |
| 67 | 67 |
Patch67: 0169-x86-syscall-Clear-unused-extra-registers-on-syscall-.patch |
| 68 | 68 |
|
| 69 |
-Patch70: 0001-fork-unconditionally-clear-stack-on-fork.patch |
|
| 70 |
- |
|
| 71 | 69 |
|
| 72 | 70 |
%if 0%{?kat_build:1}
|
| 73 | 71 |
Patch1000: %{kat_build}.patch
|
| ... | ... |
@@ -183,8 +181,6 @@ This package contains the 'perf' performance analysis tools for Linux kernel. |
| 183 | 183 |
|
| 184 | 184 |
%patch67 -p1 |
| 185 | 185 |
|
| 186 |
-%patch70 -p1 |
|
| 187 |
- |
|
| 188 | 186 |
%if 0%{?kat_build:1}
|
| 189 | 187 |
%patch1000 -p1 |
| 190 | 188 |
%endif |
| ... | ... |
@@ -340,6 +336,8 @@ ln -sf %{name}-%{uname_r}.cfg /boot/photon.cfg
|
| 340 | 340 |
/usr/share/perf-core |
| 341 | 341 |
|
| 342 | 342 |
%changelog |
| 343 |
+* Fri Aug 17 2018 Bo Gan <ganb@vmware.com> 4.4.148-1 |
|
| 344 |
+- Update to version 4.4.148 (l1tf fixes) |
|
| 343 | 345 |
* Thu Aug 09 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 4.4.147-1 |
| 344 | 346 |
- Update to version 4.4.147 to fix CVE-2018-12233. |
| 345 | 347 |
* Tue Aug 07 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 4.4.146-1 |