summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--5.10/00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch28
-rw-r--r--5.10/00_all_0003-convert-PAGE_SIZE-usage.patch54
-rw-r--r--5.10/00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch54
-rw-r--r--5.10/00_all_0005-unifdef-drop-unused-errno.h-include.patch32
-rw-r--r--5.10/00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch33
-rw-r--r--5.10/00_all_0007-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch43
-rw-r--r--5.10/00_all_0008-uapi-fix-System-V-buf-header-includes.patch28
-rw-r--r--5.10/00_all_0009_glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch46
-rw-r--r--5.11/00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch28
-rw-r--r--5.11/00_all_0003-convert-PAGE_SIZE-usage.patch54
-rw-r--r--5.11/00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch54
-rw-r--r--5.11/00_all_0005-unifdef-drop-unused-errno.h-include.patch32
-rw-r--r--5.11/00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch33
-rw-r--r--5.11/00_all_0007-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch43
-rw-r--r--5.11/00_all_0008-uapi-fix-System-V-buf-header-includes.patch28
-rw-r--r--5.12/00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch28
-rw-r--r--5.12/00_all_0003-convert-PAGE_SIZE-usage.patch54
-rw-r--r--5.12/00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch54
-rw-r--r--5.12/00_all_0005-unifdef-drop-unused-errno.h-include.patch32
-rw-r--r--5.12/00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch33
-rw-r--r--5.12/00_all_0007-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch43
-rw-r--r--5.12/00_all_0008-uapi-fix-System-V-buf-header-includes.patch28
-rw-r--r--5.13/00_all_0001-unifdef-drop-unused-errno.h-include.patch32
-rw-r--r--5.13/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch33
-rw-r--r--5.13/00_all_0003-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch43
-rw-r--r--5.13/00_all_0004-uapi-fix-System-V-buf-header-includes.patch28
-rw-r--r--5.14/00_all_0001-unifdef-drop-unused-errno.h-include.patch32
-rw-r--r--5.14/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch33
-rw-r--r--5.14/00_all_0003-uapi-fix-System-V-buf-header-includes.patch28
-rw-r--r--5.15/00_all_0001-unifdef-drop-unused-errno.h-include.patch32
-rw-r--r--5.15/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch33
-rw-r--r--5.15/00_all_0003-uapi-fix-System-V-buf-header-includes.patch28
-rw-r--r--5.16/00_all_0001-unifdef-drop-unused-errno.h-include.patch32
-rw-r--r--5.16/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch33
-rw-r--r--5.16/00_all_0003-uapi-fix-System-V-buf-header-includes.patch28
-rw-r--r--5.17/00_all_0001-unifdef-drop-unused-errno.h-include.patch32
-rw-r--r--5.17/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch33
-rw-r--r--5.17/00_all_0003-uapi-fix-System-V-buf-header-includes.patch28
-rw-r--r--5.18/00_all_0001-unifdef-drop-unused-errno.h-include.patch32
-rw-r--r--5.18/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch33
-rw-r--r--5.18/00_all_0003-media-lirc-restore-defines.patch61
-rw-r--r--5.19/00_all_0001-unifdef-drop-unused-errno.h-include.patch32
-rw-r--r--5.19/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch33
-rw-r--r--5.8/00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch28
-rw-r--r--5.8/00_all_0003-convert-PAGE_SIZE-usage.patch54
-rw-r--r--5.8/00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch54
-rw-r--r--5.8/00_all_0005-unifdef-drop-unused-errno.h-include.patch32
-rw-r--r--5.8/00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch33
-rw-r--r--5.8/00_all_0007-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch43
-rw-r--r--5.8/00_all_0008-uapi-fix-System-V-buf-header-includes.patch28
-rw-r--r--5.8/00_all_0009_glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch46
-rw-r--r--5.9/00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch28
-rw-r--r--5.9/00_all_0003-convert-PAGE_SIZE-usage.patch54
-rw-r--r--5.9/00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch54
-rw-r--r--5.9/00_all_0005-unifdef-drop-unused-errno.h-include.patch32
-rw-r--r--5.9/00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch33
-rw-r--r--5.9/00_all_0007-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch43
-rw-r--r--5.9/00_all_0008-uapi-fix-System-V-buf-header-includes.patch28
-rw-r--r--5.9/00_all_0009_glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch46
-rw-r--r--6.0/00_all_0001-unifdef-drop-unused-errno.h-include.patch32
-rw-r--r--6.0/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch33
-rw-r--r--6.1/00_all_0001-unifdef-drop-unused-errno.h-include.patch32
-rw-r--r--6.1/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch33
-rw-r--r--6.2/00_all_0001-unifdef-drop-unused-errno.h-include.patch32
-rw-r--r--6.2/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch33
-rw-r--r--6.3/00_all_0001-unifdef-drop-unused-errno.h-include.patch32
-rw-r--r--6.3/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch33
-rw-r--r--6.4/00_all_0001-unifdef-drop-unused-errno.h-include.patch32
-rw-r--r--6.4/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch33
-rw-r--r--6.5/00_all_0001-unifdef-drop-unused-errno.h-include.patch32
-rw-r--r--6.5/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch33
-rw-r--r--6.5/00_all_0003-Compiler-Attributes-counted_by-Adjust-name-and-ident.patch87
-rw-r--r--6.5/00_all_0004-uapi-stddef.h-Fix-header-guard-location.patch41
-rw-r--r--6.5/00_all_0005-uapi-stddef.h-Fix-__DECLARE_FLEX_ARRAY-for-C.patch77
-rw-r--r--6.6/00_all_0001-unifdef-drop-unused-errno.h-include.patch32
-rw-r--r--6.6/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch33
-rw-r--r--6.7/00_all_0001-unifdef-drop-unused-errno.h-include.patch32
-rw-r--r--6.7/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch33
-rw-r--r--6.8/00_all_0001-unifdef-drop-unused-errno.h-include.patch32
-rw-r--r--6.8/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch33
-rw-r--r--README.Gentoo.patches12
-rwxr-xr-xrip-headers.sh2
-rw-r--r--testing.txt168
83 files changed, 3109 insertions, 60 deletions
diff --git a/5.10/00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch b/5.10/00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch
new file mode 100644
index 0000000..24a4199
--- /dev/null
+++ b/5.10/00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch
@@ -0,0 +1,28 @@
+From 1f4498530090a5fe7f6b2c46f2beb8818d7cb27b 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/5.10/00_all_0003-convert-PAGE_SIZE-usage.patch b/5.10/00_all_0003-convert-PAGE_SIZE-usage.patch
new file mode 100644
index 0000000..fbc2c45
--- /dev/null
+++ b/5.10/00_all_0003-convert-PAGE_SIZE-usage.patch
@@ -0,0 +1,54 @@
+From 25f2bcfa6c8a9e7cee2b92a823495479fe0ccc92 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/5.10/00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch b/5.10/00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch
new file mode 100644
index 0000000..625fb6e
--- /dev/null
+++ b/5.10/00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch
@@ -0,0 +1,54 @@
+From 091dfce6aed898f4bc4eaca0edab942dd03b8016 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/5.10/00_all_0005-unifdef-drop-unused-errno.h-include.patch b/5.10/00_all_0005-unifdef-drop-unused-errno.h-include.patch
new file mode 100644
index 0000000..617eb9a
--- /dev/null
+++ b/5.10/00_all_0005-unifdef-drop-unused-errno.h-include.patch
@@ -0,0 +1,32 @@
+From c4d1a109c5c0b1bd27d2b5448a1306a2f6005339 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/5.10/00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch b/5.10/00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch
new file mode 100644
index 0000000..c4af343
--- /dev/null
+++ b/5.10/00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch
@@ -0,0 +1,33 @@
+From 57875de37c5375ea95e1e949ec7c741d0038d3a1 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 60135cbd905c..9b15b2daa77f 100644
+--- a/arch/x86/Makefile
++++ b/arch/x86/Makefile
+@@ -249,8 +249,10 @@ ifneq ($(RETPOLINE_CFLAGS),)
+ 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/5.10/00_all_0007-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch b/5.10/00_all_0007-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch
new file mode 100644
index 0000000..1fed99d
--- /dev/null
+++ b/5.10/00_all_0007-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch
@@ -0,0 +1,43 @@
+From cb87a9562cca933c97a482f09a36542b876608e8 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/5.10/00_all_0008-uapi-fix-System-V-buf-header-includes.patch b/5.10/00_all_0008-uapi-fix-System-V-buf-header-includes.patch
new file mode 100644
index 0000000..987a98d
--- /dev/null
+++ b/5.10/00_all_0008-uapi-fix-System-V-buf-header-includes.patch
@@ -0,0 +1,28 @@
+From beac664726b0b5b5c833aaf6576ca583534406ba 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>
+
+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 <asm/bitsperlong.h>
++#include <asm/ipcbuf.h>
+
+ /*
+ * The shmid64_ds structure for x86 architecture.
+--
+2.16.1
+
diff --git a/5.10/00_all_0009_glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch b/5.10/00_all_0009_glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch
new file mode 100644
index 0000000..df075dc
--- /dev/null
+++ b/5.10/00_all_0009_glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch
@@ -0,0 +1,46 @@
+https://lore.kernel.org/patchwork/patch/449607/
+https://gitweb.gentoo.org/proj/musl.git/tree/sys-kernel/linux-headers/files/libc-5.1-remove-sysinfo_h-from-kernel_h.patch
+
+Date: Fri, 14 Mar 2014 17:14:10 +0100
+From: David Heidelberger <david.heidelberger@ixit.cz>
+To: linux-kernel@vger.kernel.org
+Cc: maillist-linux@barfooze.de, torvalds@linux-foundation.org
+Subject: [PATCH 1/4] glibc specific inclusion of sysinfo.h in kernel.h
+Message-ID: <130a9e0c237bae10e631a5ae52c5e2c8@ixit.cz>
+User-Agent: Roundcube Webmail/0.9.5
+Sender: linux-kernel-owner@vger.kernel.org
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+
+including sysinfo.h from kernel.h makes no sense whatsoever,
+but removing it breaks glibc's userspace header,
+which includes kernel.h instead of sysinfo.h from their sys/sysinfo.h.
+this seems to be a historical mistake.
+on musl, including any header that uses kernel.h directly or indirectly
+plus sys/sysinfo.h will produce a compile error due to redefinition of
+struct sysinfo.h.
+so for now, only include it on glibc in order not to break their
+headers.
+
+Signed-off-by: John Spencer <maillist-linux@barfooze.de>
+Signed-off-by: David Heidelberger <david.heidelberger@ixit.cz>
+---
+ include/uapi/linux/kernel.h | 2 ++
+ 1 file changed, 2 insertion(+)
+
+ */
+
+diff --git a/include/uapi/linux/kernel.h b/include/uapi/linux/kernel.h
+index 321e399..8c45eeb 100644
+--- a/include/uapi/linux/kernel.h
++++ b/include/uapi/linux/kernel.h
+@@ -1,7 +1,9 @@
+ #ifndef _UAPI_LINUX_KERNEL_H
+ #define _UAPI_LINUX_KERNEL_H
+
++#ifdef __GLIBC__
+ #include <linux/sysinfo.h>
++#endif
+
+ /*
+ * 'kernel.h' contains some often-used function prototypes etc
diff --git a/5.11/00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch b/5.11/00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch
new file mode 100644
index 0000000..24a4199
--- /dev/null
+++ b/5.11/00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch
@@ -0,0 +1,28 @@
+From 1f4498530090a5fe7f6b2c46f2beb8818d7cb27b 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/5.11/00_all_0003-convert-PAGE_SIZE-usage.patch b/5.11/00_all_0003-convert-PAGE_SIZE-usage.patch
new file mode 100644
index 0000000..fbc2c45
--- /dev/null
+++ b/5.11/00_all_0003-convert-PAGE_SIZE-usage.patch
@@ -0,0 +1,54 @@
+From 25f2bcfa6c8a9e7cee2b92a823495479fe0ccc92 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/5.11/00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch b/5.11/00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch
new file mode 100644
index 0000000..625fb6e
--- /dev/null
+++ b/5.11/00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch
@@ -0,0 +1,54 @@
+From 091dfce6aed898f4bc4eaca0edab942dd03b8016 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/5.11/00_all_0005-unifdef-drop-unused-errno.h-include.patch b/5.11/00_all_0005-unifdef-drop-unused-errno.h-include.patch
new file mode 100644
index 0000000..617eb9a
--- /dev/null
+++ b/5.11/00_all_0005-unifdef-drop-unused-errno.h-include.patch
@@ -0,0 +1,32 @@
+From c4d1a109c5c0b1bd27d2b5448a1306a2f6005339 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/5.11/00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch b/5.11/00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch
new file mode 100644
index 0000000..c4af343
--- /dev/null
+++ b/5.11/00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch
@@ -0,0 +1,33 @@
+From 57875de37c5375ea95e1e949ec7c741d0038d3a1 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 60135cbd905c..9b15b2daa77f 100644
+--- a/arch/x86/Makefile
++++ b/arch/x86/Makefile
+@@ -249,8 +249,10 @@ ifneq ($(RETPOLINE_CFLAGS),)
+ 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/5.11/00_all_0007-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch b/5.11/00_all_0007-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch
new file mode 100644
index 0000000..1fed99d
--- /dev/null
+++ b/5.11/00_all_0007-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch
@@ -0,0 +1,43 @@
+From cb87a9562cca933c97a482f09a36542b876608e8 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/5.11/00_all_0008-uapi-fix-System-V-buf-header-includes.patch b/5.11/00_all_0008-uapi-fix-System-V-buf-header-includes.patch
new file mode 100644
index 0000000..987a98d
--- /dev/null
+++ b/5.11/00_all_0008-uapi-fix-System-V-buf-header-includes.patch
@@ -0,0 +1,28 @@
+From beac664726b0b5b5c833aaf6576ca583534406ba 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>
+
+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 <asm/bitsperlong.h>
++#include <asm/ipcbuf.h>
+
+ /*
+ * The shmid64_ds structure for x86 architecture.
+--
+2.16.1
+
diff --git a/5.12/00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch b/5.12/00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch
new file mode 100644
index 0000000..24a4199
--- /dev/null
+++ b/5.12/00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch
@@ -0,0 +1,28 @@
+From 1f4498530090a5fe7f6b2c46f2beb8818d7cb27b 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/5.12/00_all_0003-convert-PAGE_SIZE-usage.patch b/5.12/00_all_0003-convert-PAGE_SIZE-usage.patch
new file mode 100644
index 0000000..fbc2c45
--- /dev/null
+++ b/5.12/00_all_0003-convert-PAGE_SIZE-usage.patch
@@ -0,0 +1,54 @@
+From 25f2bcfa6c8a9e7cee2b92a823495479fe0ccc92 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/5.12/00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch b/5.12/00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch
new file mode 100644
index 0000000..625fb6e
--- /dev/null
+++ b/5.12/00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch
@@ -0,0 +1,54 @@
+From 091dfce6aed898f4bc4eaca0edab942dd03b8016 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/5.12/00_all_0005-unifdef-drop-unused-errno.h-include.patch b/5.12/00_all_0005-unifdef-drop-unused-errno.h-include.patch
new file mode 100644
index 0000000..617eb9a
--- /dev/null
+++ b/5.12/00_all_0005-unifdef-drop-unused-errno.h-include.patch
@@ -0,0 +1,32 @@
+From c4d1a109c5c0b1bd27d2b5448a1306a2f6005339 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/5.12/00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch b/5.12/00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch
new file mode 100644
index 0000000..c4af343
--- /dev/null
+++ b/5.12/00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch
@@ -0,0 +1,33 @@
+From 57875de37c5375ea95e1e949ec7c741d0038d3a1 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 60135cbd905c..9b15b2daa77f 100644
+--- a/arch/x86/Makefile
++++ b/arch/x86/Makefile
+@@ -249,8 +249,10 @@ ifneq ($(RETPOLINE_CFLAGS),)
+ 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/5.12/00_all_0007-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch b/5.12/00_all_0007-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch
new file mode 100644
index 0000000..1fed99d
--- /dev/null
+++ b/5.12/00_all_0007-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch
@@ -0,0 +1,43 @@
+From cb87a9562cca933c97a482f09a36542b876608e8 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/5.12/00_all_0008-uapi-fix-System-V-buf-header-includes.patch b/5.12/00_all_0008-uapi-fix-System-V-buf-header-includes.patch
new file mode 100644
index 0000000..987a98d
--- /dev/null
+++ b/5.12/00_all_0008-uapi-fix-System-V-buf-header-includes.patch
@@ -0,0 +1,28 @@
+From beac664726b0b5b5c833aaf6576ca583534406ba 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>
+
+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 <asm/bitsperlong.h>
++#include <asm/ipcbuf.h>
+
+ /*
+ * The shmid64_ds structure for x86 architecture.
+--
+2.16.1
+
diff --git a/5.13/00_all_0001-unifdef-drop-unused-errno.h-include.patch b/5.13/00_all_0001-unifdef-drop-unused-errno.h-include.patch
new file mode 100644
index 0000000..617eb9a
--- /dev/null
+++ b/5.13/00_all_0001-unifdef-drop-unused-errno.h-include.patch
@@ -0,0 +1,32 @@
+From c4d1a109c5c0b1bd27d2b5448a1306a2f6005339 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/5.13/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch b/5.13/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch
new file mode 100644
index 0000000..a82c98e
--- /dev/null
+++ b/5.13/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch
@@ -0,0 +1,33 @@
+From 57875de37c5375ea95e1e949ec7c741d0038d3a1 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 60135cbd905c..9b15b2daa77f 100644
+--- a/arch/x86/Makefile
++++ b/arch/x86/Makefile
+@@ -221,8 +221,10 @@
+ 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/5.13/00_all_0003-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch b/5.13/00_all_0003-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch
new file mode 100644
index 0000000..1fed99d
--- /dev/null
+++ b/5.13/00_all_0003-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch
@@ -0,0 +1,43 @@
+From cb87a9562cca933c97a482f09a36542b876608e8 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/5.13/00_all_0004-uapi-fix-System-V-buf-header-includes.patch b/5.13/00_all_0004-uapi-fix-System-V-buf-header-includes.patch
new file mode 100644
index 0000000..987a98d
--- /dev/null
+++ b/5.13/00_all_0004-uapi-fix-System-V-buf-header-includes.patch
@@ -0,0 +1,28 @@
+From beac664726b0b5b5c833aaf6576ca583534406ba 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>
+
+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 <asm/bitsperlong.h>
++#include <asm/ipcbuf.h>
+
+ /*
+ * The shmid64_ds structure for x86 architecture.
+--
+2.16.1
+
diff --git a/5.14/00_all_0001-unifdef-drop-unused-errno.h-include.patch b/5.14/00_all_0001-unifdef-drop-unused-errno.h-include.patch
new file mode 100644
index 0000000..617eb9a
--- /dev/null
+++ b/5.14/00_all_0001-unifdef-drop-unused-errno.h-include.patch
@@ -0,0 +1,32 @@
+From c4d1a109c5c0b1bd27d2b5448a1306a2f6005339 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/5.14/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch b/5.14/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch
new file mode 100644
index 0000000..a82c98e
--- /dev/null
+++ b/5.14/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch
@@ -0,0 +1,33 @@
+From 57875de37c5375ea95e1e949ec7c741d0038d3a1 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 60135cbd905c..9b15b2daa77f 100644
+--- a/arch/x86/Makefile
++++ b/arch/x86/Makefile
+@@ -221,8 +221,10 @@
+ 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/5.14/00_all_0003-uapi-fix-System-V-buf-header-includes.patch b/5.14/00_all_0003-uapi-fix-System-V-buf-header-includes.patch
new file mode 100644
index 0000000..987a98d
--- /dev/null
+++ b/5.14/00_all_0003-uapi-fix-System-V-buf-header-includes.patch
@@ -0,0 +1,28 @@
+From beac664726b0b5b5c833aaf6576ca583534406ba 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>
+
+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 <asm/bitsperlong.h>
++#include <asm/ipcbuf.h>
+
+ /*
+ * The shmid64_ds structure for x86 architecture.
+--
+2.16.1
+
diff --git a/5.15/00_all_0001-unifdef-drop-unused-errno.h-include.patch b/5.15/00_all_0001-unifdef-drop-unused-errno.h-include.patch
new file mode 100644
index 0000000..617eb9a
--- /dev/null
+++ b/5.15/00_all_0001-unifdef-drop-unused-errno.h-include.patch
@@ -0,0 +1,32 @@
+From c4d1a109c5c0b1bd27d2b5448a1306a2f6005339 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/5.15/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch b/5.15/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch
new file mode 100644
index 0000000..a82c98e
--- /dev/null
+++ b/5.15/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch
@@ -0,0 +1,33 @@
+From 57875de37c5375ea95e1e949ec7c741d0038d3a1 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 60135cbd905c..9b15b2daa77f 100644
+--- a/arch/x86/Makefile
++++ b/arch/x86/Makefile
+@@ -221,8 +221,10 @@
+ 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/5.15/00_all_0003-uapi-fix-System-V-buf-header-includes.patch b/5.15/00_all_0003-uapi-fix-System-V-buf-header-includes.patch
new file mode 100644
index 0000000..987a98d
--- /dev/null
+++ b/5.15/00_all_0003-uapi-fix-System-V-buf-header-includes.patch
@@ -0,0 +1,28 @@
+From beac664726b0b5b5c833aaf6576ca583534406ba 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>
+
+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 <asm/bitsperlong.h>
++#include <asm/ipcbuf.h>
+
+ /*
+ * The shmid64_ds structure for x86 architecture.
+--
+2.16.1
+
diff --git a/5.16/00_all_0001-unifdef-drop-unused-errno.h-include.patch b/5.16/00_all_0001-unifdef-drop-unused-errno.h-include.patch
new file mode 100644
index 0000000..617eb9a
--- /dev/null
+++ b/5.16/00_all_0001-unifdef-drop-unused-errno.h-include.patch
@@ -0,0 +1,32 @@
+From c4d1a109c5c0b1bd27d2b5448a1306a2f6005339 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/5.16/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch b/5.16/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch
new file mode 100644
index 0000000..a82c98e
--- /dev/null
+++ b/5.16/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch
@@ -0,0 +1,33 @@
+From 57875de37c5375ea95e1e949ec7c741d0038d3a1 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 60135cbd905c..9b15b2daa77f 100644
+--- a/arch/x86/Makefile
++++ b/arch/x86/Makefile
+@@ -221,8 +221,10 @@
+ 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/5.16/00_all_0003-uapi-fix-System-V-buf-header-includes.patch b/5.16/00_all_0003-uapi-fix-System-V-buf-header-includes.patch
new file mode 100644
index 0000000..987a98d
--- /dev/null
+++ b/5.16/00_all_0003-uapi-fix-System-V-buf-header-includes.patch
@@ -0,0 +1,28 @@
+From beac664726b0b5b5c833aaf6576ca583534406ba 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>
+
+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 <asm/bitsperlong.h>
++#include <asm/ipcbuf.h>
+
+ /*
+ * The shmid64_ds structure for x86 architecture.
+--
+2.16.1
+
diff --git a/5.17/00_all_0001-unifdef-drop-unused-errno.h-include.patch b/5.17/00_all_0001-unifdef-drop-unused-errno.h-include.patch
new file mode 100644
index 0000000..617eb9a
--- /dev/null
+++ b/5.17/00_all_0001-unifdef-drop-unused-errno.h-include.patch
@@ -0,0 +1,32 @@
+From c4d1a109c5c0b1bd27d2b5448a1306a2f6005339 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/5.17/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch b/5.17/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch
new file mode 100644
index 0000000..a82c98e
--- /dev/null
+++ b/5.17/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch
@@ -0,0 +1,33 @@
+From 57875de37c5375ea95e1e949ec7c741d0038d3a1 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 60135cbd905c..9b15b2daa77f 100644
+--- a/arch/x86/Makefile
++++ b/arch/x86/Makefile
+@@ -221,8 +221,10 @@
+ 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/5.17/00_all_0003-uapi-fix-System-V-buf-header-includes.patch b/5.17/00_all_0003-uapi-fix-System-V-buf-header-includes.patch
new file mode 100644
index 0000000..987a98d
--- /dev/null
+++ b/5.17/00_all_0003-uapi-fix-System-V-buf-header-includes.patch
@@ -0,0 +1,28 @@
+From beac664726b0b5b5c833aaf6576ca583534406ba 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>
+
+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 <asm/bitsperlong.h>
++#include <asm/ipcbuf.h>
+
+ /*
+ * The shmid64_ds structure for x86 architecture.
+--
+2.16.1
+
diff --git a/5.18/00_all_0001-unifdef-drop-unused-errno.h-include.patch b/5.18/00_all_0001-unifdef-drop-unused-errno.h-include.patch
new file mode 100644
index 0000000..617eb9a
--- /dev/null
+++ b/5.18/00_all_0001-unifdef-drop-unused-errno.h-include.patch
@@ -0,0 +1,32 @@
+From c4d1a109c5c0b1bd27d2b5448a1306a2f6005339 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/5.18/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch b/5.18/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch
new file mode 100644
index 0000000..c1c7214
--- /dev/null
+++ b/5.18/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch
@@ -0,0 +1,33 @@
+From 57875de37c5375ea95e1e949ec7c741d0038d3a1 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 60135cbd905c..9b15b2daa77f 100644
+--- a/arch/x86/Makefile
++++ b/arch/x86/Makefile
+@@ -215,8 +215,10 @@
+ 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/5.18/00_all_0003-media-lirc-restore-defines.patch b/5.18/00_all_0003-media-lirc-restore-defines.patch
new file mode 100644
index 0000000..8a61b41
--- /dev/null
+++ b/5.18/00_all_0003-media-lirc-restore-defines.patch
@@ -0,0 +1,61 @@
+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e5499dd7253c8382d03f687f19a854adcc688357
+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b1c8312c6bd70e2c41f96183936fdb6f4f07cc0e
+
+https://bugs.gentoo.org/847886
+
+From: Sean Young <sean@mess.org>
+Date: Wed, 25 May 2022 14:08:30 +0100
+Subject: media: lirc: revert removal of unused feature flags
+
+Commit b2a90f4fcb14 ("media: lirc: remove unused lirc features") removed
+feature flags which were never implemented, but they are still used by
+the lirc daemon went built from source.
+
+Reinstate these symbols in order not to break the lirc build.
+
+Fixes: b2a90f4fcb14 ("media: lirc: remove unused lirc features")
+Link: https://lore.kernel.org/all/a0470450-ecfd-2918-e04a-7b57c1fd7694@kernel.org/
+Reported-by: Jiri Slaby <jirislaby@kernel.org>
+Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
+Signed-off-by: Sean Young <sean@mess.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+--- a/include/uapi/linux/lirc.h
++++ b/include/uapi/linux/lirc.h
+@@ -84,6 +84,13 @@
+ #define LIRC_CAN_SEND(x) ((x)&LIRC_CAN_SEND_MASK)
+ #define LIRC_CAN_REC(x) ((x)&LIRC_CAN_REC_MASK)
+
++/*
++ * Unused features. These features were never implemented, in tree or
++ * out of tree. These definitions are here so not to break the lircd build.
++ */
++#define LIRC_CAN_SET_REC_FILTER 0
++#define LIRC_CAN_NOTIFY_DECODE 0
++
+ /*** IOCTL commands for lirc driver ***/
+
+ #define LIRC_GET_FEATURES _IOR('i', 0x00000000, __u32)
+cgit
+From: Sean Young <sean@mess.org>
+Date: Thu, 26 May 2022 08:59:40 +0100
+Subject: media: lirc: add missing exceptions for lirc uapi header file
+
+Commit e5499dd7253c ("media: lirc: revert removal of unused feature
+flags") reintroduced unused feature flags in the lirc uapi header, but
+failed to reintroduce the necessary exceptions for the docs.
+
+Fixes: e5499dd7253c ("media: lirc: revert removal of unused feature flags")
+Signed-off-by: Sean Young <sean@mess.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+--- a/Documentation/userspace-api/media/lirc.h.rst.exceptions
++++ b/Documentation/userspace-api/media/lirc.h.rst.exceptions
+@@ -30,6 +30,8 @@ ignore define LIRC_CAN_REC
+
+ ignore define LIRC_CAN_SEND_MASK
+ ignore define LIRC_CAN_REC_MASK
++ignore define LIRC_CAN_SET_REC_FILTER
++ignore define LIRC_CAN_NOTIFY_DECODE
+
+ # Obsolete ioctls
+
+cgit
diff --git a/5.19/00_all_0001-unifdef-drop-unused-errno.h-include.patch b/5.19/00_all_0001-unifdef-drop-unused-errno.h-include.patch
new file mode 100644
index 0000000..617eb9a
--- /dev/null
+++ b/5.19/00_all_0001-unifdef-drop-unused-errno.h-include.patch
@@ -0,0 +1,32 @@
+From c4d1a109c5c0b1bd27d2b5448a1306a2f6005339 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/5.19/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch b/5.19/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch
new file mode 100644
index 0000000..c1c7214
--- /dev/null
+++ b/5.19/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch
@@ -0,0 +1,33 @@
+From 57875de37c5375ea95e1e949ec7c741d0038d3a1 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 60135cbd905c..9b15b2daa77f 100644
+--- a/arch/x86/Makefile
++++ b/arch/x86/Makefile
+@@ -215,8 +215,10 @@
+ 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/5.8/00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch b/5.8/00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch
new file mode 100644
index 0000000..24a4199
--- /dev/null
+++ b/5.8/00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch
@@ -0,0 +1,28 @@
+From 1f4498530090a5fe7f6b2c46f2beb8818d7cb27b 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/5.8/00_all_0003-convert-PAGE_SIZE-usage.patch b/5.8/00_all_0003-convert-PAGE_SIZE-usage.patch
new file mode 100644
index 0000000..fbc2c45
--- /dev/null
+++ b/5.8/00_all_0003-convert-PAGE_SIZE-usage.patch
@@ -0,0 +1,54 @@
+From 25f2bcfa6c8a9e7cee2b92a823495479fe0ccc92 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/5.8/00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch b/5.8/00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch
new file mode 100644
index 0000000..625fb6e
--- /dev/null
+++ b/5.8/00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch
@@ -0,0 +1,54 @@
+From 091dfce6aed898f4bc4eaca0edab942dd03b8016 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/5.8/00_all_0005-unifdef-drop-unused-errno.h-include.patch b/5.8/00_all_0005-unifdef-drop-unused-errno.h-include.patch
new file mode 100644
index 0000000..617eb9a
--- /dev/null
+++ b/5.8/00_all_0005-unifdef-drop-unused-errno.h-include.patch
@@ -0,0 +1,32 @@
+From c4d1a109c5c0b1bd27d2b5448a1306a2f6005339 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/5.8/00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch b/5.8/00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch
new file mode 100644
index 0000000..c4af343
--- /dev/null
+++ b/5.8/00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch
@@ -0,0 +1,33 @@
+From 57875de37c5375ea95e1e949ec7c741d0038d3a1 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 60135cbd905c..9b15b2daa77f 100644
+--- a/arch/x86/Makefile
++++ b/arch/x86/Makefile
+@@ -249,8 +249,10 @@ ifneq ($(RETPOLINE_CFLAGS),)
+ 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/5.8/00_all_0007-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch b/5.8/00_all_0007-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch
new file mode 100644
index 0000000..1fed99d
--- /dev/null
+++ b/5.8/00_all_0007-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch
@@ -0,0 +1,43 @@
+From cb87a9562cca933c97a482f09a36542b876608e8 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/5.8/00_all_0008-uapi-fix-System-V-buf-header-includes.patch b/5.8/00_all_0008-uapi-fix-System-V-buf-header-includes.patch
new file mode 100644
index 0000000..987a98d
--- /dev/null
+++ b/5.8/00_all_0008-uapi-fix-System-V-buf-header-includes.patch
@@ -0,0 +1,28 @@
+From beac664726b0b5b5c833aaf6576ca583534406ba 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>
+
+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 <asm/bitsperlong.h>
++#include <asm/ipcbuf.h>
+
+ /*
+ * The shmid64_ds structure for x86 architecture.
+--
+2.16.1
+
diff --git a/5.8/00_all_0009_glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch b/5.8/00_all_0009_glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch
new file mode 100644
index 0000000..df075dc
--- /dev/null
+++ b/5.8/00_all_0009_glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch
@@ -0,0 +1,46 @@
+https://lore.kernel.org/patchwork/patch/449607/
+https://gitweb.gentoo.org/proj/musl.git/tree/sys-kernel/linux-headers/files/libc-5.1-remove-sysinfo_h-from-kernel_h.patch
+
+Date: Fri, 14 Mar 2014 17:14:10 +0100
+From: David Heidelberger <david.heidelberger@ixit.cz>
+To: linux-kernel@vger.kernel.org
+Cc: maillist-linux@barfooze.de, torvalds@linux-foundation.org
+Subject: [PATCH 1/4] glibc specific inclusion of sysinfo.h in kernel.h
+Message-ID: <130a9e0c237bae10e631a5ae52c5e2c8@ixit.cz>
+User-Agent: Roundcube Webmail/0.9.5
+Sender: linux-kernel-owner@vger.kernel.org
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+
+including sysinfo.h from kernel.h makes no sense whatsoever,
+but removing it breaks glibc's userspace header,
+which includes kernel.h instead of sysinfo.h from their sys/sysinfo.h.
+this seems to be a historical mistake.
+on musl, including any header that uses kernel.h directly or indirectly
+plus sys/sysinfo.h will produce a compile error due to redefinition of
+struct sysinfo.h.
+so for now, only include it on glibc in order not to break their
+headers.
+
+Signed-off-by: John Spencer <maillist-linux@barfooze.de>
+Signed-off-by: David Heidelberger <david.heidelberger@ixit.cz>
+---
+ include/uapi/linux/kernel.h | 2 ++
+ 1 file changed, 2 insertion(+)
+
+ */
+
+diff --git a/include/uapi/linux/kernel.h b/include/uapi/linux/kernel.h
+index 321e399..8c45eeb 100644
+--- a/include/uapi/linux/kernel.h
++++ b/include/uapi/linux/kernel.h
+@@ -1,7 +1,9 @@
+ #ifndef _UAPI_LINUX_KERNEL_H
+ #define _UAPI_LINUX_KERNEL_H
+
++#ifdef __GLIBC__
+ #include <linux/sysinfo.h>
++#endif
+
+ /*
+ * 'kernel.h' contains some often-used function prototypes etc
diff --git a/5.9/00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch b/5.9/00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch
new file mode 100644
index 0000000..24a4199
--- /dev/null
+++ b/5.9/00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch
@@ -0,0 +1,28 @@
+From 1f4498530090a5fe7f6b2c46f2beb8818d7cb27b 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/5.9/00_all_0003-convert-PAGE_SIZE-usage.patch b/5.9/00_all_0003-convert-PAGE_SIZE-usage.patch
new file mode 100644
index 0000000..fbc2c45
--- /dev/null
+++ b/5.9/00_all_0003-convert-PAGE_SIZE-usage.patch
@@ -0,0 +1,54 @@
+From 25f2bcfa6c8a9e7cee2b92a823495479fe0ccc92 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/5.9/00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch b/5.9/00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch
new file mode 100644
index 0000000..625fb6e
--- /dev/null
+++ b/5.9/00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch
@@ -0,0 +1,54 @@
+From 091dfce6aed898f4bc4eaca0edab942dd03b8016 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/5.9/00_all_0005-unifdef-drop-unused-errno.h-include.patch b/5.9/00_all_0005-unifdef-drop-unused-errno.h-include.patch
new file mode 100644
index 0000000..617eb9a
--- /dev/null
+++ b/5.9/00_all_0005-unifdef-drop-unused-errno.h-include.patch
@@ -0,0 +1,32 @@
+From c4d1a109c5c0b1bd27d2b5448a1306a2f6005339 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/5.9/00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch b/5.9/00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch
new file mode 100644
index 0000000..c4af343
--- /dev/null
+++ b/5.9/00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch
@@ -0,0 +1,33 @@
+From 57875de37c5375ea95e1e949ec7c741d0038d3a1 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 60135cbd905c..9b15b2daa77f 100644
+--- a/arch/x86/Makefile
++++ b/arch/x86/Makefile
+@@ -249,8 +249,10 @@ ifneq ($(RETPOLINE_CFLAGS),)
+ 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/5.9/00_all_0007-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch b/5.9/00_all_0007-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch
new file mode 100644
index 0000000..1fed99d
--- /dev/null
+++ b/5.9/00_all_0007-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch
@@ -0,0 +1,43 @@
+From cb87a9562cca933c97a482f09a36542b876608e8 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/5.9/00_all_0008-uapi-fix-System-V-buf-header-includes.patch b/5.9/00_all_0008-uapi-fix-System-V-buf-header-includes.patch
new file mode 100644
index 0000000..987a98d
--- /dev/null
+++ b/5.9/00_all_0008-uapi-fix-System-V-buf-header-includes.patch
@@ -0,0 +1,28 @@
+From beac664726b0b5b5c833aaf6576ca583534406ba 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>
+
+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 <asm/bitsperlong.h>
++#include <asm/ipcbuf.h>
+
+ /*
+ * The shmid64_ds structure for x86 architecture.
+--
+2.16.1
+
diff --git a/5.9/00_all_0009_glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch b/5.9/00_all_0009_glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch
new file mode 100644
index 0000000..df075dc
--- /dev/null
+++ b/5.9/00_all_0009_glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch
@@ -0,0 +1,46 @@
+https://lore.kernel.org/patchwork/patch/449607/
+https://gitweb.gentoo.org/proj/musl.git/tree/sys-kernel/linux-headers/files/libc-5.1-remove-sysinfo_h-from-kernel_h.patch
+
+Date: Fri, 14 Mar 2014 17:14:10 +0100
+From: David Heidelberger <david.heidelberger@ixit.cz>
+To: linux-kernel@vger.kernel.org
+Cc: maillist-linux@barfooze.de, torvalds@linux-foundation.org
+Subject: [PATCH 1/4] glibc specific inclusion of sysinfo.h in kernel.h
+Message-ID: <130a9e0c237bae10e631a5ae52c5e2c8@ixit.cz>
+User-Agent: Roundcube Webmail/0.9.5
+Sender: linux-kernel-owner@vger.kernel.org
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+
+including sysinfo.h from kernel.h makes no sense whatsoever,
+but removing it breaks glibc's userspace header,
+which includes kernel.h instead of sysinfo.h from their sys/sysinfo.h.
+this seems to be a historical mistake.
+on musl, including any header that uses kernel.h directly or indirectly
+plus sys/sysinfo.h will produce a compile error due to redefinition of
+struct sysinfo.h.
+so for now, only include it on glibc in order not to break their
+headers.
+
+Signed-off-by: John Spencer <maillist-linux@barfooze.de>
+Signed-off-by: David Heidelberger <david.heidelberger@ixit.cz>
+---
+ include/uapi/linux/kernel.h | 2 ++
+ 1 file changed, 2 insertion(+)
+
+ */
+
+diff --git a/include/uapi/linux/kernel.h b/include/uapi/linux/kernel.h
+index 321e399..8c45eeb 100644
+--- a/include/uapi/linux/kernel.h
++++ b/include/uapi/linux/kernel.h
+@@ -1,7 +1,9 @@
+ #ifndef _UAPI_LINUX_KERNEL_H
+ #define _UAPI_LINUX_KERNEL_H
+
++#ifdef __GLIBC__
+ #include <linux/sysinfo.h>
++#endif
+
+ /*
+ * 'kernel.h' contains some often-used function prototypes etc
diff --git a/6.0/00_all_0001-unifdef-drop-unused-errno.h-include.patch b/6.0/00_all_0001-unifdef-drop-unused-errno.h-include.patch
new file mode 100644
index 0000000..617eb9a
--- /dev/null
+++ b/6.0/00_all_0001-unifdef-drop-unused-errno.h-include.patch
@@ -0,0 +1,32 @@
+From c4d1a109c5c0b1bd27d2b5448a1306a2f6005339 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/6.0/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch b/6.0/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch
new file mode 100644
index 0000000..c1c7214
--- /dev/null
+++ b/6.0/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch
@@ -0,0 +1,33 @@
+From 57875de37c5375ea95e1e949ec7c741d0038d3a1 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 60135cbd905c..9b15b2daa77f 100644
+--- a/arch/x86/Makefile
++++ b/arch/x86/Makefile
+@@ -215,8 +215,10 @@
+ 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/6.1/00_all_0001-unifdef-drop-unused-errno.h-include.patch b/6.1/00_all_0001-unifdef-drop-unused-errno.h-include.patch
new file mode 100644
index 0000000..617eb9a
--- /dev/null
+++ b/6.1/00_all_0001-unifdef-drop-unused-errno.h-include.patch
@@ -0,0 +1,32 @@
+From c4d1a109c5c0b1bd27d2b5448a1306a2f6005339 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/6.1/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch b/6.1/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch
new file mode 100644
index 0000000..c1c7214
--- /dev/null
+++ b/6.1/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch
@@ -0,0 +1,33 @@
+From 57875de37c5375ea95e1e949ec7c741d0038d3a1 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 60135cbd905c..9b15b2daa77f 100644
+--- a/arch/x86/Makefile
++++ b/arch/x86/Makefile
+@@ -215,8 +215,10 @@
+ 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/6.2/00_all_0001-unifdef-drop-unused-errno.h-include.patch b/6.2/00_all_0001-unifdef-drop-unused-errno.h-include.patch
new file mode 100644
index 0000000..617eb9a
--- /dev/null
+++ b/6.2/00_all_0001-unifdef-drop-unused-errno.h-include.patch
@@ -0,0 +1,32 @@
+From c4d1a109c5c0b1bd27d2b5448a1306a2f6005339 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/6.2/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch b/6.2/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch
new file mode 100644
index 0000000..c1c7214
--- /dev/null
+++ b/6.2/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch
@@ -0,0 +1,33 @@
+From 57875de37c5375ea95e1e949ec7c741d0038d3a1 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 60135cbd905c..9b15b2daa77f 100644
+--- a/arch/x86/Makefile
++++ b/arch/x86/Makefile
+@@ -215,8 +215,10 @@
+ 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/6.3/00_all_0001-unifdef-drop-unused-errno.h-include.patch b/6.3/00_all_0001-unifdef-drop-unused-errno.h-include.patch
new file mode 100644
index 0000000..617eb9a
--- /dev/null
+++ b/6.3/00_all_0001-unifdef-drop-unused-errno.h-include.patch
@@ -0,0 +1,32 @@
+From c4d1a109c5c0b1bd27d2b5448a1306a2f6005339 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/6.3/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch b/6.3/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch
new file mode 100644
index 0000000..c1c7214
--- /dev/null
+++ b/6.3/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch
@@ -0,0 +1,33 @@
+From 57875de37c5375ea95e1e949ec7c741d0038d3a1 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 60135cbd905c..9b15b2daa77f 100644
+--- a/arch/x86/Makefile
++++ b/arch/x86/Makefile
+@@ -215,8 +215,10 @@
+ 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/6.4/00_all_0001-unifdef-drop-unused-errno.h-include.patch b/6.4/00_all_0001-unifdef-drop-unused-errno.h-include.patch
new file mode 100644
index 0000000..617eb9a
--- /dev/null
+++ b/6.4/00_all_0001-unifdef-drop-unused-errno.h-include.patch
@@ -0,0 +1,32 @@
+From c4d1a109c5c0b1bd27d2b5448a1306a2f6005339 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/6.4/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch b/6.4/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch
new file mode 100644
index 0000000..c1c7214
--- /dev/null
+++ b/6.4/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch
@@ -0,0 +1,33 @@
+From 57875de37c5375ea95e1e949ec7c741d0038d3a1 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 60135cbd905c..9b15b2daa77f 100644
+--- a/arch/x86/Makefile
++++ b/arch/x86/Makefile
+@@ -215,8 +215,10 @@
+ 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/6.5/00_all_0001-unifdef-drop-unused-errno.h-include.patch b/6.5/00_all_0001-unifdef-drop-unused-errno.h-include.patch
new file mode 100644
index 0000000..617eb9a
--- /dev/null
+++ b/6.5/00_all_0001-unifdef-drop-unused-errno.h-include.patch
@@ -0,0 +1,32 @@
+From c4d1a109c5c0b1bd27d2b5448a1306a2f6005339 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/6.5/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch b/6.5/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch
new file mode 100644
index 0000000..c1c7214
--- /dev/null
+++ b/6.5/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch
@@ -0,0 +1,33 @@
+From 57875de37c5375ea95e1e949ec7c741d0038d3a1 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 60135cbd905c..9b15b2daa77f 100644
+--- a/arch/x86/Makefile
++++ b/arch/x86/Makefile
+@@ -215,8 +215,10 @@
+ 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/6.5/00_all_0003-Compiler-Attributes-counted_by-Adjust-name-and-ident.patch b/6.5/00_all_0003-Compiler-Attributes-counted_by-Adjust-name-and-ident.patch
new file mode 100644
index 0000000..7365e3e
--- /dev/null
+++ b/6.5/00_all_0003-Compiler-Attributes-counted_by-Adjust-name-and-ident.patch
@@ -0,0 +1,87 @@
+From 564e31793787789b226a6f4b7081f2647a515b58 Mon Sep 17 00:00:00 2001
+From: Kees Cook <keescook@chromium.org>
+Date: Thu, 17 Aug 2023 13:06:03 -0700
+Subject: [PATCH 3/5] Compiler Attributes: counted_by: Adjust name and
+ identifier expansion
+
+[ Upstream commit c8248faf3ca276ebdf60f003b3e04bf764daba91 ]
+
+GCC and Clang's current RFCs name this attribute "counted_by", and have
+moved away from using a string for the member name. Update the kernel's
+macros to match. Additionally provide a UAPI no-op macro for UAPI structs
+that will gain annotations.
+
+Cc: Miguel Ojeda <ojeda@kernel.org>
+Cc: Nick Desaulniers <ndesaulniers@google.com>
+Fixes: dd06e72e68bc ("Compiler Attributes: Add __counted_by macro")
+Acked-by: Miguel Ojeda <ojeda@kernel.org>
+Reviewed-by: Nathan Chancellor <nathan@kernel.org>
+Link: https://lore.kernel.org/r/20230817200558.never.077-kees@kernel.org
+Signed-off-by: Kees Cook <keescook@chromium.org>
+Stable-dep-of: 32a4ec211d41 ("uapi: stddef.h: Fix __DECLARE_FLEX_ARRAY for C++")
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+(cherry picked from commit cc17adeef726a0df7fe5df7585a07128cd0c6070)
+---
+ include/linux/compiler_attributes.h | 26 +++++++++++++-------------
+ include/uapi/linux/stddef.h | 4 ++++
+ 2 files changed, 17 insertions(+), 13 deletions(-)
+
+diff --git a/include/linux/compiler_attributes.h b/include/linux/compiler_attributes.h
+index 00efa35c350f..28566624f008 100644
+--- a/include/linux/compiler_attributes.h
++++ b/include/linux/compiler_attributes.h
+@@ -94,6 +94,19 @@
+ # define __copy(symbol)
+ #endif
+
++/*
++ * Optional: only supported since gcc >= 14
++ * Optional: only supported since clang >= 18
++ *
++ * gcc: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108896
++ * clang: https://reviews.llvm.org/D148381
++ */
++#if __has_attribute(__counted_by__)
++# define __counted_by(member) __attribute__((__counted_by__(member)))
++#else
++# define __counted_by(member)
++#endif
++
+ /*
+ * Optional: not supported by gcc
+ * Optional: only supported since clang >= 14.0
+@@ -129,19 +142,6 @@
+ # define __designated_init
+ #endif
+
+-/*
+- * Optional: only supported since gcc >= 14
+- * Optional: only supported since clang >= 17
+- *
+- * gcc: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108896
+- * clang: https://reviews.llvm.org/D148381
+- */
+-#if __has_attribute(__element_count__)
+-# define __counted_by(member) __attribute__((__element_count__(#member)))
+-#else
+-# define __counted_by(member)
+-#endif
+-
+ /*
+ * Optional: only supported since clang >= 14.0
+ *
+diff --git a/include/uapi/linux/stddef.h b/include/uapi/linux/stddef.h
+index 7837ba4fe728..7c3fc3980881 100644
+--- a/include/uapi/linux/stddef.h
++++ b/include/uapi/linux/stddef.h
+@@ -45,3 +45,7 @@
+ TYPE NAME[]; \
+ }
+ #endif
++
++#ifndef __counted_by
++#define __counted_by(m)
++#endif
+--
+2.42.0
+
diff --git a/6.5/00_all_0004-uapi-stddef.h-Fix-header-guard-location.patch b/6.5/00_all_0004-uapi-stddef.h-Fix-header-guard-location.patch
new file mode 100644
index 0000000..74fed6e
--- /dev/null
+++ b/6.5/00_all_0004-uapi-stddef.h-Fix-header-guard-location.patch
@@ -0,0 +1,41 @@
+From 4741f029c3eebaaaae560864d5442319ad1d7a02 Mon Sep 17 00:00:00 2001
+From: Alexey Dobriyan <adobriyan@gmail.com>
+Date: Tue, 12 Sep 2023 19:23:21 +0300
+Subject: [PATCH 4/5] uapi: stddef.h: Fix header guard location
+
+[ Upstream commit 531108ec5b5cd45ec6272a6115e73275baef7d22 ]
+
+The #endif for the header guard wasn't at the end of the header. This
+was harmless since the define that escaped was already testing for its
+own redefinition. Regardless, move the #endif to the correct place.
+
+Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
+Fixes: c8248faf3ca2 ("Compiler Attributes: counted_by: Adjust name and identifier expansion")
+Link: https://lore.kernel.org/r/b1f5081e-339d-421d-81b2-cbb94e1f6f5f@p183
+Co-developed-by: Kees Cook <keescook@chromium.org>
+Signed-off-by: Kees Cook <keescook@chromium.org>
+Stable-dep-of: 32a4ec211d41 ("uapi: stddef.h: Fix __DECLARE_FLEX_ARRAY for C++")
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+(cherry picked from commit 721045f22e1a79cb04bfd4463cdf445108287666)
+---
+ include/uapi/linux/stddef.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/include/uapi/linux/stddef.h b/include/uapi/linux/stddef.h
+index 7c3fc3980881..c027b2070d79 100644
+--- a/include/uapi/linux/stddef.h
++++ b/include/uapi/linux/stddef.h
+@@ -44,8 +44,9 @@
+ struct { } __empty_ ## NAME; \
+ TYPE NAME[]; \
+ }
+-#endif
+
+ #ifndef __counted_by
+ #define __counted_by(m)
+ #endif
++
++#endif /* _UAPI_LINUX_STDDEF_H */
+--
+2.42.0
+
diff --git a/6.5/00_all_0005-uapi-stddef.h-Fix-__DECLARE_FLEX_ARRAY-for-C.patch b/6.5/00_all_0005-uapi-stddef.h-Fix-__DECLARE_FLEX_ARRAY-for-C.patch
new file mode 100644
index 0000000..934774e
--- /dev/null
+++ b/6.5/00_all_0005-uapi-stddef.h-Fix-__DECLARE_FLEX_ARRAY-for-C.patch
@@ -0,0 +1,77 @@
+From 8ba6fb2fa507aec278bce9fec42b38be2231588e Mon Sep 17 00:00:00 2001
+From: Alexey Dobriyan <adobriyan@gmail.com>
+Date: Tue, 12 Sep 2023 19:22:24 +0300
+Subject: [PATCH 5/5] uapi: stddef.h: Fix __DECLARE_FLEX_ARRAY for C++
+
+[ Upstream commit 32a4ec211d4164e667d9d0b807fadf02053cd2e9 ]
+
+__DECLARE_FLEX_ARRAY(T, member) macro expands to
+
+ struct {
+ struct {} __empty_member;
+ T member[];
+ };
+
+which is subtly wrong in C++ because sizeof(struct{}) is 1 not 0,
+changing UAPI structures layouts.
+
+This can be fixed by expanding to
+
+ T member[];
+
+Now g++ doesn't like "T member[]" either, throwing errors on
+the following code:
+
+ struct S {
+ union {
+ T1 member1[];
+ T2 member2[];
+ };
+ };
+
+or
+
+ struct S {
+ T member[];
+ };
+
+Use "T member[0];" which seems to work and does the right thing wrt
+structure layout.
+
+Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
+Fixes: 3080ea5553cc ("stddef: Introduce DECLARE_FLEX_ARRAY() helper")
+Link: https://lore.kernel.org/r/97242381-f1ec-4a4a-9472-1a464f575657@p183
+Signed-off-by: Kees Cook <keescook@chromium.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+(cherry picked from commit 144ed54ed6ec4c099ff7c2b0064ed3ff89b73737)
+---
+ include/uapi/linux/stddef.h | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/include/uapi/linux/stddef.h b/include/uapi/linux/stddef.h
+index c027b2070d79..5c6c4269f7ef 100644
+--- a/include/uapi/linux/stddef.h
++++ b/include/uapi/linux/stddef.h
+@@ -29,6 +29,11 @@
+ struct TAG { MEMBERS } ATTRS NAME; \
+ }
+
++#ifdef __cplusplus
++/* sizeof(struct{}) is 1 in C++, not 0, can't use C version of the macro. */
++#define __DECLARE_FLEX_ARRAY(T, member) \
++ T member[0]
++#else
+ /**
+ * __DECLARE_FLEX_ARRAY() - Declare a flexible array usable in a union
+ *
+@@ -44,6 +49,7 @@
+ struct { } __empty_ ## NAME; \
+ TYPE NAME[]; \
+ }
++#endif
+
+ #ifndef __counted_by
+ #define __counted_by(m)
+--
+2.42.0
+
diff --git a/6.6/00_all_0001-unifdef-drop-unused-errno.h-include.patch b/6.6/00_all_0001-unifdef-drop-unused-errno.h-include.patch
new file mode 100644
index 0000000..617eb9a
--- /dev/null
+++ b/6.6/00_all_0001-unifdef-drop-unused-errno.h-include.patch
@@ -0,0 +1,32 @@
+From c4d1a109c5c0b1bd27d2b5448a1306a2f6005339 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/6.6/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch b/6.6/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch
new file mode 100644
index 0000000..c1c7214
--- /dev/null
+++ b/6.6/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch
@@ -0,0 +1,33 @@
+From 57875de37c5375ea95e1e949ec7c741d0038d3a1 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 60135cbd905c..9b15b2daa77f 100644
+--- a/arch/x86/Makefile
++++ b/arch/x86/Makefile
+@@ -215,8 +215,10 @@
+ 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/6.7/00_all_0001-unifdef-drop-unused-errno.h-include.patch b/6.7/00_all_0001-unifdef-drop-unused-errno.h-include.patch
new file mode 100644
index 0000000..617eb9a
--- /dev/null
+++ b/6.7/00_all_0001-unifdef-drop-unused-errno.h-include.patch
@@ -0,0 +1,32 @@
+From c4d1a109c5c0b1bd27d2b5448a1306a2f6005339 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/6.7/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch b/6.7/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch
new file mode 100644
index 0000000..c1c7214
--- /dev/null
+++ b/6.7/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch
@@ -0,0 +1,33 @@
+From 57875de37c5375ea95e1e949ec7c741d0038d3a1 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 60135cbd905c..9b15b2daa77f 100644
+--- a/arch/x86/Makefile
++++ b/arch/x86/Makefile
+@@ -215,8 +215,10 @@
+ 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/6.8/00_all_0001-unifdef-drop-unused-errno.h-include.patch b/6.8/00_all_0001-unifdef-drop-unused-errno.h-include.patch
new file mode 100644
index 0000000..617eb9a
--- /dev/null
+++ b/6.8/00_all_0001-unifdef-drop-unused-errno.h-include.patch
@@ -0,0 +1,32 @@
+From c4d1a109c5c0b1bd27d2b5448a1306a2f6005339 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/6.8/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch b/6.8/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch
new file mode 100644
index 0000000..c1c7214
--- /dev/null
+++ b/6.8/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch
@@ -0,0 +1,33 @@
+From 57875de37c5375ea95e1e949ec7c741d0038d3a1 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 60135cbd905c..9b15b2daa77f 100644
+--- a/arch/x86/Makefile
++++ b/arch/x86/Makefile
+@@ -215,8 +215,10 @@
+ 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/README.Gentoo.patches b/README.Gentoo.patches
index 0539599..b901725 100644
--- a/README.Gentoo.patches
+++ b/README.Gentoo.patches
@@ -3,11 +3,11 @@
================
Gentoo patchsets that have grown too large to keep on the rsync mirrors have
-been moved to our cvs tree. From there, we bundle up all the whee little
+been moved to our git tree. From there, we bundle up all the wee little
patches into a tarball and distribute it via our public mirroring system.
If you want specific info about a patch (like wtf it does or whose great idea
-it was to change the code), read the patch ! We try to fill out the top of
+it was to change the code), read the patch! We try to fill out the top of
them with useful info such as what it does, why it's needed, bug reports,
original creators, etc.
@@ -25,13 +25,9 @@ read-write git tree: git+ssh://git@git.gentoo.org/proj/toolchain/linux-headers-p
The patch naming/applying convention might be a little confusing to the Gentoo
outsider, so here's a quick rundown. Patch tarballs are applied in Gentoo via
-a helper command called "epatch". This command is pretty forgiving when it
-comes to applying patches.
+a helper command called "eapply".
-For example, it will autodetect the required -p# by starting at 0 and counting
-up until things apply. So do not expect a patch series to all be at the same -p
-level even if they all apply from the same source directory. Typically however,
-people will use -p0 or -p1.
+Patches should use -p1.
The epatch command will also use the -E option by default as the `patch` command
can be pretty picky about removing files. We just force the issue. If you
diff --git a/rip-headers.sh b/rip-headers.sh
index 717405b..a5349db 100755
--- a/rip-headers.sh
+++ b/rip-headers.sh
@@ -13,7 +13,7 @@ dst=gentoo-headers-base-${ver}
distdir=$(portageq distdir)
if [ ! -d ${src} ] ; then
- for srcdir in . "${distdir}" /usr/portage/distfiles ; do
+ for srcdir in . "${distdir}" /var/cache/distfiles /usr/portage/distfiles ; do
for ext in bz2 xz ; do
srctar=${srcdir}/${src}.tar.${ext}
if [ -e ${srctar} ] ; then
diff --git a/testing.txt b/testing.txt
index 2e1af08..a142f75 100644
--- a/testing.txt
+++ b/testing.txt
@@ -1,19 +1,20 @@
-upgrade process:
+Upgrade process:
- - generate the gentoo-headers-base-<kernel version>.tar.xz tarball:
- $ ./rip-headers.sh 3.13
- - create a new patchset dir:
- $ cp -a 3.13/ 3.14/
- $ rm -rf 3.14/CVS
- $ cvs add 3.14 && cvs add 3.14/*
- - generate the patchset tarball:
- $ ./make-tarball.sh 3.14 1
- - update the ebuild:
- $ cp linux-headers-3.13.ebuild linux-headers-3.14.ebuild
- - test it (see sections below)
- - upload tarballs & commit files to cvs
+ - Familiarize yourself with https://wiki.gentoo.org/wiki/Project:Toolchain/sys-kernel/linux-headers
+ and README*.
+ - Generate the gentoo-headers-base-<kernel version>.tar.xz tarball:
+ $ ./rip-headers.sh 5.15
+ - Create a new patchset dir:
+ $ cp -a 5.15/ 5.15/
+ $ git add 5.15
+ - Generate the patchset tarball:
+ $ ./make-tarball.sh 5.15 1
+ - Update the ebuild:
+ $ cp linux-headers-5.14.ebuild linux-headers-5.15.ebuild
+ - Test it (see sections below)
+ - Upload tarballs & commit files
-smoke test:
+Smoke test:
for h in `find /usr/include/linux -type f -printf '%P '` ; do
h="linux/$h"; echo "$h"
@@ -24,63 +25,128 @@ smoke test:
find /usr/include/linux -type f -printf '%P '
-common packages that break:
+Check direct reverse dependencies of virtual/linux-headers:
pkgs=$(sed -n '/^%/,/^%/{s:%::;p}' testing.txt)
+ pkgs=$(echo ${pkgs} | tr ' ' '\n' | sed -e '/systemd-utils/d' | sed -e '/ps3pf_utils/d' | sed -e '/dahdi-tools/d' | sed -e '/geode/d' | sed -e '/xhkeys/d' | sed -e '/pulseaudio-daemon/d' | sed -e '/openssh-contrib/d' | sed -e '/libreswan/d' | sed -e '/ola/d' | tr '\n' ' ')
emerge --keep-going -1v ${pkgs} --jobs 4
%
-app-metrics/collectd
-app-cdr/cdrdao
-app-cdr/cdrtools
-app-cdr/dvd+rw-tools
+app-containers/crun
+app-containers/lxc
app-emulation/qemu
+app-emulation/wine-proton
+app-emulation/wine-staging
+app-emulation/wine-vanilla
+app-emulation/xen-tools
+app-i18n/jfbterm
+app-metrics/collectd
+app-misc/ddccontrol
app-misc/inputlircd
-app-text/a2ps
-dev-util/strace
-media-libs/libv4l
-media-tv/ivtv-utils
-media-video/vdr
-net-analyzer/ipsumdump
+app-misc/lirc
+app-misc/ola
+app-misc/ps3pf_utils
+app-misc/srm
+dev-libs/libbpf
+dev-libs/libbsd
+dev-libs/libx86
+dev-perl/perl-headers
+dev-qt/qtgui
+dev-qt/qtmultimedia
+dev-util/bcc
+dev-util/bootconfig
+dev-util/bpftool
+dev-util/oprofile
+dev-util/perf
+dev-util/rr
+dev-debug/strace
+dev-util/sysprof
+dev-util/sysprof-capture
+dev-util/trace-cmd
+games-emulation/gnuboy
+gnome-base/gnome-settings-daemon
+gui-wm/dwl
+kde-plasma/kwayland
+media-gfx/sane-backends
+media-libs/libgii
+media-plugins/vdr-xineliboutput
+media-sound/pulseaudio-daemon
+media-tv/mythtv
+media-video/ffmpeg
+media-video/gpac
+media-video/guvcview
+media-video/mplayer
+media-video/setpwc
+media-video/webcamoid
+net-analyzer/ifmetric
+net-analyzer/netwatch
net-dialup/linux-atm
-net-dialup/ppp
net-dialup/rp-pppoe
-net-dns/dnsmasq
+net-dialup/xl2tpd
net-firewall/iptables
-net-libs/libtrace
+net-firewall/ipt_netflow
+net-ftp/frox
+net-im/toxic
+net-libs/gupnp
net-misc/bridge-utils
-net-misc/dhcpcd
-net-misc/iputils
+net-misc/connman
+net-misc/dahdi-tools
+net-misc/ifenslave
net-misc/lksctp-tools
-net-misc/ntpclient
-net-misc/socat
+net-misc/mptcpd
+net-misc/networkmanager
+net-misc/openssh
+net-misc/openssh-contrib
+net-misc/pingu
+net-misc/tipcutils
+net-misc/usbip
+net-misc/wol
net-proxy/shadowsocks-libev
-net-vpn/ipsec-tools
-net-wireless/irda-utils
-net-wireless/iw
-net-wireless/wireless-tools
-net-wireless/wpa_supplicant
-sys-apps/acl
-sys-apps/attr
+net-vpn/libreswan
+net-vpn/strongswan
+sci-libs/indilib
sys-apps/busybox
+sys-apps/chname
+sys-apps/flashrom
+sys-apps/fwupd
+sys-apps/hwinfo
sys-apps/iproute2
-sys-apps/kbd
+sys-apps/keyutils
+sys-apps/linux-misc-apps
+sys-apps/mount-idmapped
sys-apps/net-tools
-sys-apps/sandbox
-sys-apps/setserial
+sys-apps/shadow
+sys-apps/systemd
+sys-apps/systemd-readahead
+sys-apps/systemd-utils
+sys-auth/pam_mktemp
+sys-block/blktrace
sys-block/fio
-sys-block/sedutil
-sys-boot/efibootmgr
-sys-boot/syslinux
-sys-devel/gdb
-sys-fs/fuse
-sys-fs/udev
+sys-block/libzbc
+sys-block/libzbd
+sys-block/open-iscsi
+sys-cluster/corosync
+sys-cluster/keepalived
+sys-fs/btrfs-progs
+sys-fs/cryptmount
+sys-fs/jfsutils
+sys-fs/nilfs-utils
+sys-fs/udisks
+sys-kernel/linux-headers
sys-libs/efivar
-sys-libs/gpm
sys-libs/libcap
+sys-libs/libcap-ng
+sys-libs/libseccomp
+sys-libs/liburing
+sys-libs/mtdev
+sys-power/acpid
+sys-power/bbswitch
sys-process/audit
-sys-process/criu
-sys-process/lsof
+x11-drivers/xf86-input-evdev
+x11-drivers/xf86-input-synaptics
+x11-drivers/xf86-video-geode
+x11-misc/xhkeys
+x11-wm/mutter
%
then make sure the big one: