diff options
author | 2012-03-22 22:10:01 +0000 | |
---|---|---|
committer | 2012-03-22 22:10:01 +0000 | |
commit | 84948530fe921ba935b413bffbc896badc1302d7 (patch) | |
tree | 73b59f18c33bf80718ce840efb5c57d56f959906 | |
parent | x32 syscalls have changed, so these patches are out of date (diff) | |
download | linux-headers-patches-84948530fe921ba935b413bffbc896badc1302d7.tar.gz linux-headers-patches-84948530fe921ba935b413bffbc896badc1302d7.tar.bz2 linux-headers-patches-84948530fe921ba935b413bffbc896badc1302d7.zip |
initial 3.3 patchset based on last 3.2 patchset
9 files changed, 344 insertions, 0 deletions
diff --git a/3.3/00_all_0001-kbuild-auto-convert-size-types-in-userspace-headers.patch b/3.3/00_all_0001-kbuild-auto-convert-size-types-in-userspace-headers.patch new file mode 100644 index 0000000..7b5eea8 --- /dev/null +++ b/3.3/00_all_0001-kbuild-auto-convert-size-types-in-userspace-headers.patch @@ -0,0 +1,31 @@ +From a6d56947055a5f241558e0a3cc282803c6868cf2 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 files changed, 3 insertions(+), 0 deletions(-) + +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.8.5 + diff --git a/3.3/00_all_0002-linux-stat.h-remove-__GLIBC__-checks.patch b/3.3/00_all_0002-linux-stat.h-remove-__GLIBC__-checks.patch new file mode 100644 index 0000000..c3f64b9 --- /dev/null +++ b/3.3/00_all_0002-linux-stat.h-remove-__GLIBC__-checks.patch @@ -0,0 +1,28 @@ +From f9575758ea8e8ceab9c97954100e6467dd5c7dc7 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 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/include/linux/stat.h b/include/linux/stat.h +index 611c398..5460344 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.8.5 + diff --git a/3.3/00_all_0003-linux-stddef.h-export-offsetof-to-userspace.patch b/3.3/00_all_0003-linux-stddef.h-export-offsetof-to-userspace.patch new file mode 100644 index 0000000..502fb90 --- /dev/null +++ b/3.3/00_all_0003-linux-stddef.h-export-offsetof-to-userspace.patch @@ -0,0 +1,36 @@ +From 2b1f64b7d33d40be152b0fe15175b6eb632a476d 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 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/include/linux/stddef.h b/include/linux/stddef.h +index 6a40c76..4894d59 100644 +--- a/include/linux/stddef.h ++++ b/include/linux/stddef.h +@@ -20,9 +20,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.8.5 + diff --git a/3.3/00_all_0004-linux-pull-in-other-needed-headers-for-userspace.patch b/3.3/00_all_0004-linux-pull-in-other-needed-headers-for-userspace.patch new file mode 100644 index 0000000..b421f22 --- /dev/null +++ b/3.3/00_all_0004-linux-pull-in-other-needed-headers-for-userspace.patch @@ -0,0 +1,53 @@ +From 9891f7b6ffd4dad76945d9f6a28f23ea80e5463d 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/if_ppp.h | 1 + + 3 files changed, 3 insertions(+), 0 deletions(-) + +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/if_ppp.h b/include/linux/if_ppp.h +index c9ad383..4d70e16 100644 +--- a/include/linux/if_ppp.h ++++ b/include/linux/if_ppp.h +@@ -35,6 +35,7 @@ + + #include <linux/types.h> + #include <linux/compiler.h> ++#include <linux/ppp_defs.h> + + /* + * Packet sizes +-- +1.7.8.5 + diff --git a/3.3/00_all_0005-netfilter-pull-in-limits.h.patch b/3.3/00_all_0005-netfilter-pull-in-limits.h.patch new file mode 100644 index 0000000..df5adde --- /dev/null +++ b/3.3/00_all_0005-netfilter-pull-in-limits.h.patch @@ -0,0 +1,28 @@ +From fb0abd83ab6c9c0016e87c2930a666c392d8ed40 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 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h +index b809265..62230a30 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.8.5 + diff --git a/3.3/00_all_0006-convert-PAGE_SIZE-usage.patch b/3.3/00_all_0006-convert-PAGE_SIZE-usage.patch new file mode 100644 index 0000000..6a02d7f --- /dev/null +++ b/3.3/00_all_0006-convert-PAGE_SIZE-usage.patch @@ -0,0 +1,54 @@ +From b45295eacf46424d5331a07539432af73a22b2af 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 0092102..76afafa 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.8.5 + diff --git a/3.3/00_all_0007-asm-generic-fcntl.h-namespace-kernel-file-structs.patch b/3.3/00_all_0007-asm-generic-fcntl.h-namespace-kernel-file-structs.patch new file mode 100644 index 0000000..51515c7 --- /dev/null +++ b/3.3/00_all_0007-asm-generic-fcntl.h-namespace-kernel-file-structs.patch @@ -0,0 +1,54 @@ +From 7603f10c5ded509cd567ac3dab394909f736cf97 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 files 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.8.5 + diff --git a/3.3/00_all_0008-unifdef-drop-unused-errno.h-include.patch b/3.3/00_all_0008-unifdef-drop-unused-errno.h-include.patch new file mode 100644 index 0000000..a4c3a3b --- /dev/null +++ b/3.3/00_all_0008-unifdef-drop-unused-errno.h-include.patch @@ -0,0 +1,32 @@ +From c3df6fc7f68ecfb981cc97cdc9e084ac715c4205 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 files changed, 0 insertions(+), 1 deletions(-) + +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.8.5 + diff --git a/3.3/00_all_0009-ext2-fix-ext2_mask_flags-prototype.patch b/3.3/00_all_0009-ext2-fix-ext2_mask_flags-prototype.patch new file mode 100644 index 0000000..da7d311 --- /dev/null +++ b/3.3/00_all_0009-ext2-fix-ext2_mask_flags-prototype.patch @@ -0,0 +1,28 @@ +From cebf7b58f43040a68b20e0b18a7ce68fce285ef5 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Thu, 22 Mar 2012 18:01:53 -0400 +Subject: [PATCH] ext2: fix ext2_mask_flags prototype + +Let upstream sort out what to do. Just make it work again. + +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + include/linux/ext2_fs.h | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/include/linux/ext2_fs.h b/include/linux/ext2_fs.h +index ce1b719..5d073a3 100644 +--- a/include/linux/ext2_fs.h ++++ b/include/linux/ext2_fs.h +@@ -209,7 +209,7 @@ struct ext2_group_desc + #define EXT2_OTHER_FLMASK (EXT2_NODUMP_FL | EXT2_NOATIME_FL) + + /* Mask out flags that are inappropriate for the given type of inode. */ +-static inline __u32 ext2_mask_flags(umode_t mode, __u32 flags) ++static inline __u32 ext2_mask_flags(__le16 mode, __u32 flags) + { + if (S_ISDIR(mode)) + return flags; +-- +1.7.8.5 + |