summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO6
-rw-r--r--0001-x86-fpu-Fix-invalid-FPU-ptrace-state-after-execve.patch65
-rw-r--r--PKGBUILD11
3 files changed, 78 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index db98a22fc39c..8afaa503ed6a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
# Generated by mksrcinfo v8
-# Sat Dec 10 18:50:21 UTC 2016
+# Sun Dec 11 11:58:18 UTC 2016
pkgbase = linux-ck
pkgver = 4.8.14
- pkgrel = 1
+ pkgrel = 2
url = https://wiki.archlinux.org/index.php/Linux-ck
arch = i686
arch = x86_64
@@ -24,6 +24,7 @@ pkgbase = linux-ck
source = linux.preset
source = change-default-console-loglevel.patch
source = net_handle_no_dst_on_skb_in_icmp6_send.patch
+ source = 0001-x86-fpu-Fix-invalid-FPU-ptrace-state-after-execve.patch
sha256sums = 3e9150065f193d3d94bcf46a1fe9f033c7ef7122ab71d75a7fb5a2f0c9a7e11a
sha256sums = SKIP
sha256sums = efa9b7d87a6ca67426e3d7f206ac987eb7cb31602ad2011e81060626de790fcb
@@ -36,6 +37,7 @@ pkgbase = linux-ck
sha256sums = ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65
sha256sums = 1256b241cd477b265a3c2d64bdc19ffe3c9bbcee82ea3994c590c2c76e767d99
sha256sums = b595a1588bafb3d732841cd1b73633970706914f57f2d215c9f1494212d13989
+ sha256sums = 3e955e0f1aae96bb6c1507236adc952640c9bd0a134b9995ab92106a33dc02d9
pkgname = linux-ck
pkgdesc = The Linux-ck kernel and modules with the ck8 patchset featuring MuQSS CPU scheduler v0.144
diff --git a/0001-x86-fpu-Fix-invalid-FPU-ptrace-state-after-execve.patch b/0001-x86-fpu-Fix-invalid-FPU-ptrace-state-after-execve.patch
new file mode 100644
index 000000000000..8cef8463520f
--- /dev/null
+++ b/0001-x86-fpu-Fix-invalid-FPU-ptrace-state-after-execve.patch
@@ -0,0 +1,65 @@
+From 885bad1e5f32bbf30787ead9578f8174047e6904 Mon Sep 17 00:00:00 2001
+From: Yu-cheng Yu <yu-cheng.yu@intel.com>
+Date: Thu, 17 Nov 2016 09:11:35 -0800
+Subject: [PATCH] x86/fpu: Fix invalid FPU ptrace state after execve()
+
+commit b22cbe404a9cc3c7949e380fa1861e31934c8978 upstream.
+
+Robert O'Callahan reported that after an execve PTRACE_GETREGSET
+NT_X86_XSTATE continues to return the pre-exec register values
+until the exec'ed task modifies FPU state.
+
+The test code is at:
+
+ https://bugzilla.redhat.com/attachment.cgi?id=1164286.
+
+What is happening is fpu__clear() does not properly clear fpstate.
+Fix it by doing just that.
+
+Reported-by: Robert O'Callahan <robert@ocallahan.org>
+Signed-off-by: Yu-cheng Yu <yu-cheng.yu@intel.com>
+Cc: Andy Lutomirski <luto@kernel.org>
+Cc: Borislav Petkov <bp@suse.de>
+Cc: David Hansen <dave.hansen@linux.intel.com>
+Cc: Fenghua Yu <fenghua.yu@intel.com>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Ravi V. Shankar <ravi.v.shankar@intel.com>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Link: http://lkml.kernel.org/r/1479402695-6553-1-git-send-email-yu-cheng.yu@intel.com
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/x86/kernel/fpu/core.c | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/arch/x86/kernel/fpu/core.c b/arch/x86/kernel/fpu/core.c
+index 3fc03a09a93b1710..c289e2f4a6e5b464 100644
+--- a/arch/x86/kernel/fpu/core.c
++++ b/arch/x86/kernel/fpu/core.c
+@@ -517,14 +517,14 @@ void fpu__clear(struct fpu *fpu)
+ {
+ WARN_ON_FPU(fpu != &current->thread.fpu); /* Almost certainly an anomaly */
+
+- if (!use_eager_fpu() || !static_cpu_has(X86_FEATURE_FPU)) {
+- /* FPU state will be reallocated lazily at the first use. */
+- fpu__drop(fpu);
+- } else {
+- if (!fpu->fpstate_active) {
+- fpu__activate_curr(fpu);
+- user_fpu_begin();
+- }
++ fpu__drop(fpu);
++
++ /*
++ * Make sure fpstate is cleared and initialized.
++ */
++ if (static_cpu_has(X86_FEATURE_FPU)) {
++ fpu__activate_curr(fpu);
++ user_fpu_begin();
+ copy_init_fpstate_to_fpregs();
+ }
+ }
+--
+2.10.2
+
diff --git a/PKGBUILD b/PKGBUILD
index de2a7e48d945..1174c62e3f4e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -45,7 +45,7 @@ _use_current=
pkgbase=linux-ck
_srcname=linux-4.8
pkgver=4.8.14
-pkgrel=1
+pkgrel=2
_ckpatchversion=8
arch=('i686' 'x86_64')
url="https://wiki.archlinux.org/index.php/Linux-ck"
@@ -68,6 +68,7 @@ source=("http://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.xz"
'linux.preset'
'change-default-console-loglevel.patch'
'net_handle_no_dst_on_skb_in_icmp6_send.patch'
+ '0001-x86-fpu-Fix-invalid-FPU-ptrace-state-after-execve.patch'
)
sha256sums=('3e9150065f193d3d94bcf46a1fe9f033c7ef7122ab71d75a7fb5a2f0c9a7e11a'
'SKIP'
@@ -80,13 +81,15 @@ sha256sums=('3e9150065f193d3d94bcf46a1fe9f033c7ef7122ab71d75a7fb5a2f0c9a7e11a'
'834bd254b56ab71d73f59b3221f056c72f559553c04718e350ab2a3e2991afe0'
'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65'
'1256b241cd477b265a3c2d64bdc19ffe3c9bbcee82ea3994c590c2c76e767d99'
- 'b595a1588bafb3d732841cd1b73633970706914f57f2d215c9f1494212d13989')
+ 'b595a1588bafb3d732841cd1b73633970706914f57f2d215c9f1494212d13989'
+ '3e955e0f1aae96bb6c1507236adc952640c9bd0a134b9995ab92106a33dc02d9')
validpgpkeys=(
'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds
'647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman
)
_kernelname=${pkgbase#linux}
+
prepare() {
cd "${srcdir}/${_srcname}"
@@ -96,6 +99,10 @@ prepare() {
# https://bugzilla.kernel.org/show_bug.cgi?id=189851
patch -p1 -i "${srcdir}/net_handle_no_dst_on_skb_in_icmp6_send.patch"
+ # Revert a commit that causes memory corruption in i686 chroots on our
+ # build server ("valgrind bash" immediately crashes)
+ patch -Rp1 -i "${srcdir}/0001-x86-fpu-Fix-invalid-FPU-ptrace-state-after-execve.patch"
+
# set DEFAULT_CONSOLE_LOGLEVEL to 4 (same value as the 'quiet' kernel param)
# remove this when a Kconfig knob is made available by upstream
# (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227)