summaryrefslogtreecommitdiff
path: root/3.5
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-07-23 05:13:24 +0100
committerMike Frysinger <vapier@gentoo.org>2012-07-23 05:13:24 +0100
commitf876068a681389808c98200e4b707f58c63662dc (patch)
treee83225206abfaee15c510d4d96d18e4e01ea0f48 /3.5
parentadd fix from upstream for missing asm/cmpxchg.h on ia64 #427622 (diff)
downloadlinux-headers-patches-f876068a681389808c98200e4b707f58c63662dc.tar.gz
linux-headers-patches-f876068a681389808c98200e4b707f58c63662dc.tar.bz2
linux-headers-patches-f876068a681389808c98200e4b707f58c63662dc.zip
initial 3.5 patchset based on last 3.4 patchset
Diffstat (limited to '3.5')
-rw-r--r--3.5/00_all_0001-kbuild-auto-convert-size-types-in-userspace-headers.patch31
-rw-r--r--3.5/00_all_0002-linux-stat.h-remove-__GLIBC__-checks.patch28
-rw-r--r--3.5/00_all_0003-linux-stddef.h-export-offsetof-to-userspace.patch36
-rw-r--r--3.5/00_all_0004-linux-pull-in-other-needed-headers-for-userspace.patch53
-rw-r--r--3.5/00_all_0005-netfilter-pull-in-limits.h.patch28
-rw-r--r--3.5/00_all_0006-convert-PAGE_SIZE-usage.patch54
-rw-r--r--3.5/00_all_0007-asm-generic-fcntl.h-namespace-kernel-file-structs.patch54
-rw-r--r--3.5/00_all_0008-unifdef-drop-unused-errno.h-include.patch32
-rw-r--r--3.5/00_all_0009-alpha-fix-fpu.h-usage-in-userspace.patch35
9 files changed, 351 insertions, 0 deletions
diff --git a/3.5/00_all_0001-kbuild-auto-convert-size-types-in-userspace-headers.patch b/3.5/00_all_0001-kbuild-auto-convert-size-types-in-userspace-headers.patch
new file mode 100644
index 0000000..8aea973
--- /dev/null
+++ b/3.5/00_all_0001-kbuild-auto-convert-size-types-in-userspace-headers.patch
@@ -0,0 +1,31 @@
+From 36d62f734836a57a31ed38cc055bb4111d1badb2 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 29 Dec 2008 06:07:47 -0500
+Subject: [PATCH] kbuild: auto-convert size types in userspace headers
+
+Rather than constantly fixing up size type breakage in userspace headers,
+auto convert the types u_intXX_t, uintXX_t, intXX_t, uXX, and sXX to the
+appropriate __uXX or __sXX type.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ scripts/headers_install.pl | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/scripts/headers_install.pl b/scripts/headers_install.pl
+index 48462be..92101b9 100644
+--- a/scripts/headers_install.pl
++++ b/scripts/headers_install.pl
+@@ -40,6 +40,9 @@ foreach my $file (@files) {
+ $line =~ s/(^|\s)(inline)\b/$1__$2__/g;
+ $line =~ s/(^|\s)(asm)\b(\s|[(]|$)/$1__$2__$3/g;
+ $line =~ s/(^|\s|[(])(volatile)\b(\s|[(]|$)/$1__$2__$3/g;
++ $line =~ s/\b([us](8|16|32|64))\b/__$1/g;
++ $line =~ s/\b(u_?int(8|16|32|64)_t)\b/__u$2/g;
++ $line =~ s/\b(int(8|16|32|64)_t)\b/__s$2/g;
+ printf {$out} "%s", $line;
+ }
+ close $out;
+--
+1.7.9.7
+
diff --git a/3.5/00_all_0002-linux-stat.h-remove-__GLIBC__-checks.patch b/3.5/00_all_0002-linux-stat.h-remove-__GLIBC__-checks.patch
new file mode 100644
index 0000000..497aee5
--- /dev/null
+++ b/3.5/00_all_0002-linux-stat.h-remove-__GLIBC__-checks.patch
@@ -0,0 +1,28 @@
+From b37b8bf1ec46d373257b76562b9879a95c986ce9 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 29 Dec 2008 06:52:59 -0500
+Subject: [PATCH] linux/stat.h: remove __GLIBC__ checks
+
+Only check __KERNEL__ so we don't assume the C library is glibc.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ include/linux/stat.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/linux/stat.h b/include/linux/stat.h
+index 4613240..e84f489 100644
+--- a/include/linux/stat.h
++++ b/include/linux/stat.h
+@@ -7,7 +7,7 @@
+
+ #endif
+
+-#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
++#ifdef __KERNEL__
+
+ #define S_IFMT 00170000
+ #define S_IFSOCK 0140000
+--
+1.7.9.7
+
diff --git a/3.5/00_all_0003-linux-stddef.h-export-offsetof-to-userspace.patch b/3.5/00_all_0003-linux-stddef.h-export-offsetof-to-userspace.patch
new file mode 100644
index 0000000..48b22e0
--- /dev/null
+++ b/3.5/00_all_0003-linux-stddef.h-export-offsetof-to-userspace.patch
@@ -0,0 +1,36 @@
+From 5d4e7d8e7e1655b56185b6fba36dc55445d5bb6f Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Fri, 2 Jan 2009 02:34:03 -0500
+Subject: [PATCH] linux/stddef.h: export offsetof() to userspace
+
+Some userspace headers (like fuse.h) utilize the offsetof() macro. Some
+userspace packages (like lkcd) expect linux/stddef.h to provide this as
+well.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ include/linux/stddef.h | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/include/linux/stddef.h b/include/linux/stddef.h
+index 1747b67..f69354b 100644
+--- a/include/linux/stddef.h
++++ b/include/linux/stddef.h
+@@ -16,9 +16,12 @@ enum {
+ #undef offsetof
+ #ifdef __compiler_offsetof
+ #define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER)
+-#else
+-#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+ #endif
+ #endif /* __KERNEL__ */
+
++#include <stddef.h> /* newer gcc includes this */
++#ifndef offsetof
++#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
++#endif
++
+ #endif
+--
+1.7.9.7
+
diff --git a/3.5/00_all_0004-linux-pull-in-other-needed-headers-for-userspace.patch b/3.5/00_all_0004-linux-pull-in-other-needed-headers-for-userspace.patch
new file mode 100644
index 0000000..76124c9
--- /dev/null
+++ b/3.5/00_all_0004-linux-pull-in-other-needed-headers-for-userspace.patch
@@ -0,0 +1,53 @@
+From 8a1432833c1f448cead7340e2aeba95ee776b780 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 29 Dec 2008 07:41:01 -0500
+Subject: [PATCH] linux/*: pull in other needed headers for userspace
+
+mondo patch
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ include/linux/cm4000_cs.h | 1 +
+ include/linux/dn.h | 1 +
+ include/linux/ppp-ioctl.h | 1 +
+ 3 files changed, 3 insertions(+)
+
+diff --git a/include/linux/cm4000_cs.h b/include/linux/cm4000_cs.h
+index 3c4aac4..ac230b6 100644
+--- a/include/linux/cm4000_cs.h
++++ b/include/linux/cm4000_cs.h
+@@ -2,6 +2,7 @@
+ #define _CM4000_H_
+
+ #include <linux/types.h>
++#include <linux/ioctl.h>
+
+ #define MAX_ATR 33
+
+diff --git a/include/linux/dn.h b/include/linux/dn.h
+index 9c50445..dc9f005 100644
+--- a/include/linux/dn.h
++++ b/include/linux/dn.h
+@@ -1,6 +1,7 @@
+ #ifndef _LINUX_DN_H
+ #define _LINUX_DN_H
+
++#include <linux/ioctl.h>
+ #include <linux/types.h>
+
+ /*
+diff --git a/include/linux/ppp-ioctl.h b/include/linux/ppp-ioctl.h
+index 2d9a885..63a23a3 100644
+--- a/include/linux/ppp-ioctl.h
++++ b/include/linux/ppp-ioctl.h
+@@ -12,6 +12,7 @@
+
+ #include <linux/types.h>
+ #include <linux/compiler.h>
++#include <linux/ppp_defs.h>
+
+ /*
+ * Bit definitions for flags argument to PPPIOCGFLAGS/PPPIOCSFLAGS.
+--
+1.7.9.7
+
diff --git a/3.5/00_all_0005-netfilter-pull-in-limits.h.patch b/3.5/00_all_0005-netfilter-pull-in-limits.h.patch
new file mode 100644
index 0000000..a0b2161
--- /dev/null
+++ b/3.5/00_all_0005-netfilter-pull-in-limits.h.patch
@@ -0,0 +1,28 @@
+From 0b94b75a43b5dcbd2fe37fba112159f511647397 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 9 May 2009 17:30:35 -0400
+Subject: [PATCH] netfilter: pull in limits.h
+
+A few netfilter sub-headers use INT_MAX which is in limits.h.
+
+URL: http://bugs.gentoo.org/246160
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ include/linux/netfilter.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
+index ff9c84c..ac6bae0 100644
+--- a/include/linux/netfilter.h
++++ b/include/linux/netfilter.h
+@@ -14,6 +14,7 @@
+ #include <linux/types.h>
+ #include <linux/compiler.h>
+ #include <linux/sysctl.h>
++#include <limits.h>
+
+ /* Responses from hook functions. */
+ #define NF_DROP 0
+--
+1.7.9.7
+
diff --git a/3.5/00_all_0006-convert-PAGE_SIZE-usage.patch b/3.5/00_all_0006-convert-PAGE_SIZE-usage.patch
new file mode 100644
index 0000000..187dbb2
--- /dev/null
+++ b/3.5/00_all_0006-convert-PAGE_SIZE-usage.patch
@@ -0,0 +1,54 @@
+From 6c8d69562e721705d18fb3e3f969278b4ade9f51 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 13 Feb 2010 03:09:23 -0500
+Subject: [PATCH] convert PAGE_SIZE usage
+
+The size of a page may change at runtime or based on kernel settings, so
+a static value at compile time doesn't work. More importantly, no one
+exports PAGE_SIZE to user space anymore.
+
+URL: http://bugs.gentoo.org/301431
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ include/linux/binfmts.h | 3 ++-
+ include/linux/resource.h | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h
+index 366422b..589502a 100644
+--- a/include/linux/binfmts.h
++++ b/include/linux/binfmts.h
+@@ -1,6 +1,7 @@
+ #ifndef _LINUX_BINFMTS_H
+ #define _LINUX_BINFMTS_H
+
++#include <unistd.h>
+ #include <linux/capability.h>
+
+ struct pt_regs;
+@@ -11,7 +12,7 @@ struct pt_regs;
+ * prevent the kernel from being unduly impacted by misaddressed pointers.
+ * MAX_ARG_STRINGS is chosen to fit in a signed 32-bit integer.
+ */
+-#define MAX_ARG_STRLEN (PAGE_SIZE * 32)
++#define MAX_ARG_STRLEN (sysconf(_SC_PAGESIZE) * 32)
+ #define MAX_ARG_STRINGS 0x7FFFFFFF
+
+ /* sizeof(linux_binprm->buf) */
+diff --git a/include/linux/resource.h b/include/linux/resource.h
+index d01c96c..5a0559d 100644
+--- a/include/linux/resource.h
++++ b/include/linux/resource.h
+@@ -68,7 +68,8 @@ struct rlimit64 {
+ * GPG2 wants 64kB of mlocked memory, to make sure pass phrases
+ * and other sensitive information are never written to disk.
+ */
+-#define MLOCK_LIMIT ((PAGE_SIZE > 64*1024) ? PAGE_SIZE : 64*1024)
++/* No one currently defines PAGE_SIZE bigger than 64kB */
++#define MLOCK_LIMIT (64 * 1024)
+
+ /*
+ * Due to binary compatibility, the actual resource numbers
+--
+1.7.9.7
+
diff --git a/3.5/00_all_0007-asm-generic-fcntl.h-namespace-kernel-file-structs.patch b/3.5/00_all_0007-asm-generic-fcntl.h-namespace-kernel-file-structs.patch
new file mode 100644
index 0000000..63038ba
--- /dev/null
+++ b/3.5/00_all_0007-asm-generic-fcntl.h-namespace-kernel-file-structs.patch
@@ -0,0 +1,54 @@
+From b8757e255a2e8117a57079af158af0bcc1384713 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 29 Dec 2008 07:39:14 -0500
+Subject: [PATCH] asm-generic/fcntl.h: namespace kernel file structs
+
+No one should be using these structs, but just in case they are,
+keep them available in the __kernel_ namespace.
+
+Otherwise, trying to include something like:
+ #include <fcntl.h>
+ #include <linux/inotify.h>
+leads to horrible failure.
+
+URL: http://bugs.gentoo.org/244470
+URL: http://bugs.gentoo.org/388633
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ include/asm-generic/fcntl.h | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/include/asm-generic/fcntl.h b/include/asm-generic/fcntl.h
+index 9e5b035..fc2dba0 100644
+--- a/include/asm-generic/fcntl.h
++++ b/include/asm-generic/fcntl.h
+@@ -124,7 +124,7 @@
+ #define F_OWNER_PID 1
+ #define F_OWNER_PGRP 2
+
+-struct f_owner_ex {
++struct __kernel_f_owner_ex {
+ int type;
+ __kernel_pid_t pid;
+ };
+@@ -164,7 +164,7 @@ struct f_owner_ex {
+ #define __ARCH_FLOCK_PAD
+ #endif
+
+-struct flock {
++struct __kernel_flock {
+ short l_type;
+ short l_whence;
+ __kernel_off_t l_start;
+@@ -181,7 +181,7 @@ struct flock {
+ #define __ARCH_FLOCK64_PAD
+ #endif
+
+-struct flock64 {
++struct __kernel_flock64 {
+ short l_type;
+ short l_whence;
+ __kernel_loff_t l_start;
+--
+1.7.9.7
+
diff --git a/3.5/00_all_0008-unifdef-drop-unused-errno.h-include.patch b/3.5/00_all_0008-unifdef-drop-unused-errno.h-include.patch
new file mode 100644
index 0000000..9d8dc23
--- /dev/null
+++ b/3.5/00_all_0008-unifdef-drop-unused-errno.h-include.patch
@@ -0,0 +1,32 @@
+From 1515d508189f6647cda4380fdcccd84a36a931d1 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Tue, 6 Dec 2011 17:22:42 -0500
+Subject: [PATCH] unifdef: drop unused errno.h include
+
+This is the only header on my system that ends up requiring kernel
+headers, so if the kernel headers aren't available, we end up being
+unable to install kernel headers :).
+
+Since this file doesn't actually use anything from errno.h, drop
+the include so it at least makes us a bit more robust on glibc.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ scripts/unifdef.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/scripts/unifdef.c b/scripts/unifdef.c
+index 7493c0e..c5dfae5 100644
+--- a/scripts/unifdef.c
++++ b/scripts/unifdef.c
+@@ -48,7 +48,6 @@
+
+ #include <ctype.h>
+ #include <err.h>
+-#include <errno.h>
+ #include <stdarg.h>
+ #include <stdbool.h>
+ #include <stdio.h>
+--
+1.7.9.7
+
diff --git a/3.5/00_all_0009-alpha-fix-fpu.h-usage-in-userspace.patch b/3.5/00_all_0009-alpha-fix-fpu.h-usage-in-userspace.patch
new file mode 100644
index 0000000..510468b
--- /dev/null
+++ b/3.5/00_all_0009-alpha-fix-fpu.h-usage-in-userspace.patch
@@ -0,0 +1,35 @@
+From 18b46b8c25273d8a7ee3bc280ccc635b861664eb Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Fri, 25 May 2012 01:37:11 -0400
+Subject: [PATCH] alpha: fix fpu.h usage in userspace
+
+After commit ec2212088c42ff7d1362629ec26dda4f3e8bdad3, the fpu.h header
+which we install for userland started depending on special_insns.h which
+is not installed. However, fpu.h only uses that for __KERNEL__ code, so
+protect the inclusion the same way to avoid build breakage in glibc:
+/usr/include/asm/fpu.h:4:31: fatal error: asm/special_insns.h: No such file or directory
+
+Cc: stable@vger.kernel.org
+Reported-by: Matt Turner <mattst88@gentoo.org>
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ arch/alpha/include/asm/fpu.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/arch/alpha/include/asm/fpu.h b/arch/alpha/include/asm/fpu.h
+index db00f78..e477bcd 100644
+--- a/arch/alpha/include/asm/fpu.h
++++ b/arch/alpha/include/asm/fpu.h
+@@ -1,7 +1,9 @@
+ #ifndef __ASM_ALPHA_FPU_H
+ #define __ASM_ALPHA_FPU_H
+
++#ifdef __KERNEL__
+ #include <asm/special_insns.h>
++#endif
+
+ /*
+ * Alpha floating-point control register defines:
+--
+1.7.9.7
+