1 |
vapier 15/11/02 19:59:25 |
2 |
|
3 |
Added: |
4 |
00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch |
5 |
00_all_0002-netfilter-pull-in-limits.h.patch |
6 |
00_all_0003-convert-PAGE_SIZE-usage.patch |
7 |
00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch |
8 |
00_all_0005-unifdef-drop-unused-errno.h-include.patch |
9 |
00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch |
10 |
00_all_0007-timerfd-export-defines-to-userspace.patch |
11 |
00_all_0008-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch |
12 |
00_all_0009-Revert-MIPS-Provide-correct-siginfo_t.si_stime.patch |
13 |
00_all_0010-uapi-mqueue.h-add-missing-linux-types.h-include.patch |
14 |
00_all_0011-uapi-fix-System-V-buf-header-includes.patch |
15 |
Log: |
16 |
initial 4.3 patchset based on last 4.2 patchset |
17 |
|
18 |
Revision Changes Path |
19 |
1.1 src/patchsets/gentoo-headers/4.3/00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch |
20 |
|
21 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.3/00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch?rev=1.1&view=markup |
22 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.3/00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch?rev=1.1&content-type=text/plain |
23 |
|
24 |
Index: 00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch |
25 |
=================================================================== |
26 |
From eb2935ac60fc296de82ea954949fd35dd42d9901 Mon Sep 17 00:00:00 2001 |
27 |
From: Mike Frysinger <vapier@g.o> |
28 |
Date: Mon, 29 Dec 2008 06:52:59 -0500 |
29 |
Subject: [PATCH] linux/stat.h: remove __GLIBC__ checks |
30 |
|
31 |
Only check __KERNEL__ so we don't assume the C library is glibc. |
32 |
|
33 |
Signed-off-by: Mike Frysinger <vapier@g.o> |
34 |
--- |
35 |
include/uapi/linux/stat.h | 2 +- |
36 |
1 file changed, 1 insertion(+), 1 deletion(-) |
37 |
|
38 |
diff --git a/include/uapi/linux/stat.h b/include/uapi/linux/stat.h |
39 |
index 7fec7e3..256ad24 100644 |
40 |
--- a/include/uapi/linux/stat.h |
41 |
+++ b/include/uapi/linux/stat.h |
42 |
@@ -2,7 +2,7 @@ |
43 |
#define _UAPI_LINUX_STAT_H |
44 |
|
45 |
|
46 |
-#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) |
47 |
+#if defined(__KERNEL__) |
48 |
|
49 |
#define S_IFMT 00170000 |
50 |
#define S_IFSOCK 0140000 |
51 |
-- |
52 |
2.5.2 |
53 |
|
54 |
|
55 |
|
56 |
|
57 |
1.1 src/patchsets/gentoo-headers/4.3/00_all_0002-netfilter-pull-in-limits.h.patch |
58 |
|
59 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.3/00_all_0002-netfilter-pull-in-limits.h.patch?rev=1.1&view=markup |
60 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.3/00_all_0002-netfilter-pull-in-limits.h.patch?rev=1.1&content-type=text/plain |
61 |
|
62 |
Index: 00_all_0002-netfilter-pull-in-limits.h.patch |
63 |
=================================================================== |
64 |
From bc9d848542118fb8956336ed2cead8c9dd55339a Mon Sep 17 00:00:00 2001 |
65 |
From: Mike Frysinger <vapier@g.o> |
66 |
Date: Sat, 9 May 2009 17:30:35 -0400 |
67 |
Subject: [PATCH] netfilter: pull in limits.h |
68 |
|
69 |
A few netfilter sub-headers use INT_MAX which is in limits.h. |
70 |
|
71 |
URL: http://bugs.gentoo.org/246160 |
72 |
Signed-off-by: Mike Frysinger <vapier@g.o> |
73 |
--- |
74 |
include/uapi/linux/netfilter.h | 1 + |
75 |
1 file changed, 1 insertion(+) |
76 |
|
77 |
diff --git a/include/uapi/linux/netfilter.h b/include/uapi/linux/netfilter.h |
78 |
index d93f949..beed62c 100644 |
79 |
--- a/include/uapi/linux/netfilter.h |
80 |
+++ b/include/uapi/linux/netfilter.h |
81 |
@@ -6,6 +6,7 @@ |
82 |
#include <linux/sysctl.h> |
83 |
#include <linux/in.h> |
84 |
#include <linux/in6.h> |
85 |
+#include <limits.h> |
86 |
|
87 |
/* Responses from hook functions. */ |
88 |
#define NF_DROP 0 |
89 |
-- |
90 |
2.5.2 |
91 |
|
92 |
|
93 |
|
94 |
|
95 |
1.1 src/patchsets/gentoo-headers/4.3/00_all_0003-convert-PAGE_SIZE-usage.patch |
96 |
|
97 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.3/00_all_0003-convert-PAGE_SIZE-usage.patch?rev=1.1&view=markup |
98 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.3/00_all_0003-convert-PAGE_SIZE-usage.patch?rev=1.1&content-type=text/plain |
99 |
|
100 |
Index: 00_all_0003-convert-PAGE_SIZE-usage.patch |
101 |
=================================================================== |
102 |
From a94182ef06f169dfa072b2b11f7a066592aa517d Mon Sep 17 00:00:00 2001 |
103 |
From: Mike Frysinger <vapier@g.o> |
104 |
Date: Sat, 13 Feb 2010 03:09:23 -0500 |
105 |
Subject: [PATCH] convert PAGE_SIZE usage |
106 |
|
107 |
The size of a page may change at runtime or based on kernel settings, so |
108 |
a static value at compile time doesn't work. More importantly, no one |
109 |
exports PAGE_SIZE to user space anymore. |
110 |
|
111 |
URL: http://bugs.gentoo.org/301431 |
112 |
Signed-off-by: Mike Frysinger <vapier@g.o> |
113 |
--- |
114 |
include/uapi/linux/binfmts.h | 3 ++- |
115 |
include/uapi/linux/resource.h | 3 ++- |
116 |
2 files changed, 4 insertions(+), 2 deletions(-) |
117 |
|
118 |
diff --git a/include/uapi/linux/binfmts.h b/include/uapi/linux/binfmts.h |
119 |
index 4eb5972..516bfcf 100644 |
120 |
--- a/include/uapi/linux/binfmts.h |
121 |
+++ b/include/uapi/linux/binfmts.h |
122 |
@@ -1,6 +1,7 @@ |
123 |
#ifndef _UAPI_LINUX_BINFMTS_H |
124 |
#define _UAPI_LINUX_BINFMTS_H |
125 |
|
126 |
+#include <unistd.h> |
127 |
#include <linux/capability.h> |
128 |
|
129 |
struct pt_regs; |
130 |
@@ -11,7 +12,7 @@ struct pt_regs; |
131 |
* prevent the kernel from being unduly impacted by misaddressed pointers. |
132 |
* MAX_ARG_STRINGS is chosen to fit in a signed 32-bit integer. |
133 |
*/ |
134 |
-#define MAX_ARG_STRLEN (PAGE_SIZE * 32) |
135 |
+#define MAX_ARG_STRLEN (sysconf(_SC_PAGESIZE) * 32) |
136 |
#define MAX_ARG_STRINGS 0x7FFFFFFF |
137 |
|
138 |
/* sizeof(linux_binprm->buf) */ |
139 |
diff --git a/include/uapi/linux/resource.h b/include/uapi/linux/resource.h |
140 |
index 36fb3b5..58efd07 100644 |
141 |
--- a/include/uapi/linux/resource.h |
142 |
+++ b/include/uapi/linux/resource.h |
143 |
@@ -68,7 +68,8 @@ struct rlimit64 { |
144 |
* GPG2 wants 64kB of mlocked memory, to make sure pass phrases |
145 |
* and other sensitive information are never written to disk. |
146 |
*/ |
147 |
-#define MLOCK_LIMIT ((PAGE_SIZE > 64*1024) ? PAGE_SIZE : 64*1024) |
148 |
+/* No one currently defines PAGE_SIZE bigger than 64kB */ |
149 |
+#define MLOCK_LIMIT (64 * 1024) |
150 |
|
151 |
/* |
152 |
* Due to binary compatibility, the actual resource numbers |
153 |
-- |
154 |
2.5.2 |
155 |
|
156 |
|
157 |
|
158 |
|
159 |
1.1 src/patchsets/gentoo-headers/4.3/00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch |
160 |
|
161 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.3/00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch?rev=1.1&view=markup |
162 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.3/00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch?rev=1.1&content-type=text/plain |
163 |
|
164 |
Index: 00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch |
165 |
=================================================================== |
166 |
From 71207ba04f0fc22ece1b70ee57d4a4fd71bd065e Mon Sep 17 00:00:00 2001 |
167 |
From: Mike Frysinger <vapier@g.o> |
168 |
Date: Mon, 29 Dec 2008 07:39:14 -0500 |
169 |
Subject: [PATCH] asm-generic/fcntl.h: namespace kernel file structs |
170 |
|
171 |
No one should be using these structs, but just in case they are, |
172 |
keep them available in the __kernel_ namespace. |
173 |
|
174 |
Otherwise, trying to include something like: |
175 |
#include <fcntl.h> |
176 |
#include <linux/inotify.h> |
177 |
leads to horrible failure. |
178 |
|
179 |
URL: http://bugs.gentoo.org/244470 |
180 |
URL: http://bugs.gentoo.org/388633 |
181 |
Signed-off-by: Mike Frysinger <vapier@g.o> |
182 |
--- |
183 |
include/uapi/asm-generic/fcntl.h | 6 +++--- |
184 |
1 file changed, 3 insertions(+), 3 deletions(-) |
185 |
|
186 |
diff --git a/include/uapi/asm-generic/fcntl.h b/include/uapi/asm-generic/fcntl.h |
187 |
index e063eff..a98769e 100644 |
188 |
--- a/include/uapi/asm-generic/fcntl.h |
189 |
+++ b/include/uapi/asm-generic/fcntl.h |
190 |
@@ -152,7 +152,7 @@ |
191 |
#define F_OWNER_PID 1 |
192 |
#define F_OWNER_PGRP 2 |
193 |
|
194 |
-struct f_owner_ex { |
195 |
+struct __kernel_f_owner_ex { |
196 |
int type; |
197 |
__kernel_pid_t pid; |
198 |
}; |
199 |
@@ -192,7 +192,7 @@ struct f_owner_ex { |
200 |
#define __ARCH_FLOCK_PAD |
201 |
#endif |
202 |
|
203 |
-struct flock { |
204 |
+struct __kernel_flock { |
205 |
short l_type; |
206 |
short l_whence; |
207 |
__kernel_off_t l_start; |
208 |
@@ -207,7 +207,7 @@ struct flock { |
209 |
#define __ARCH_FLOCK64_PAD |
210 |
#endif |
211 |
|
212 |
-struct flock64 { |
213 |
+struct __kernel_flock64 { |
214 |
short l_type; |
215 |
short l_whence; |
216 |
__kernel_loff_t l_start; |
217 |
-- |
218 |
2.5.2 |
219 |
|
220 |
|
221 |
|
222 |
|
223 |
1.1 src/patchsets/gentoo-headers/4.3/00_all_0005-unifdef-drop-unused-errno.h-include.patch |
224 |
|
225 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.3/00_all_0005-unifdef-drop-unused-errno.h-include.patch?rev=1.1&view=markup |
226 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.3/00_all_0005-unifdef-drop-unused-errno.h-include.patch?rev=1.1&content-type=text/plain |
227 |
|
228 |
Index: 00_all_0005-unifdef-drop-unused-errno.h-include.patch |
229 |
=================================================================== |
230 |
From fcc985e629b23c034d182d548f554522984a5328 Mon Sep 17 00:00:00 2001 |
231 |
From: Mike Frysinger <vapier@g.o> |
232 |
Date: Tue, 6 Dec 2011 17:22:42 -0500 |
233 |
Subject: [PATCH] unifdef: drop unused errno.h include |
234 |
|
235 |
This is the only header on my system that ends up requiring kernel |
236 |
headers, so if the kernel headers aren't available, we end up being |
237 |
unable to install kernel headers :). |
238 |
|
239 |
Since this file doesn't actually use anything from errno.h, drop |
240 |
the include so it at least makes us a bit more robust on glibc. |
241 |
|
242 |
Signed-off-by: Mike Frysinger <vapier@g.o> |
243 |
--- |
244 |
scripts/unifdef.c | 1 - |
245 |
1 file changed, 1 deletion(-) |
246 |
|
247 |
diff --git a/scripts/unifdef.c b/scripts/unifdef.c |
248 |
index 7493c0e..c5dfae5 100644 |
249 |
--- a/scripts/unifdef.c |
250 |
+++ b/scripts/unifdef.c |
251 |
@@ -48,7 +48,6 @@ |
252 |
|
253 |
#include <ctype.h> |
254 |
#include <err.h> |
255 |
-#include <errno.h> |
256 |
#include <stdarg.h> |
257 |
#include <stdbool.h> |
258 |
#include <stdio.h> |
259 |
-- |
260 |
2.5.2 |
261 |
|
262 |
|
263 |
|
264 |
|
265 |
1.1 src/patchsets/gentoo-headers/4.3/00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch |
266 |
|
267 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.3/00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch?rev=1.1&view=markup |
268 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.3/00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch?rev=1.1&content-type=text/plain |
269 |
|
270 |
Index: 00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch |
271 |
=================================================================== |
272 |
From 48837d5aa61532f18c8ca96fc7cb92f775f04a57 Mon Sep 17 00:00:00 2001 |
273 |
From: Mike Frysinger <vapier@g.o> |
274 |
Date: Sat, 15 Nov 2014 03:37:38 -0500 |
275 |
Subject: [PATCH] x86: do not build relocs tool when installing headers |
276 |
|
277 |
This isn't needed to install headers, so don't bother building it. |
278 |
Otherwise we run into a chicken/egg issue where we need the kernel |
279 |
headers in order to install the kernel headers. It's also a waste |
280 |
of time. |
281 |
|
282 |
Signed-off-by: Mike Frysinger <vapier@g.o> |
283 |
--- |
284 |
arch/x86/Makefile | 2 ++ |
285 |
1 file changed, 2 insertions(+) |
286 |
|
287 |
diff --git a/arch/x86/Makefile b/arch/x86/Makefile |
288 |
index 747860c..8bafc7b 100644 |
289 |
--- a/arch/x86/Makefile |
290 |
+++ b/arch/x86/Makefile |
291 |
@@ -181,8 +181,10 @@ KBUILD_CFLAGS += -fno-asynchronous-unwind-tables |
292 |
KBUILD_CFLAGS += $(mflags-y) |
293 |
KBUILD_AFLAGS += $(mflags-y) |
294 |
|
295 |
+ifneq ($(filter-out headers_install,$(MAKECMDGOALS)),) |
296 |
archscripts: scripts_basic |
297 |
$(Q)$(MAKE) $(build)=arch/x86/tools relocs |
298 |
+endif |
299 |
|
300 |
### |
301 |
# Syscall table generation |
302 |
-- |
303 |
2.5.2 |
304 |
|
305 |
|
306 |
|
307 |
|
308 |
1.1 src/patchsets/gentoo-headers/4.3/00_all_0007-timerfd-export-defines-to-userspace.patch |
309 |
|
310 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.3/00_all_0007-timerfd-export-defines-to-userspace.patch?rev=1.1&view=markup |
311 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.3/00_all_0007-timerfd-export-defines-to-userspace.patch?rev=1.1&content-type=text/plain |
312 |
|
313 |
Index: 00_all_0007-timerfd-export-defines-to-userspace.patch |
314 |
=================================================================== |
315 |
From dc6ecf6ce9278e6d7842cdb22819c4d01cc4e60e Mon Sep 17 00:00:00 2001 |
316 |
From: Mike Frysinger <vapier@g.o> |
317 |
Date: Tue, 30 Dec 2014 19:14:51 -0500 |
318 |
Subject: [PATCH] timerfd: export defines to userspace |
319 |
|
320 |
Since userspace is expected to call timerfd syscalls directly with these |
321 |
flags/ioctls, make sure we export them so they don't have to duplicate |
322 |
the values themselves. |
323 |
|
324 |
Signed-off-by: Mike Frysinger <vapier@g.o> |
325 |
--- |
326 |
include/linux/timerfd.h | 20 +------------------- |
327 |
include/uapi/linux/Kbuild | 1 + |
328 |
include/uapi/linux/timerfd.h | 36 ++++++++++++++++++++++++++++++++++++ |
329 |
3 files changed, 38 insertions(+), 19 deletions(-) |
330 |
create mode 100644 include/uapi/linux/timerfd.h |
331 |
|
332 |
--- a/include/uapi/linux/Kbuild |
333 |
+++ b/include/uapi/linux/Kbuild |
334 |
@@ -396,6 +396,7 @@ header-y += telephony.h |
335 |
header-y += termios.h |
336 |
header-y += thermal.h |
337 |
header-y += time.h |
338 |
+header-y += timerfd.h |
339 |
header-y += times.h |
340 |
header-y += timex.h |
341 |
header-y += tiocl.h |
342 |
diff --git a/include/uapi/linux/timerfd.h b/include/uapi/linux/timerfd.h |
343 |
new file mode 100644 |
344 |
index 0000000..6fcfaa8 |
345 |
--- /dev/null |
346 |
+++ b/include/uapi/linux/timerfd.h |
347 |
@@ -0,0 +1,36 @@ |
348 |
+/* |
349 |
+ * include/linux/timerfd.h |
350 |
+ * |
351 |
+ * Copyright (C) 2007 Davide Libenzi <davidel@×××××××××××.org> |
352 |
+ * |
353 |
+ */ |
354 |
+ |
355 |
+#ifndef _UAPI_LINUX_TIMERFD_H |
356 |
+#define _UAPI_LINUX_TIMERFD_H |
357 |
+ |
358 |
+#include <linux/types.h> |
359 |
+ |
360 |
+/* For O_CLOEXEC and O_NONBLOCK */ |
361 |
+#include <linux/fcntl.h> |
362 |
+ |
363 |
+/* For _IO helpers */ |
364 |
+#include <linux/ioctl.h> |
365 |
+ |
366 |
+/* |
367 |
+ * CAREFUL: Check include/asm-generic/fcntl.h when defining |
368 |
+ * new flags, since they might collide with O_* ones. We want |
369 |
+ * to re-use O_* flags that couldn't possibly have a meaning |
370 |
+ * from eventfd, in order to leave a free define-space for |
371 |
+ * shared O_* flags. |
372 |
+ * |
373 |
+ * Also make sure to update the masks in include/linux/timerfd.h |
374 |
+ * when adding new flags. |
375 |
+ */ |
376 |
+#define TFD_TIMER_ABSTIME (1 << 0) |
377 |
+#define TFD_TIMER_CANCEL_ON_SET (1 << 1) |
378 |
+#define TFD_CLOEXEC O_CLOEXEC |
379 |
+#define TFD_NONBLOCK O_NONBLOCK |
380 |
+ |
381 |
+#define TFD_IOC_SET_TICKS _IOW('T', 0, __u64) |
382 |
+ |
383 |
+#endif /* _UAPI_LINUX_TIMERFD_H */ |
384 |
-- |
385 |
2.5.2 |
386 |
|
387 |
|
388 |
|
389 |
|
390 |
1.1 src/patchsets/gentoo-headers/4.3/00_all_0008-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch |
391 |
|
392 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.3/00_all_0008-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch?rev=1.1&view=markup |
393 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.3/00_all_0008-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch?rev=1.1&content-type=text/plain |
394 |
|
395 |
Index: 00_all_0008-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch |
396 |
=================================================================== |
397 |
From 5ef42dfac91acf53c4e1fe530aba649cf3ed72cd Mon Sep 17 00:00:00 2001 |
398 |
From: Mike Frysinger <vapier@g.o> |
399 |
Date: Thu, 5 Mar 2015 00:26:58 -0500 |
400 |
Subject: [PATCH] netlink: drop (int) cast on length arg in NLMSG_OK |
401 |
|
402 |
The NLMSG_OK macro compares three things: |
403 |
- the len arg from the user |
404 |
- a size_t: sizeof(struct nlmsghdr) |
405 |
- an int: sizeof(struct nlmsghdr) casted |
406 |
- an u32: the nlmsghdr->nlmsg_len member |
407 |
|
408 |
When building with -Wsign-compare, this macro triggers a signed compare |
409 |
warning. This is because it compares len to an int, and then compares |
410 |
it to a u32. If len is signed, we get a warning due to the last test. |
411 |
If len is unsigned, we get a warning due to the first test. Like in |
412 |
strace: |
413 |
socketutils.c:145:8: warning: comparison between signed and unsigned |
414 |
integer expressions [-Wsign-compare] |
415 |
|
416 |
Lets drop the int cast on the first sizeof. This way, once the user |
417 |
casts len to an unsigned value, everything shakes out correctly. |
418 |
|
419 |
Signed-off-by: Mike Frysinger <vapier@g.o> |
420 |
--- |
421 |
include/uapi/linux/netlink.h | 2 +- |
422 |
1 file changed, 1 insertion(+), 1 deletion(-) |
423 |
|
424 |
diff --git a/include/uapi/linux/netlink.h b/include/uapi/linux/netlink.h |
425 |
index 6f3fe16..e7dc992 100644 |
426 |
--- a/include/uapi/linux/netlink.h |
427 |
+++ b/include/uapi/linux/netlink.h |
428 |
@@ -84,7 +84,7 @@ struct nlmsghdr { |
429 |
#define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0))) |
430 |
#define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \ |
431 |
(struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) |
432 |
-#define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && \ |
433 |
+#define NLMSG_OK(nlh,len) ((len) >= sizeof(struct nlmsghdr) && \ |
434 |
(nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \ |
435 |
(nlh)->nlmsg_len <= (len)) |
436 |
#define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len))) |
437 |
-- |
438 |
2.5.2 |
439 |
|
440 |
|
441 |
|
442 |
|
443 |
1.1 src/patchsets/gentoo-headers/4.3/00_all_0009-Revert-MIPS-Provide-correct-siginfo_t.si_stime.patch |
444 |
|
445 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.3/00_all_0009-Revert-MIPS-Provide-correct-siginfo_t.si_stime.patch?rev=1.1&view=markup |
446 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.3/00_all_0009-Revert-MIPS-Provide-correct-siginfo_t.si_stime.patch?rev=1.1&content-type=text/plain |
447 |
|
448 |
Index: 00_all_0009-Revert-MIPS-Provide-correct-siginfo_t.si_stime.patch |
449 |
=================================================================== |
450 |
From e8249c2fb18b6282a1c5d6c6b0169d36e371ff5b Mon Sep 17 00:00:00 2001 |
451 |
From: Mike Frysinger <vapier@××××××××.org> |
452 |
Date: Tue, 21 Apr 2015 14:28:20 -0400 |
453 |
Subject: [PATCH] Revert "MIPS: Provide correct siginfo_t.si_stime" |
454 |
|
455 |
This reverts commit 8cb48fe169dd682b6c29a3b7ef18333e4f577890. |
456 |
|
457 |
UAPI headers cannot use "uapi/" in their paths by design -- when they're |
458 |
installed, they do not have the uapi/ prefix. Otherwise doing so breaks |
459 |
userland badly: |
460 |
$ printf '#include <stddef.h>\n#include <linux/signal.h>\n' > test.c |
461 |
$ mips64-unknown-linux-gnu-gcc -c test.c |
462 |
In file included from /usr/mips64-unknown-linux-gnu/usr/include/linux/signal.h:5:0, |
463 |
from test.c:2: |
464 |
/usr/mips64-unknown-linux-gnu/usr/include/asm/siginfo.h:31:38: fatal error: uapi/asm-generic/siginfo.h: No such file or directory |
465 |
compilation terminated. |
466 |
|
467 |
Signed-off-by: Mike Frysinger <vapier@××××××××.org> |
468 |
--- |
469 |
arch/mips/include/asm/siginfo.h | 29 +++++++++++++++++++++++++++++ |
470 |
arch/mips/include/uapi/asm/siginfo.h | 11 ++++++++--- |
471 |
2 files changed, 37 insertions(+), 3 deletions(-) |
472 |
create mode 100644 arch/mips/include/asm/siginfo.h |
473 |
|
474 |
diff --git a/arch/mips/include/asm/siginfo.h b/arch/mips/include/asm/siginfo.h |
475 |
new file mode 100644 |
476 |
index 0000000..dd9a762 |
477 |
--- /dev/null |
478 |
+++ b/arch/mips/include/asm/siginfo.h |
479 |
@@ -0,0 +1,29 @@ |
480 |
+/* |
481 |
+ * This file is subject to the terms and conditions of the GNU General Public |
482 |
+ * License. See the file "COPYING" in the main directory of this archive |
483 |
+ * for more details. |
484 |
+ * |
485 |
+ * Copyright (C) 1998, 1999, 2001, 2003 Ralf Baechle |
486 |
+ * Copyright (C) 2000, 2001 Silicon Graphics, Inc. |
487 |
+ */ |
488 |
+#ifndef _ASM_SIGINFO_H |
489 |
+#define _ASM_SIGINFO_H |
490 |
+ |
491 |
+#include <uapi/asm/siginfo.h> |
492 |
+ |
493 |
+ |
494 |
+/* |
495 |
+ * Duplicated here because of <asm-generic/siginfo.h> braindamage ... |
496 |
+ */ |
497 |
+#include <linux/string.h> |
498 |
+ |
499 |
+static inline void copy_siginfo(struct siginfo *to, struct siginfo *from) |
500 |
+{ |
501 |
+ if (from->si_code < 0) |
502 |
+ memcpy(to, from, sizeof(*to)); |
503 |
+ else |
504 |
+ /* _sigchld is currently the largest know union member */ |
505 |
+ memcpy(to, from, 3*sizeof(int) + sizeof(from->_sifields._sigchld)); |
506 |
+} |
507 |
+ |
508 |
+#endif /* _ASM_SIGINFO_H */ |
509 |
diff --git a/arch/mips/include/uapi/asm/siginfo.h b/arch/mips/include/uapi/asm/siginfo.h |
510 |
index 2cb7fde..d08f83f 100644 |
511 |
--- a/arch/mips/include/uapi/asm/siginfo.h |
512 |
+++ b/arch/mips/include/uapi/asm/siginfo.h |
513 |
@@ -16,6 +16,13 @@ |
514 |
#define HAVE_ARCH_SIGINFO_T |
515 |
|
516 |
/* |
517 |
+ * We duplicate the generic versions - <asm-generic/siginfo.h> is just borked |
518 |
+ * by design ... |
519 |
+ */ |
520 |
+#define HAVE_ARCH_COPY_SIGINFO |
521 |
+struct siginfo; |
522 |
+ |
523 |
+/* |
524 |
* Careful to keep union _sifields from shifting ... |
525 |
*/ |
526 |
#if _MIPS_SZLONG == 32 |
527 |
@@ -28,9 +35,8 @@ |
528 |
|
529 |
#define __ARCH_SIGSYS |
530 |
|
531 |
-#include <uapi/asm-generic/siginfo.h> |
532 |
+#include <asm-generic/siginfo.h> |
533 |
|
534 |
-/* We can't use generic siginfo_t, because our si_code and si_errno are swapped */ |
535 |
typedef struct siginfo { |
536 |
int si_signo; |
537 |
int si_code; |
538 |
@@ -118,6 +124,5 @@ typedef struct siginfo { |
539 |
#define SI_TIMER __SI_CODE(__SI_TIMER, -3) /* sent by timer expiration */ |
540 |
#define SI_MESGQ __SI_CODE(__SI_MESGQ, -4) /* sent by real time mesq state change */ |
541 |
|
542 |
-#include <asm-generic/siginfo.h> |
543 |
|
544 |
#endif /* _UAPI_ASM_SIGINFO_H */ |
545 |
-- |
546 |
2.5.2 |
547 |
|
548 |
|
549 |
|
550 |
|
551 |
1.1 src/patchsets/gentoo-headers/4.3/00_all_0010-uapi-mqueue.h-add-missing-linux-types.h-include.patch |
552 |
|
553 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.3/00_all_0010-uapi-mqueue.h-add-missing-linux-types.h-include.patch?rev=1.1&view=markup |
554 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.3/00_all_0010-uapi-mqueue.h-add-missing-linux-types.h-include.patch?rev=1.1&content-type=text/plain |
555 |
|
556 |
Index: 00_all_0010-uapi-mqueue.h-add-missing-linux-types.h-include.patch |
557 |
=================================================================== |
558 |
From e67fbb1fe7c943144deb4e13c6a810224f131d77 Mon Sep 17 00:00:00 2001 |
559 |
From: Mike Frysinger <vapier@××××××××.org> |
560 |
Date: Wed, 28 Oct 2015 18:41:33 -0400 |
561 |
Subject: [PATCH] uapi: mqueue.h: add missing linux/types.h include |
562 |
|
563 |
Commit 63159f5dcccb3858d88aaef800c4ee0eb4cc8577 changed the types from |
564 |
long to __kernel_long_t, but didn't add a linux/types.h include. Code |
565 |
that tries to include this header directly breaks: |
566 |
|
567 |
/usr/include/linux/mqueue.h:26:2: error: unknown type name '__kernel_long_t' |
568 |
__kernel_long_t mq_flags; /* message queue flags */ |
569 |
|
570 |
This also upsets configure tests for this header: |
571 |
checking linux/mqueue.h usability... no |
572 |
checking linux/mqueue.h presence... yes |
573 |
configure: WARNING: linux/mqueue.h: present but cannot be compiled |
574 |
configure: WARNING: linux/mqueue.h: check for missing prerequisite headers? |
575 |
configure: WARNING: linux/mqueue.h: see the Autoconf documentation |
576 |
configure: WARNING: linux/mqueue.h: section "Present But Cannot Be Compiled" |
577 |
configure: WARNING: linux/mqueue.h: proceeding with the compiler's result |
578 |
checking for linux/mqueue.h... no |
579 |
|
580 |
Signed-off-by: Mike Frysinger <vapier@g.o> |
581 |
--- |
582 |
include/uapi/linux/mqueue.h | 2 ++ |
583 |
1 file changed, 2 insertions(+) |
584 |
|
585 |
diff --git a/include/uapi/linux/mqueue.h b/include/uapi/linux/mqueue.h |
586 |
index d0a2b8e..bbd5116 100644 |
587 |
--- a/include/uapi/linux/mqueue.h |
588 |
+++ b/include/uapi/linux/mqueue.h |
589 |
@@ -18,6 +18,8 @@ |
590 |
#ifndef _LINUX_MQUEUE_H |
591 |
#define _LINUX_MQUEUE_H |
592 |
|
593 |
+#include <linux/types.h> |
594 |
+ |
595 |
#define MQ_PRIO_MAX 32768 |
596 |
/* per-uid limit of kernel memory used by mqueue, in bytes */ |
597 |
#define MQ_BYTES_MAX 819200 |
598 |
-- |
599 |
2.5.2 |
600 |
|
601 |
|
602 |
|
603 |
|
604 |
1.1 src/patchsets/gentoo-headers/4.3/00_all_0011-uapi-fix-System-V-buf-header-includes.patch |
605 |
|
606 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.3/00_all_0011-uapi-fix-System-V-buf-header-includes.patch?rev=1.1&view=markup |
607 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.3/00_all_0011-uapi-fix-System-V-buf-header-includes.patch?rev=1.1&content-type=text/plain |
608 |
|
609 |
Index: 00_all_0011-uapi-fix-System-V-buf-header-includes.patch |
610 |
=================================================================== |
611 |
From 1b409f9965d53f5d8a80776adcf448adf636ba00 Mon Sep 17 00:00:00 2001 |
612 |
From: Mike Frysinger <vapier@g.o> |
613 |
Date: Mon, 2 Nov 2015 13:30:12 -0500 |
614 |
Subject: [PATCH] uapi: fix System V buf header includes |
615 |
|
616 |
These headers rely on kernel types but don't include the other headers |
617 |
that define them. So when you try to include them directly, you often |
618 |
hit build failures due to unknown types. |
619 |
|
620 |
Signed-off-by: Mike Frysinger <vapier@g.o> |
621 |
--- |
622 |
include/uapi/asm-generic/ipcbuf.h | 2 ++ |
623 |
include/uapi/asm-generic/msgbuf.h | 3 +++ |
624 |
include/uapi/asm-generic/sembuf.h | 2 ++ |
625 |
include/uapi/asm-generic/shmbuf.h | 2 ++ |
626 |
4 files changed, 9 insertions(+) |
627 |
|
628 |
diff --git a/include/uapi/asm-generic/ipcbuf.h b/include/uapi/asm-generic/ipcbuf.h |
629 |
index 3dbcc1e..c37b32a 100644 |
630 |
--- a/include/uapi/asm-generic/ipcbuf.h |
631 |
+++ b/include/uapi/asm-generic/ipcbuf.h |
632 |
@@ -1,6 +1,8 @@ |
633 |
#ifndef __ASM_GENERIC_IPCBUF_H |
634 |
#define __ASM_GENERIC_IPCBUF_H |
635 |
|
636 |
+#include <linux/types.h> |
637 |
+ |
638 |
/* |
639 |
* The generic ipc64_perm structure: |
640 |
* Note extra padding because this structure is passed back and forth |
641 |
diff --git a/include/uapi/asm-generic/msgbuf.h b/include/uapi/asm-generic/msgbuf.h |
642 |
index f55ecc4..473dcdc 100644 |
643 |
--- a/include/uapi/asm-generic/msgbuf.h |
644 |
+++ b/include/uapi/asm-generic/msgbuf.h |
645 |
@@ -1,7 +1,10 @@ |
646 |
#ifndef __ASM_GENERIC_MSGBUF_H |
647 |
#define __ASM_GENERIC_MSGBUF_H |
648 |
|
649 |
+#include <linux/types.h> |
650 |
#include <asm/bitsperlong.h> |
651 |
+#include <asm/ipcbuf.h> |
652 |
+ |
653 |
/* |
654 |
* generic msqid64_ds structure. |
655 |
* |
656 |
diff --git a/include/uapi/asm-generic/sembuf.h b/include/uapi/asm-generic/sembuf.h |
657 |
index 4cb2c13..f57240f 100644 |
658 |
--- a/include/uapi/asm-generic/sembuf.h |
659 |
+++ b/include/uapi/asm-generic/sembuf.h |
660 |
@@ -1,7 +1,9 @@ |
661 |
#ifndef __ASM_GENERIC_SEMBUF_H |
662 |
#define __ASM_GENERIC_SEMBUF_H |
663 |
|
664 |
+#include <linux/types.h> |
665 |
#include <asm/bitsperlong.h> |
666 |
+#include <asm/ipcbuf.h> |
667 |
|
668 |
/* |
669 |
* The semid64_ds structure for x86 architecture. |
670 |
diff --git a/include/uapi/asm-generic/shmbuf.h b/include/uapi/asm-generic/shmbuf.h |
671 |
index 7e9fb2f..f9e28e4 100644 |
672 |
--- a/include/uapi/asm-generic/shmbuf.h |
673 |
+++ b/include/uapi/asm-generic/shmbuf.h |
674 |
@@ -1,7 +1,9 @@ |
675 |
#ifndef __ASM_GENERIC_SHMBUF_H |
676 |
#define __ASM_GENERIC_SHMBUF_H |
677 |
|
678 |
+#include <linux/types.h> |
679 |
#include <asm/bitsperlong.h> |
680 |
+#include <asm/ipcbuf.h> |
681 |
|
682 |
/* |
683 |
* The shmid64_ds structure for x86 architecture. |
684 |
-- |
685 |
2.5.2 |