diff options
author | Mike Frysinger <vapier@gentoo.org> | 2018-01-30 06:37:43 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2018-01-30 06:37:43 +0000 |
commit | 9558d7b7c29f10039bb7c9cc9d9b4bf91c990ae7 (patch) | |
tree | f9589f042318e0ec103c9017127b41b325763e21 | |
parent | gcc/7.3.0: initial patchset, take 2 (moved patches to gentoo/) (diff) | |
download | gentoo-9558d7b7c29f10039bb7c9cc9d9b4bf91c990ae7.tar.gz gentoo-9558d7b7c29f10039bb7c9cc9d9b4bf91c990ae7.tar.bz2 gentoo-9558d7b7c29f10039bb7c9cc9d9b4bf91c990ae7.zip |
initial 4.15 patchset based on last 4.14 patchset
8 files changed, 348 insertions, 0 deletions
diff --git a/src/patchsets/gentoo-headers/4.15/00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch b/src/patchsets/gentoo-headers/4.15/00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch new file mode 100644 index 0000000000..060126a9bc --- /dev/null +++ b/src/patchsets/gentoo-headers/4.15/00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch @@ -0,0 +1,28 @@ +From eaef093137c922417fbfb5cea2589dd2953bb751 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/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 7b35e98d3c58..eb7474652d27 100644 +--- a/include/uapi/linux/stat.h ++++ b/include/uapi/linux/stat.h +@@ -4,7 +4,7 @@ + + #include <linux/types.h> + +-#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) ++#if defined(__KERNEL__) + + #define S_IFMT 00170000 + #define S_IFSOCK 0140000 +-- +2.16.1 + diff --git a/src/patchsets/gentoo-headers/4.15/00_all_0002-netfilter-pull-in-limits.h.patch b/src/patchsets/gentoo-headers/4.15/00_all_0002-netfilter-pull-in-limits.h.patch new file mode 100644 index 0000000000..187b822dd5 --- /dev/null +++ b/src/patchsets/gentoo-headers/4.15/00_all_0002-netfilter-pull-in-limits.h.patch @@ -0,0 +1,28 @@ +From 7789b768b7aa1f69626c894f2b6d729622a75bbd 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/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 cca10e767cd8..de6d76399cd7 100644 +--- a/include/uapi/linux/netfilter.h ++++ b/include/uapi/linux/netfilter.h +@@ -6,6 +6,7 @@ + #include <linux/compiler.h> + #include <linux/in.h> + #include <linux/in6.h> ++#include <limits.h> + + /* Responses from hook functions. */ + #define NF_DROP 0 +-- +2.16.1 + diff --git a/src/patchsets/gentoo-headers/4.15/00_all_0003-convert-PAGE_SIZE-usage.patch b/src/patchsets/gentoo-headers/4.15/00_all_0003-convert-PAGE_SIZE-usage.patch new file mode 100644 index 0000000000..6a68fbfbe8 --- /dev/null +++ b/src/patchsets/gentoo-headers/4.15/00_all_0003-convert-PAGE_SIZE-usage.patch @@ -0,0 +1,54 @@ +From e685bbb40026037d5bbd223f22305497d7363eb5 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/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 4abad03a8853..3e98cfc84d1c 100644 +--- a/include/uapi/linux/binfmts.h ++++ b/include/uapi/linux/binfmts.h +@@ -2,6 +2,7 @@ + #ifndef _UAPI_LINUX_BINFMTS_H + #define _UAPI_LINUX_BINFMTS_H + ++#include <unistd.h> + #include <linux/capability.h> + + struct pt_regs; +@@ -12,7 +13,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 cc00fd079631..6f9e76f513b5 100644 +--- a/include/uapi/linux/resource.h ++++ b/include/uapi/linux/resource.h +@@ -69,7 +69,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 +-- +2.16.1 + diff --git a/src/patchsets/gentoo-headers/4.15/00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch b/src/patchsets/gentoo-headers/4.15/00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch new file mode 100644 index 0000000000..cd73ccc221 --- /dev/null +++ b/src/patchsets/gentoo-headers/4.15/00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch @@ -0,0 +1,54 @@ +From 687f82d8087c465e3f9f217dad8bbddde75e1294 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/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 9dc0bf0c5a6e..dc9b2e467ad9 100644 +--- a/include/uapi/asm-generic/fcntl.h ++++ b/include/uapi/asm-generic/fcntl.h +@@ -153,7 +153,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; + }; +@@ -193,7 +193,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; +@@ -208,7 +208,7 @@ struct flock { + #define __ARCH_FLOCK64_PAD + #endif + +-struct flock64 { ++struct __kernel_flock64 { + short l_type; + short l_whence; + __kernel_loff_t l_start; +-- +2.16.1 + diff --git a/src/patchsets/gentoo-headers/4.15/00_all_0005-unifdef-drop-unused-errno.h-include.patch b/src/patchsets/gentoo-headers/4.15/00_all_0005-unifdef-drop-unused-errno.h-include.patch new file mode 100644 index 0000000000..eb0c032726 --- /dev/null +++ b/src/patchsets/gentoo-headers/4.15/00_all_0005-unifdef-drop-unused-errno.h-include.patch @@ -0,0 +1,32 @@ +From c944ef96a02d9e4435f3727c5c517e29f5acbcf1 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 7493c0ee51cc..c5dfae538b08 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> +-- +2.16.1 + diff --git a/src/patchsets/gentoo-headers/4.15/00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch b/src/patchsets/gentoo-headers/4.15/00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch new file mode 100644 index 0000000000..caf7645262 --- /dev/null +++ b/src/patchsets/gentoo-headers/4.15/00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch @@ -0,0 +1,33 @@ +From 1847182448312b5c0879821291d48870ed64ceef Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Sat, 15 Nov 2014 03:37:38 -0500 +Subject: [PATCH] x86: do not build relocs tool when installing headers + +This isn't needed to install headers, so don't bother building it. +Otherwise we run into a chicken/egg issue where we need the kernel +headers in order to install the kernel headers. It's also a waste +of time. + +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + arch/x86/Makefile | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/arch/x86/Makefile b/arch/x86/Makefile +index fad55160dcb9..c561b5f1206c 100644 +--- a/arch/x86/Makefile ++++ b/arch/x86/Makefile +@@ -238,8 +238,10 @@ ifdef CONFIG_RETPOLINE + endif + endif + ++ifneq ($(filter-out headers_install,$(MAKECMDGOALS)),) + archscripts: scripts_basic + $(Q)$(MAKE) $(build)=arch/x86/tools relocs ++endif + + ### + # Syscall table generation +-- +2.16.1 + diff --git a/src/patchsets/gentoo-headers/4.15/00_all_0007-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch b/src/patchsets/gentoo-headers/4.15/00_all_0007-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch new file mode 100644 index 0000000000..68687c4d90 --- /dev/null +++ b/src/patchsets/gentoo-headers/4.15/00_all_0007-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch @@ -0,0 +1,43 @@ +From 97cf1649748dd0e52cfdf56795474ebcac82411d Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Thu, 5 Mar 2015 00:26:58 -0500 +Subject: [PATCH] netlink: drop (int) cast on length arg in NLMSG_OK + +The NLMSG_OK macro compares three things: + - the len arg from the user + - a size_t: sizeof(struct nlmsghdr) + - an int: sizeof(struct nlmsghdr) casted + - an u32: the nlmsghdr->nlmsg_len member + +When building with -Wsign-compare, this macro triggers a signed compare +warning. This is because it compares len to an int, and then compares +it to a u32. If len is signed, we get a warning due to the last test. +If len is unsigned, we get a warning due to the first test. Like in +strace: +socketutils.c:145:8: warning: comparison between signed and unsigned + integer expressions [-Wsign-compare] + +Lets drop the int cast on the first sizeof. This way, once the user +casts len to an unsigned value, everything shakes out correctly. + +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + include/uapi/linux/netlink.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/uapi/linux/netlink.h b/include/uapi/linux/netlink.h +index 776bc92e9118..d0c4df5fa670 100644 +--- a/include/uapi/linux/netlink.h ++++ b/include/uapi/linux/netlink.h +@@ -94,7 +94,7 @@ struct nlmsghdr { + #define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0))) + #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \ + (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) +-#define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && \ ++#define NLMSG_OK(nlh,len) ((len) >= sizeof(struct nlmsghdr) && \ + (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \ + (nlh)->nlmsg_len <= (len)) + #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len))) +-- +2.16.1 + diff --git a/src/patchsets/gentoo-headers/4.15/00_all_0008-uapi-fix-System-V-buf-header-includes.patch b/src/patchsets/gentoo-headers/4.15/00_all_0008-uapi-fix-System-V-buf-header-includes.patch new file mode 100644 index 0000000000..2a8f6a0108 --- /dev/null +++ b/src/patchsets/gentoo-headers/4.15/00_all_0008-uapi-fix-System-V-buf-header-includes.patch @@ -0,0 +1,76 @@ +From 0bcecc945bf14c70f07d55b99a07f9ce16a0821f Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Mon, 2 Nov 2015 13:30:12 -0500 +Subject: [PATCH] uapi: fix System V buf header includes + +These headers rely on kernel types but don't include the other headers +that define them. So when you try to include them directly, you often +hit build failures due to unknown types. + +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + include/uapi/asm-generic/ipcbuf.h | 2 ++ + include/uapi/asm-generic/msgbuf.h | 3 +++ + include/uapi/asm-generic/sembuf.h | 2 ++ + include/uapi/asm-generic/shmbuf.h | 2 ++ + 4 files changed, 9 insertions(+) + +diff --git a/include/uapi/asm-generic/ipcbuf.h b/include/uapi/asm-generic/ipcbuf.h +index 7d80dbd336fb..b4534bfd63e4 100644 +--- a/include/uapi/asm-generic/ipcbuf.h ++++ b/include/uapi/asm-generic/ipcbuf.h +@@ -2,6 +2,8 @@ + #ifndef __ASM_GENERIC_IPCBUF_H + #define __ASM_GENERIC_IPCBUF_H + ++#include <linux/types.h> ++ + /* + * The generic ipc64_perm structure: + * Note extra padding because this structure is passed back and forth +diff --git a/include/uapi/asm-generic/msgbuf.h b/include/uapi/asm-generic/msgbuf.h +index fb306ebdb36f..f28b8e6fe931 100644 +--- a/include/uapi/asm-generic/msgbuf.h ++++ b/include/uapi/asm-generic/msgbuf.h +@@ -2,7 +2,10 @@ + #ifndef __ASM_GENERIC_MSGBUF_H + #define __ASM_GENERIC_MSGBUF_H + ++#include <linux/types.h> + #include <asm/bitsperlong.h> ++#include <asm/ipcbuf.h> ++ + /* + * generic msqid64_ds structure. + * +diff --git a/include/uapi/asm-generic/sembuf.h b/include/uapi/asm-generic/sembuf.h +index cbf9cfe977d6..3058e1ec00b5 100644 +--- a/include/uapi/asm-generic/sembuf.h ++++ b/include/uapi/asm-generic/sembuf.h +@@ -2,7 +2,9 @@ + #ifndef __ASM_GENERIC_SEMBUF_H + #define __ASM_GENERIC_SEMBUF_H + ++#include <linux/types.h> + #include <asm/bitsperlong.h> ++#include <asm/ipcbuf.h> + + /* + * The semid64_ds structure for x86 architecture. +diff --git a/include/uapi/asm-generic/shmbuf.h b/include/uapi/asm-generic/shmbuf.h +index 2b6c3bb97f97..a0171147d796 100644 +--- a/include/uapi/asm-generic/shmbuf.h ++++ b/include/uapi/asm-generic/shmbuf.h +@@ -2,7 +2,9 @@ + #ifndef __ASM_GENERIC_SHMBUF_H + #define __ASM_GENERIC_SHMBUF_H + ++#include <linux/types.h> + #include <asm/bitsperlong.h> ++#include <asm/ipcbuf.h> + + /* + * The shmid64_ds structure for x86 architecture. +-- +2.16.1 + |