summaryrefslogtreecommitdiff
path: root/3.6
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-10-01 07:56:03 +0100
committerMike Frysinger <vapier@gentoo.org>2012-10-01 07:56:03 +0100
commit66b6f2083e741e32ab3394fd480f4c390519ef41 (patch)
treec82f9588d709a56ab54e0b4818c0cf6d6acc38c1 /3.6
parentinitial 3.5 patchset based on last 3.4 patchset (diff)
downloadlinux-headers-patches-66b6f2083e741e32ab3394fd480f4c390519ef41.tar.gz
linux-headers-patches-66b6f2083e741e32ab3394fd480f4c390519ef41.tar.bz2
linux-headers-patches-66b6f2083e741e32ab3394fd480f4c390519ef41.zip
inital 3.6 patchset based on last 3.5 patchset
Diffstat (limited to '3.6')
-rw-r--r--3.6/00_all_0001-kbuild-auto-convert-size-types-in-userspace-headers.patch31
-rw-r--r--3.6/00_all_0002-linux-stat.h-remove-__GLIBC__-checks.patch28
-rw-r--r--3.6/00_all_0003-linux-stddef.h-export-offsetof-to-userspace.patch36
-rw-r--r--3.6/00_all_0004-linux-pull-in-other-needed-headers-for-userspace.patch53
-rw-r--r--3.6/00_all_0005-netfilter-pull-in-limits.h.patch28
-rw-r--r--3.6/00_all_0006-convert-PAGE_SIZE-usage.patch54
-rw-r--r--3.6/00_all_0007-asm-generic-fcntl.h-namespace-kernel-file-structs.patch54
-rw-r--r--3.6/00_all_0008-unifdef-drop-unused-errno.h-include.patch32
8 files changed, 316 insertions, 0 deletions
diff --git a/3.6/00_all_0001-kbuild-auto-convert-size-types-in-userspace-headers.patch b/3.6/00_all_0001-kbuild-auto-convert-size-types-in-userspace-headers.patch
new file mode 100644
index 0000000..35893bd
--- /dev/null
+++ b/3.6/00_all_0001-kbuild-auto-convert-size-types-in-userspace-headers.patch
@@ -0,0 +1,31 @@
+From f70dfad40f32ede761e5606a1fe8dbb47c66569d 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.12
+
diff --git a/3.6/00_all_0002-linux-stat.h-remove-__GLIBC__-checks.patch b/3.6/00_all_0002-linux-stat.h-remove-__GLIBC__-checks.patch
new file mode 100644
index 0000000..92682ce
--- /dev/null
+++ b/3.6/00_all_0002-linux-stat.h-remove-__GLIBC__-checks.patch
@@ -0,0 +1,28 @@
+From 0502dd5833669ee7cf460f4be096a4718f39ea34 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.12
+
diff --git a/3.6/00_all_0003-linux-stddef.h-export-offsetof-to-userspace.patch b/3.6/00_all_0003-linux-stddef.h-export-offsetof-to-userspace.patch
new file mode 100644
index 0000000..c0d9307
--- /dev/null
+++ b/3.6/00_all_0003-linux-stddef.h-export-offsetof-to-userspace.patch
@@ -0,0 +1,36 @@
+From fd7395db33844ddd6289e959f64779ccd253347c 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.12
+
diff --git a/3.6/00_all_0004-linux-pull-in-other-needed-headers-for-userspace.patch b/3.6/00_all_0004-linux-pull-in-other-needed-headers-for-userspace.patch
new file mode 100644
index 0000000..74a7bbf
--- /dev/null
+++ b/3.6/00_all_0004-linux-pull-in-other-needed-headers-for-userspace.patch
@@ -0,0 +1,53 @@
+From 557be17e680b283b86c9cf7eb2e7a97aeb5e9ebd 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.12
+
diff --git a/3.6/00_all_0005-netfilter-pull-in-limits.h.patch b/3.6/00_all_0005-netfilter-pull-in-limits.h.patch
new file mode 100644
index 0000000..b94fdbe
--- /dev/null
+++ b/3.6/00_all_0005-netfilter-pull-in-limits.h.patch
@@ -0,0 +1,28 @@
+From 0bfe8329127e86851703fefae0e7314594745a30 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 c613cf0..13b729e 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.12
+
diff --git a/3.6/00_all_0006-convert-PAGE_SIZE-usage.patch b/3.6/00_all_0006-convert-PAGE_SIZE-usage.patch
new file mode 100644
index 0000000..5c073a7
--- /dev/null
+++ b/3.6/00_all_0006-convert-PAGE_SIZE-usage.patch
@@ -0,0 +1,54 @@
+From 88c724e02c2c4dd5afc679df0c72287d043cb917 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.12
+
diff --git a/3.6/00_all_0007-asm-generic-fcntl.h-namespace-kernel-file-structs.patch b/3.6/00_all_0007-asm-generic-fcntl.h-namespace-kernel-file-structs.patch
new file mode 100644
index 0000000..9595299
--- /dev/null
+++ b/3.6/00_all_0007-asm-generic-fcntl.h-namespace-kernel-file-structs.patch
@@ -0,0 +1,54 @@
+From 6f9f589d74c099f5f875c203716316a9bf76623d 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 a48937d..43a6e03 100644
+--- a/include/asm-generic/fcntl.h
++++ b/include/asm-generic/fcntl.h
+@@ -128,7 +128,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;
+ };
+@@ -168,7 +168,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;
+@@ -185,7 +185,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.12
+
diff --git a/3.6/00_all_0008-unifdef-drop-unused-errno.h-include.patch b/3.6/00_all_0008-unifdef-drop-unused-errno.h-include.patch
new file mode 100644
index 0000000..ca6738e
--- /dev/null
+++ b/3.6/00_all_0008-unifdef-drop-unused-errno.h-include.patch
@@ -0,0 +1,32 @@
+From 8c9fd4dffd087d9dfcb369979c342409f6672f96 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.12
+