diff options
author | Mike Frysinger <vapier@gentoo.org> | 2013-09-03 05:08:10 +0100 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2013-09-03 05:08:10 +0100 |
commit | b5f26bbf0f6e5d77dbbee0d04f48df60e695f74b (patch) | |
tree | 5d1cdf4195084d76a1b4de1a6357bc57d981e252 /3.11 | |
parent | initial 3.10 patchset based on last 3.9 patchset (diff) | |
download | linux-headers-patches-b5f26bbf0f6e5d77dbbee0d04f48df60e695f74b.tar.gz linux-headers-patches-b5f26bbf0f6e5d77dbbee0d04f48df60e695f74b.tar.bz2 linux-headers-patches-b5f26bbf0f6e5d77dbbee0d04f48df60e695f74b.zip |
initial 3.11 patchset based on last 3.10 patchset
Diffstat (limited to '3.11')
9 files changed, 376 insertions, 0 deletions
diff --git a/3.11/00_all_0001-kbuild-auto-convert-size-types-in-userspace-headers.patch b/3.11/00_all_0001-kbuild-auto-convert-size-types-in-userspace-headers.patch new file mode 100644 index 0000000..b1bc026 --- /dev/null +++ b/3.11/00_all_0001-kbuild-auto-convert-size-types-in-userspace-headers.patch @@ -0,0 +1,31 @@ +From 99fad64f4ad061de4cbe468147861b1d8a08b2a5 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Mon, 29 Dec 2008 06:07:47 -0500 +Subject: [PATCH 1/9] 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.sh | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/scripts/headers_install.sh b/scripts/headers_install.sh +index 5de5660..38c8b2f 100644 +--- a/scripts/headers_install.sh ++++ b/scripts/headers_install.sh +@@ -37,6 +37,9 @@ do + -e 's/(^|[^a-zA-Z0-9])__packed([^a-zA-Z0-9_]|$)/\1__attribute__((packed))\2/g' \ + -e 's/(^|[ \t(])(inline|asm|volatile)([ \t(]|$)/\1__\2__\3/g' \ + -e 's@#(ifndef|define|endif[ \t]*/[*])[ \t]*_UAPI@#\1 @' \ ++ -e 's/\b([us](8|16|32|64))\b/__\1/g' \ ++ -e 's/\b(u_?int(8|16|32|64)_t)\b/__u\2/g' \ ++ -e 's/\b(int(8|16|32|64)_t)\b/__s\2/g' \ + "$SRCDIR/$i" > "$OUTDIR/$FILE.sed" || exit 1 + scripts/unifdef -U__KERNEL__ -D__EXPORTED_HEADERS__ "$OUTDIR/$FILE.sed" \ + > "$OUTDIR/$FILE" +-- +1.8.3.2 + diff --git a/3.11/00_all_0002-linux-stat.h-remove-__GLIBC__-checks.patch b/3.11/00_all_0002-linux-stat.h-remove-__GLIBC__-checks.patch new file mode 100644 index 0000000..3ad2d04 --- /dev/null +++ b/3.11/00_all_0002-linux-stat.h-remove-__GLIBC__-checks.patch @@ -0,0 +1,28 @@ +From 5cf4a58e8fec36621c693fa1fc13790cf4c9a64a Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Mon, 29 Dec 2008 06:52:59 -0500 +Subject: [PATCH 2/9] 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/uapi/linux/stat.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/uapi/linux/stat.h b/include/uapi/linux/stat.h +index 7fec7e3..256ad24 100644 +--- a/include/uapi/linux/stat.h ++++ b/include/uapi/linux/stat.h +@@ -2,7 +2,7 @@ + #define _UAPI_LINUX_STAT_H + + +-#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) ++#if defined(__KERNEL__) + + #define S_IFMT 00170000 + #define S_IFSOCK 0140000 +-- +1.8.3.2 + diff --git a/3.11/00_all_0003-linux-pull-in-other-needed-headers-for-userspace.patch b/3.11/00_all_0003-linux-pull-in-other-needed-headers-for-userspace.patch new file mode 100644 index 0000000..335b4f7 --- /dev/null +++ b/3.11/00_all_0003-linux-pull-in-other-needed-headers-for-userspace.patch @@ -0,0 +1,40 @@ +From f6c76379e9f0f2fcc6e127d67d5c40892aa75891 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Mon, 29 Dec 2008 07:41:01 -0500 +Subject: [PATCH 3/9] linux/*: pull in other needed headers for userspace + +mondo patch + +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + include/uapi/linux/dn.h | 1 + + include/uapi/linux/ppp-ioctl.h | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/include/uapi/linux/dn.h b/include/uapi/linux/dn.h +index 9c50445..dc9f005 100644 +--- a/include/uapi/linux/dn.h ++++ b/include/uapi/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/uapi/linux/ppp-ioctl.h b/include/uapi/linux/ppp-ioctl.h +index 2d9a885..63a23a3 100644 +--- a/include/uapi/linux/ppp-ioctl.h ++++ b/include/uapi/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.8.3.2 + diff --git a/3.11/00_all_0004-netfilter-pull-in-limits.h.patch b/3.11/00_all_0004-netfilter-pull-in-limits.h.patch new file mode 100644 index 0000000..c112d94 --- /dev/null +++ b/3.11/00_all_0004-netfilter-pull-in-limits.h.patch @@ -0,0 +1,28 @@ +From 40bfe2cd71bb17c1fa212a1d2a7b46b97867e1de Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Sat, 9 May 2009 17:30:35 -0400 +Subject: [PATCH 4/9] 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/uapi/linux/netfilter.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/include/uapi/linux/netfilter.h b/include/uapi/linux/netfilter.h +index f7dc0eb..fcb9748 100644 +--- a/include/uapi/linux/netfilter.h ++++ b/include/uapi/linux/netfilter.h +@@ -4,6 +4,7 @@ + #include <linux/types.h> + #include <linux/compiler.h> + #include <linux/sysctl.h> ++#include <limits.h> + + + /* Responses from hook functions. */ +-- +1.8.3.2 + diff --git a/3.11/00_all_0005-convert-PAGE_SIZE-usage.patch b/3.11/00_all_0005-convert-PAGE_SIZE-usage.patch new file mode 100644 index 0000000..a79409c --- /dev/null +++ b/3.11/00_all_0005-convert-PAGE_SIZE-usage.patch @@ -0,0 +1,54 @@ +From 1fee0aebf8d0e888802a6b772607cd55d32dd667 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Sat, 13 Feb 2010 03:09:23 -0500 +Subject: [PATCH 5/9] 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/uapi/linux/binfmts.h | 3 ++- + include/uapi/linux/resource.h | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/include/uapi/linux/binfmts.h b/include/uapi/linux/binfmts.h +index 4eb5972..516bfcf 100644 +--- a/include/uapi/linux/binfmts.h ++++ b/include/uapi/linux/binfmts.h +@@ -1,6 +1,7 @@ + #ifndef _UAPI_LINUX_BINFMTS_H + #define _UAPI_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/uapi/linux/resource.h b/include/uapi/linux/resource.h +index e0ed284..db8acf3 100644 +--- a/include/uapi/linux/resource.h ++++ b/include/uapi/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.8.3.2 + diff --git a/3.11/00_all_0006-asm-generic-fcntl.h-namespace-kernel-file-structs.patch b/3.11/00_all_0006-asm-generic-fcntl.h-namespace-kernel-file-structs.patch new file mode 100644 index 0000000..4cf0eb9 --- /dev/null +++ b/3.11/00_all_0006-asm-generic-fcntl.h-namespace-kernel-file-structs.patch @@ -0,0 +1,54 @@ +From c96ba199f5df1e6963c68bc5b17bab2c029c4662 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Mon, 29 Dec 2008 07:39:14 -0500 +Subject: [PATCH 6/9] 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/uapi/asm-generic/fcntl.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/include/uapi/asm-generic/fcntl.h b/include/uapi/asm-generic/fcntl.h +index 95e46c8..92c2df2 100644 +--- a/include/uapi/asm-generic/fcntl.h ++++ b/include/uapi/asm-generic/fcntl.h +@@ -136,7 +136,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; + }; +@@ -176,7 +176,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; +@@ -193,7 +193,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.8.3.2 + diff --git a/3.11/00_all_0007-unifdef-drop-unused-errno.h-include.patch b/3.11/00_all_0007-unifdef-drop-unused-errno.h-include.patch new file mode 100644 index 0000000..7eda42d --- /dev/null +++ b/3.11/00_all_0007-unifdef-drop-unused-errno.h-include.patch @@ -0,0 +1,32 @@ +From ff05a34fefa6159d7f4e8c45a2b5ae0111a3fa29 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Tue, 6 Dec 2011 17:22:42 -0500 +Subject: [PATCH 7/9] 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.8.3.2 + diff --git a/3.11/00_all_0008-Btrfs-use-__u64-in-exported-user-headers.patch b/3.11/00_all_0008-Btrfs-use-__u64-in-exported-user-headers.patch new file mode 100644 index 0000000..2c6efb6 --- /dev/null +++ b/3.11/00_all_0008-Btrfs-use-__u64-in-exported-user-headers.patch @@ -0,0 +1,26 @@ +From ddbbf17d9fde3258d7d8b12c1344ed7bd81b854e Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Fri, 16 Aug 2013 14:02:10 -0400 +Subject: [PATCH 8/9] Btrfs: use __u64 in exported user headers + +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + include/uapi/linux/btrfs.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/uapi/linux/btrfs.h b/include/uapi/linux/btrfs.h +index 05aed70..3fa45ae 100644 +--- a/include/uapi/linux/btrfs.h ++++ b/include/uapi/linux/btrfs.h +@@ -524,7 +524,7 @@ static inline char *btrfs_err_str(enum btrfs_err_code err_code) + struct btrfs_ioctl_search_args) + #define BTRFS_IOC_INO_LOOKUP _IOWR(BTRFS_IOCTL_MAGIC, 18, \ + struct btrfs_ioctl_ino_lookup_args) +-#define BTRFS_IOC_DEFAULT_SUBVOL _IOW(BTRFS_IOCTL_MAGIC, 19, u64) ++#define BTRFS_IOC_DEFAULT_SUBVOL _IOW(BTRFS_IOCTL_MAGIC, 19, __u64) + #define BTRFS_IOC_SPACE_INFO _IOWR(BTRFS_IOCTL_MAGIC, 20, \ + struct btrfs_ioctl_space_args) + #define BTRFS_IOC_START_SYNC _IOR(BTRFS_IOCTL_MAGIC, 24, __u64) +-- +1.8.3.2 + diff --git a/3.11/00_all_0009-x86-make-stat-statfs-64-bit-for-x86_64-kernels.patch b/3.11/00_all_0009-x86-make-stat-statfs-64-bit-for-x86_64-kernels.patch new file mode 100644 index 0000000..565c460 --- /dev/null +++ b/3.11/00_all_0009-x86-make-stat-statfs-64-bit-for-x86_64-kernels.patch @@ -0,0 +1,83 @@ +From 2902e4d7072672ba3db8a4b544860fb115932cf7 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Mon, 25 Mar 2013 16:38:47 -0400 +Subject: [PATCH 9/9] x86: make stat/statfs 64-bit for x86_64 kernels + +When including these headers in the x32 ABI, the structs get declared +with 32bit sizes which is incorrect. Use long long and such to make +it work both with x32 and x86_64. + +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + arch/x86/include/uapi/asm/stat.h | 38 +++++++++++++++++++------------------- + arch/x86/include/uapi/asm/statfs.h | 5 +++++ + 2 files changed, 24 insertions(+), 19 deletions(-) + +diff --git a/arch/x86/include/uapi/asm/stat.h b/arch/x86/include/uapi/asm/stat.h +index 7b3ddc3..e9d6951 100644 +--- a/arch/x86/include/uapi/asm/stat.h ++++ b/arch/x86/include/uapi/asm/stat.h +@@ -78,26 +78,26 @@ struct stat64 { + #else /* __i386__ */ + + struct stat { +- unsigned long st_dev; +- unsigned long st_ino; +- unsigned long st_nlink; +- +- unsigned int st_mode; +- unsigned int st_uid; +- unsigned int st_gid; +- unsigned int __pad0; +- unsigned long st_rdev; +- long st_size; +- long st_blksize; +- long st_blocks; /* Number 512-byte blocks allocated. */ ++ unsigned long long st_dev; ++ unsigned long long st_ino; ++ unsigned long long st_nlink; + +- unsigned long st_atime; +- unsigned long st_atime_nsec; +- unsigned long st_mtime; +- unsigned long st_mtime_nsec; +- unsigned long st_ctime; +- unsigned long st_ctime_nsec; +- long __unused[3]; ++ unsigned int st_mode; ++ unsigned int st_uid; ++ unsigned int st_gid; ++ unsigned int __pad0; ++ unsigned long long st_rdev; ++ long long st_size; ++ long long st_blksize; ++ long long st_blocks; /* Number 512-byte blocks allocated. */ ++ ++ unsigned long long st_atime; ++ unsigned long long st_atime_nsec; ++ unsigned long long st_mtime; ++ unsigned long long st_mtime_nsec; ++ unsigned long long st_ctime; ++ unsigned long long st_ctime_nsec; ++ long long __unused[3]; + }; + + /* We don't need to memset the whole thing just to initialize the padding */ +diff --git a/arch/x86/include/uapi/asm/statfs.h b/arch/x86/include/uapi/asm/statfs.h +index 2d0adbf..3cb5744 100644 +--- a/arch/x86/include/uapi/asm/statfs.h ++++ b/arch/x86/include/uapi/asm/statfs.h +@@ -8,5 +8,10 @@ + */ + #define ARCH_PACK_COMPAT_STATFS64 __attribute__((packed,aligned(4))) + ++/* For x86-64, both the 64bit and x32 ABIs have 64bit fields. */ ++#ifdef __x86_64__ ++#define __statfs_word __u64 ++#endif ++ + #include <asm-generic/statfs.h> + #endif /* _ASM_X86_STATFS_H */ +-- +1.8.3.2 + |