1 |
commit: 0d1209841b6d62b1a3af669453da142ef3b68f35 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jul 5 16:14:29 2021 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jul 5 16:14:29 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/toolchain/linux-headers-patches.git/commit/?id=0d120984 |
7 |
|
8 |
5.13: new patchset, a copy of 5.12, with some removed |
9 |
|
10 |
The following patches have been removed, since they are ancient, |
11 |
no other distro carries similar ones, and they seem to exist |
12 |
solely to allow unportable behaviour. |
13 |
|
14 |
* 00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch |
15 |
* 00_all_0003-convert-PAGE_SIZE-usage.patch |
16 |
* 00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch |
17 |
|
18 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
19 |
|
20 |
..._0001-unifdef-drop-unused-errno.h-include.patch | 32 ++++++++++++++++ |
21 |
...build-relocs-tool-when-installing-headers.patch | 33 +++++++++++++++++ |
22 |
...k-drop-int-cast-on-length-arg-in-NLMSG_OK.patch | 43 ++++++++++++++++++++++ |
23 |
...004-uapi-fix-System-V-buf-header-includes.patch | 28 ++++++++++++++ |
24 |
4 files changed, 136 insertions(+) |
25 |
|
26 |
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 |
27 |
new file mode 100644 |
28 |
index 0000000..617eb9a |
29 |
--- /dev/null |
30 |
+++ b/5.13/00_all_0001-unifdef-drop-unused-errno.h-include.patch |
31 |
@@ -0,0 +1,32 @@ |
32 |
+From c4d1a109c5c0b1bd27d2b5448a1306a2f6005339 Mon Sep 17 00:00:00 2001 |
33 |
+From: Mike Frysinger <vapier@g.o> |
34 |
+Date: Tue, 6 Dec 2011 17:22:42 -0500 |
35 |
+Subject: [PATCH] unifdef: drop unused errno.h include |
36 |
+ |
37 |
+This is the only header on my system that ends up requiring kernel |
38 |
+headers, so if the kernel headers aren't available, we end up being |
39 |
+unable to install kernel headers :). |
40 |
+ |
41 |
+Since this file doesn't actually use anything from errno.h, drop |
42 |
+the include so it at least makes us a bit more robust on glibc. |
43 |
+ |
44 |
+Signed-off-by: Mike Frysinger <vapier@g.o> |
45 |
+--- |
46 |
+ scripts/unifdef.c | 1 - |
47 |
+ 1 file changed, 1 deletion(-) |
48 |
+ |
49 |
+diff --git a/scripts/unifdef.c b/scripts/unifdef.c |
50 |
+index 7493c0ee51cc..c5dfae538b08 100644 |
51 |
+--- a/scripts/unifdef.c |
52 |
++++ b/scripts/unifdef.c |
53 |
+@@ -48,7 +48,6 @@ |
54 |
+ |
55 |
+ #include <ctype.h> |
56 |
+ #include <err.h> |
57 |
+-#include <errno.h> |
58 |
+ #include <stdarg.h> |
59 |
+ #include <stdbool.h> |
60 |
+ #include <stdio.h> |
61 |
+-- |
62 |
+2.16.1 |
63 |
+ |
64 |
|
65 |
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 |
66 |
new file mode 100644 |
67 |
index 0000000..a82c98e |
68 |
--- /dev/null |
69 |
+++ b/5.13/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch |
70 |
@@ -0,0 +1,33 @@ |
71 |
+From 57875de37c5375ea95e1e949ec7c741d0038d3a1 Mon Sep 17 00:00:00 2001 |
72 |
+From: Mike Frysinger <vapier@g.o> |
73 |
+Date: Sat, 15 Nov 2014 03:37:38 -0500 |
74 |
+Subject: [PATCH] x86: do not build relocs tool when installing headers |
75 |
+ |
76 |
+This isn't needed to install headers, so don't bother building it. |
77 |
+Otherwise we run into a chicken/egg issue where we need the kernel |
78 |
+headers in order to install the kernel headers. It's also a waste |
79 |
+of time. |
80 |
+ |
81 |
+Signed-off-by: Mike Frysinger <vapier@g.o> |
82 |
+--- |
83 |
+ arch/x86/Makefile | 2 ++ |
84 |
+ 1 file changed, 2 insertions(+) |
85 |
+ |
86 |
+diff --git a/arch/x86/Makefile b/arch/x86/Makefile |
87 |
+index 60135cbd905c..9b15b2daa77f 100644 |
88 |
+--- a/arch/x86/Makefile |
89 |
++++ b/arch/x86/Makefile |
90 |
+@@ -221,8 +221,10 @@ |
91 |
+ endif |
92 |
+ |
93 |
+ |
94 |
++ifneq ($(filter-out headers_install,$(MAKECMDGOALS)),) |
95 |
+ archscripts: scripts_basic |
96 |
+ $(Q)$(MAKE) $(build)=arch/x86/tools relocs |
97 |
++endif |
98 |
+ |
99 |
+ ### |
100 |
+ # Syscall table generation |
101 |
+-- |
102 |
+2.16.1 |
103 |
+ |
104 |
|
105 |
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 |
106 |
new file mode 100644 |
107 |
index 0000000..1fed99d |
108 |
--- /dev/null |
109 |
+++ b/5.13/00_all_0003-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch |
110 |
@@ -0,0 +1,43 @@ |
111 |
+From cb87a9562cca933c97a482f09a36542b876608e8 Mon Sep 17 00:00:00 2001 |
112 |
+From: Mike Frysinger <vapier@g.o> |
113 |
+Date: Thu, 5 Mar 2015 00:26:58 -0500 |
114 |
+Subject: [PATCH] netlink: drop (int) cast on length arg in NLMSG_OK |
115 |
+ |
116 |
+The NLMSG_OK macro compares three things: |
117 |
+ - the len arg from the user |
118 |
+ - a size_t: sizeof(struct nlmsghdr) |
119 |
+ - an int: sizeof(struct nlmsghdr) casted |
120 |
+ - an u32: the nlmsghdr->nlmsg_len member |
121 |
+ |
122 |
+When building with -Wsign-compare, this macro triggers a signed compare |
123 |
+warning. This is because it compares len to an int, and then compares |
124 |
+it to a u32. If len is signed, we get a warning due to the last test. |
125 |
+If len is unsigned, we get a warning due to the first test. Like in |
126 |
+strace: |
127 |
+socketutils.c:145:8: warning: comparison between signed and unsigned |
128 |
+ integer expressions [-Wsign-compare] |
129 |
+ |
130 |
+Lets drop the int cast on the first sizeof. This way, once the user |
131 |
+casts len to an unsigned value, everything shakes out correctly. |
132 |
+ |
133 |
+Signed-off-by: Mike Frysinger <vapier@g.o> |
134 |
+--- |
135 |
+ include/uapi/linux/netlink.h | 2 +- |
136 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
137 |
+ |
138 |
+diff --git a/include/uapi/linux/netlink.h b/include/uapi/linux/netlink.h |
139 |
+index 776bc92e9118..d0c4df5fa670 100644 |
140 |
+--- a/include/uapi/linux/netlink.h |
141 |
++++ b/include/uapi/linux/netlink.h |
142 |
+@@ -94,7 +94,7 @@ struct nlmsghdr { |
143 |
+ #define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0))) |
144 |
+ #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \ |
145 |
+ (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) |
146 |
+-#define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && \ |
147 |
++#define NLMSG_OK(nlh,len) ((len) >= sizeof(struct nlmsghdr) && \ |
148 |
+ (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \ |
149 |
+ (nlh)->nlmsg_len <= (len)) |
150 |
+ #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len))) |
151 |
+-- |
152 |
+2.16.1 |
153 |
+ |
154 |
|
155 |
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 |
156 |
new file mode 100644 |
157 |
index 0000000..987a98d |
158 |
--- /dev/null |
159 |
+++ b/5.13/00_all_0004-uapi-fix-System-V-buf-header-includes.patch |
160 |
@@ -0,0 +1,28 @@ |
161 |
+From beac664726b0b5b5c833aaf6576ca583534406ba Mon Sep 17 00:00:00 2001 |
162 |
+From: Mike Frysinger <vapier@g.o> |
163 |
+Date: Mon, 2 Nov 2015 13:30:12 -0500 |
164 |
+Subject: [PATCH] uapi: fix System V buf header includes |
165 |
+ |
166 |
+These headers rely on kernel types but don't include the other headers |
167 |
+that define them. So when you try to include them directly, you often |
168 |
+hit build failures due to unknown types. |
169 |
+ |
170 |
+Signed-off-by: Mike Frysinger <vapier@g.o> |
171 |
+ |
172 |
+diff --git a/include/uapi/asm-generic/shmbuf.h b/include/uapi/asm-generic/shmbuf.h |
173 |
+index 2b6c3bb97f97..a0171147d796 100644 |
174 |
+--- a/include/uapi/asm-generic/shmbuf.h |
175 |
++++ b/include/uapi/asm-generic/shmbuf.h |
176 |
+@@ -2,7 +2,9 @@ |
177 |
+ #ifndef __ASM_GENERIC_SHMBUF_H |
178 |
+ #define __ASM_GENERIC_SHMBUF_H |
179 |
+ |
180 |
++ |
181 |
+ #include <asm/bitsperlong.h> |
182 |
++#include <asm/ipcbuf.h> |
183 |
+ |
184 |
+ /* |
185 |
+ * The shmid64_ds structure for x86 architecture. |
186 |
+-- |
187 |
+2.16.1 |
188 |
+ |