diff options
Diffstat (limited to 'libre-testing')
4 files changed, 71 insertions, 105 deletions
diff --git a/libre-testing/linux-libre/0001-quirk-asm_volatile_goto.patch b/libre-testing/linux-libre/0001-quirk-asm_volatile_goto.patch new file mode 100644 index 000000000..c9ee40400 --- /dev/null +++ b/libre-testing/linux-libre/0001-quirk-asm_volatile_goto.patch @@ -0,0 +1,51 @@ +From a9f180345f5378ac87d80ed0bea55ba421d83859 Mon Sep 17 00:00:00 2001 +From: Steven Noonan <steven@uplinklabs.net> +Date: Thu, 13 Feb 2014 07:01:07 +0000 +Subject: compiler/gcc4: Make quirk for asm_volatile_goto() unconditional + +I started noticing problems with KVM guest destruction on Linux +3.12+, where guest memory wasn't being cleaned up. I bisected it +down to the commit introducing the new 'asm goto'-based atomics, +and found this quirk was later applied to those. + +Unfortunately, even with GCC 4.8.2 (which ostensibly fixed the +known 'asm goto' bug) I am still getting some kind of +miscompilation. If I enable the asm_volatile_goto quirk for my +compiler, KVM guests are destroyed correctly and the memory is +cleaned up. + +So make the quirk unconditional for now, until bug is found +and fixed. + +Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> +Signed-off-by: Steven Noonan <steven@uplinklabs.net> +Cc: Peter Zijlstra <peterz@infradead.org> +Cc: Steven Rostedt <rostedt@goodmis.org> +Cc: Jakub Jelinek <jakub@redhat.com> +Cc: Richard Henderson <rth@twiddle.net> +Cc: Andrew Morton <akpm@linux-foundation.org> +Cc: Oleg Nesterov <oleg@redhat.com> +Cc: <stable@vger.kernel.org> +Link: http://lkml.kernel.org/r/1392274867-15236-1-git-send-email-steven@uplinklabs.net +Link: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 +Signed-off-by: Ingo Molnar <mingo@kernel.org> +--- +diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h +index ded4299..2507fd2 100644 +--- a/include/linux/compiler-gcc4.h ++++ b/include/linux/compiler-gcc4.h +@@ -75,11 +75,7 @@ + * + * (asm goto is automatically volatile - the naming reflects this.) + */ +-#if GCC_VERSION <= 40801 +-# define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) +-#else +-# define asm_volatile_goto(x...) do { asm goto(x); } while (0) +-#endif ++#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) + + #ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP + #if GCC_VERSION >= 40400 +-- +cgit v0.9.2 diff --git a/libre-testing/linux-libre/0001-x86-x32-Correct-invalid-use-of-user-timespec-in-the-.patch b/libre-testing/linux-libre/0001-x86-x32-Correct-invalid-use-of-user-timespec-in-the-.patch deleted file mode 100644 index 3f1bccc80..000000000 --- a/libre-testing/linux-libre/0001-x86-x32-Correct-invalid-use-of-user-timespec-in-the-.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 2def2ef2ae5f3990aabdbe8a755911902707d268 Mon Sep 17 00:00:00 2001 -From: PaX Team <pageexec@freemail.hu> -Date: Thu, 30 Jan 2014 16:59:25 -0800 -Subject: [PATCH] x86, x32: Correct invalid use of user timespec in the kernel - -The x32 case for the recvmsg() timout handling is broken: - - asmlinkage long compat_sys_recvmmsg(int fd, struct compat_mmsghdr __user *mmsg, - unsigned int vlen, unsigned int flags, - struct compat_timespec __user *timeout) - { - int datagrams; - struct timespec ktspec; - - if (flags & MSG_CMSG_COMPAT) - return -EINVAL; - - if (COMPAT_USE_64BIT_TIME) - return __sys_recvmmsg(fd, (struct mmsghdr __user *)mmsg, vlen, - flags | MSG_CMSG_COMPAT, - (struct timespec *) timeout); - ... - -The timeout pointer parameter is provided by userland (hence the __user -annotation) but for x32 syscalls it's simply cast to a kernel pointer -and is passed to __sys_recvmmsg which will eventually directly -dereference it for both reading and writing. Other callers to -__sys_recvmmsg properly copy from userland to the kernel first. - -The bug was introduced by commit ee4fa23c4bfc ("compat: Use -COMPAT_USE_64BIT_TIME in net/compat.c") and should affect all kernels -since 3.4 (and perhaps vendor kernels if they backported x32 support -along with this code). - -Note that CONFIG_X86_X32_ABI gets enabled at build time and only if -CONFIG_X86_X32 is enabled and ld can build x32 executables. - -Other uses of COMPAT_USE_64BIT_TIME seem fine. - -This addresses CVE-2014-0038. - -Signed-off-by: PaX Team <pageexec@freemail.hu> -Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> -Cc: <stable@vger.kernel.org> # v3.4+ -Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> ---- - net/compat.c | 9 ++------- - 1 file changed, 2 insertions(+), 7 deletions(-) - -diff --git a/net/compat.c b/net/compat.c -index dd32e34..f50161f 100644 ---- a/net/compat.c -+++ b/net/compat.c -@@ -780,21 +780,16 @@ asmlinkage long compat_sys_recvmmsg(int fd, struct compat_mmsghdr __user *mmsg, - if (flags & MSG_CMSG_COMPAT) - return -EINVAL; - -- if (COMPAT_USE_64BIT_TIME) -- return __sys_recvmmsg(fd, (struct mmsghdr __user *)mmsg, vlen, -- flags | MSG_CMSG_COMPAT, -- (struct timespec *) timeout); -- - if (timeout == NULL) - return __sys_recvmmsg(fd, (struct mmsghdr __user *)mmsg, vlen, - flags | MSG_CMSG_COMPAT, NULL); - -- if (get_compat_timespec(&ktspec, timeout)) -+ if (compat_get_timespec(&ktspec, timeout)) - return -EFAULT; - - datagrams = __sys_recvmmsg(fd, (struct mmsghdr __user *)mmsg, vlen, - flags | MSG_CMSG_COMPAT, &ktspec); -- if (datagrams > 0 && put_compat_timespec(&ktspec, timeout)) -+ if (datagrams > 0 && compat_put_timespec(&ktspec, timeout)) - datagrams = -EFAULT; - - return datagrams; --- -1.8.5.3 - diff --git a/libre-testing/linux-libre/ChangeLog b/libre-testing/linux-libre/ChangeLog index 9020464ef..5259f3e89 100644 --- a/libre-testing/linux-libre/ChangeLog +++ b/libre-testing/linux-libre/ChangeLog @@ -1,8 +1,3 @@ -2013-10-20 André Silva <emulatorman@parabola.nu> - - * linux-libre-3.11.5-1 - * Replaced email account emulatorman@lavabit.com to emulatorman@parabola.nu. - 2013-07-15 André Silva <emulatorman@parabola.nu> * linux-libre-3.10.1-1 @@ -18,27 +13,27 @@ * linux-libre-3.7.1-1 * Replaced CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org" to CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="linux-libre.fsfla.org" -2012-06-23 André Silva <emulatorman@parabola.nu> - - * linux-libre-3.4.4-1 - * Replaced email account andre.paulista@adinet.com.uy to emulatorman@lavabit.com. - 2012-05-26 André Silva <emulatorman@parabola.nu> * linux-libre-3.4-1.2 - * Disabled CONFIG_MICROCODE_INTEL and CONFIG_MICROCODE_AMD modules https://labs.parabola.nu/issues/116 + * Disabled CONFIG_MICROCODE_INTEL and CONFIG_MICROCODE_AMD modules [3] 2012-04-24 André Silva <emulatorman@parabola.nu> * linux-libre-3.3.3-1 - * Disabled CONFIG_STUB_POULSBO module https://labs.parabola.nu/issues/90 + * Disabled CONFIG_STUB_POULSBO module [2] 2012-04-08 André Silva <emulatorman@parabola.nu> * linux-libre-3.3.1-1.1 - * Disabled CONFIG_IPW2100 and CONFIG_IPW2200 modules https://labs.parabola.nu/issues/47 + * Disabled CONFIG_IPW2100 and CONFIG_IPW2200 modules [1] 2012-03-03 André Silva <emulatorman@parabola.nu> * linux-libre-3.2.9-2 - * Enabled CONFIG_FB_VT8623 module https://labs.parabola.nu/issues/14 + * Enabled CONFIG_FB_VT8623 module [0] + +[0] https://labs.parabola.nu/issues/14 +[1] https://labs.parabola.nu/issues/47 +[2] https://labs.parabola.nu/issues/90 +[3] https://labs.parabola.nu/issues/116 diff --git a/libre-testing/linux-libre/PKGBUILD b/libre-testing/linux-libre/PKGBUILD index c9368029f..09d3b6d49 100644 --- a/libre-testing/linux-libre/PKGBUILD +++ b/libre-testing/linux-libre/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 204858 2014-01-29 14:54:08Z tpowa $ +# $Id: PKGBUILD 205930 2014-02-14 08:13:44Z tpowa $ # Maintainer: Tobias Powalowski <tpowa@archlinux.org> # Maintainer: Thomas Baechler <thomas@archlinux.org> # Maintainer (Parabola): André Silva <emulatorman@parabola.nu> @@ -10,10 +10,10 @@ pkgbase=linux-libre # Build stock -LIBRE kernel #pkgbase=linux-libre-custom # Build kernel with a different name _basekernel=3.13 -_sublevel=1 +_sublevel=3 pkgver=${_basekernel}.${_sublevel} -pkgrel=2 -_lxopkgver=${_basekernel}.1 # nearly always the same as pkgver +pkgrel=1 +_lxopkgver=${_basekernel}.2 # nearly always the same as pkgver arch=('i686' 'x86_64' 'mips64el') url="http://linux-libre.fsfla.org/" license=('GPL2') @@ -37,11 +37,11 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-gn '0005-sunrpc-add-an-info-file-for-the-dummy-gssd-pipe.patch' '0006-rpc_pipe-fix-cleanup-of-dummy-gssd-directory-when-no.patch' '0001-syscalls.h-use-gcc-alias-instead-of-assembler-aliase.patch' + '0001-quirk-asm_volatile_goto.patch' 'i8042-fix-aliases.patch' - '0001-x86-x32-Correct-invalid-use-of-user-timespec-in-the-.patch' "http://www.linux-libre.fsfla.org/pub/linux-libre/lemote/gnewsense/pool/debuginfo/linux-patches-${_lxopkgver}-gnu_0loongsonlibre_mipsel.tar.xz") md5sums=('98a8e803e0ed08557f3cdd4d56b0ddc1' - '312e6bf90c4de3f455669f8cccf4eddd' + 'de4e4158ff1711cd57196f323358d0ec' 'b6a3a3f9cac1be38384241ad58d45d46' '3740951ae165b89a2139d45ae7d82173' 'e49ac236dfeef709f91a3d993ea7b62c' @@ -57,9 +57,9 @@ md5sums=('98a8e803e0ed08557f3cdd4d56b0ddc1' 'd5907a721b97299f0685c583499f7820' 'a724515b350b29c53f20e631c6cf9a14' 'e6fa278c092ad83780e2dd0568e24ca6' + '6baa312bc166681f48e972824f3f6649' '93dbf73af819b77f03453a9c6de2bb47' - '336d2c4afd7ee5f2bdf0dcb1a54df4b2' - '7710668dfdd138f3ad0b93c50455455e') + 'cffddbeccd11e296654374b0a1f1bbf9') if [ "$CARCH" != "mips64el" ]; then # don't use the Loongson-specific patches on non-mips64el arches. unset source[${#source[@]}-1] @@ -111,9 +111,9 @@ prepare() { # Fix i8042 aliases patch -p1 -i "${srcdir}/i8042-fix-aliases.patch" - - # Fix CVE-2014-0038 - patch -p1 -i "${srcdir}/0001-x86-x32-Correct-invalid-use-of-user-timespec-in-the-.patch" + # Fix compile issues + # http://git.kernel.org/cgit/linux/kernel/git/tip/tip.git/patch/?id=a9f180345f5378ac87d80ed0bea55ba421d83859 + patch -Np1 -i "${srcdir}/0001-quirk-asm_volatile_goto.patch" if [ "$CARCH" == "mips64el" ]; then sed -i "s|^EXTRAVERSION.*|EXTRAVERSION =-libre|" Makefile |