Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo commit in src/patchsets/gentoo-headers/4.15: 00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch 00_all_0002-netfilter-pull-in-limits.h.patch 00_all_0003-convert-PAGE_SIZE-usage.patch 00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch 00_all_0005-unifdef-drop-unused-errno.h-include.patch 00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch 00_all_0007-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch 00_all_0008-uapi-fix-System-V-buf-header-includes.patch
Date: Tue, 30 Jan 2018 06:37:48
Message-Id: 20180130063743.96EEA1D2@oystercatcher.gentoo.org
1 vapier 18/01/30 06:37:43
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-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch
11 00_all_0008-uapi-fix-System-V-buf-header-includes.patch
12 Log:
13 initial 4.15 patchset based on last 4.14 patchset
14
15 Revision Changes Path
16 1.1 src/patchsets/gentoo-headers/4.15/00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch
17
18 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.15/00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch?rev=1.1&view=markup
19 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.15/00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch?rev=1.1&content-type=text/plain
20
21 Index: 00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch
22 ===================================================================
23 From eaef093137c922417fbfb5cea2589dd2953bb751 Mon Sep 17 00:00:00 2001
24 From: Mike Frysinger <vapier@g.o>
25 Date: Mon, 29 Dec 2008 06:52:59 -0500
26 Subject: [PATCH] linux/stat.h: remove __GLIBC__ checks
27
28 Only check __KERNEL__ so we don't assume the C library is glibc.
29
30 Signed-off-by: Mike Frysinger <vapier@g.o>
31 ---
32 include/uapi/linux/stat.h | 2 +-
33 1 file changed, 1 insertion(+), 1 deletion(-)
34
35 diff --git a/include/uapi/linux/stat.h b/include/uapi/linux/stat.h
36 index 7b35e98d3c58..eb7474652d27 100644
37 --- a/include/uapi/linux/stat.h
38 +++ b/include/uapi/linux/stat.h
39 @@ -4,7 +4,7 @@
40
41 #include <linux/types.h>
42
43 -#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
44 +#if defined(__KERNEL__)
45
46 #define S_IFMT 00170000
47 #define S_IFSOCK 0140000
48 --
49 2.16.1
50
51
52
53
54 1.1 src/patchsets/gentoo-headers/4.15/00_all_0002-netfilter-pull-in-limits.h.patch
55
56 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.15/00_all_0002-netfilter-pull-in-limits.h.patch?rev=1.1&view=markup
57 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.15/00_all_0002-netfilter-pull-in-limits.h.patch?rev=1.1&content-type=text/plain
58
59 Index: 00_all_0002-netfilter-pull-in-limits.h.patch
60 ===================================================================
61 From 7789b768b7aa1f69626c894f2b6d729622a75bbd Mon Sep 17 00:00:00 2001
62 From: Mike Frysinger <vapier@g.o>
63 Date: Sat, 9 May 2009 17:30:35 -0400
64 Subject: [PATCH] netfilter: pull in limits.h
65
66 A few netfilter sub-headers use INT_MAX which is in limits.h.
67
68 URL: http://bugs.gentoo.org/246160
69 Signed-off-by: Mike Frysinger <vapier@g.o>
70 ---
71 include/uapi/linux/netfilter.h | 1 +
72 1 file changed, 1 insertion(+)
73
74 diff --git a/include/uapi/linux/netfilter.h b/include/uapi/linux/netfilter.h
75 index cca10e767cd8..de6d76399cd7 100644
76 --- a/include/uapi/linux/netfilter.h
77 +++ b/include/uapi/linux/netfilter.h
78 @@ -6,6 +6,7 @@
79 #include <linux/compiler.h>
80 #include <linux/in.h>
81 #include <linux/in6.h>
82 +#include <limits.h>
83
84 /* Responses from hook functions. */
85 #define NF_DROP 0
86 --
87 2.16.1
88
89
90
91
92 1.1 src/patchsets/gentoo-headers/4.15/00_all_0003-convert-PAGE_SIZE-usage.patch
93
94 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.15/00_all_0003-convert-PAGE_SIZE-usage.patch?rev=1.1&view=markup
95 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.15/00_all_0003-convert-PAGE_SIZE-usage.patch?rev=1.1&content-type=text/plain
96
97 Index: 00_all_0003-convert-PAGE_SIZE-usage.patch
98 ===================================================================
99 From e685bbb40026037d5bbd223f22305497d7363eb5 Mon Sep 17 00:00:00 2001
100 From: Mike Frysinger <vapier@g.o>
101 Date: Sat, 13 Feb 2010 03:09:23 -0500
102 Subject: [PATCH] convert PAGE_SIZE usage
103
104 The size of a page may change at runtime or based on kernel settings, so
105 a static value at compile time doesn't work. More importantly, no one
106 exports PAGE_SIZE to user space anymore.
107
108 URL: http://bugs.gentoo.org/301431
109 Signed-off-by: Mike Frysinger <vapier@g.o>
110 ---
111 include/uapi/linux/binfmts.h | 3 ++-
112 include/uapi/linux/resource.h | 3 ++-
113 2 files changed, 4 insertions(+), 2 deletions(-)
114
115 diff --git a/include/uapi/linux/binfmts.h b/include/uapi/linux/binfmts.h
116 index 4abad03a8853..3e98cfc84d1c 100644
117 --- a/include/uapi/linux/binfmts.h
118 +++ b/include/uapi/linux/binfmts.h
119 @@ -2,6 +2,7 @@
120 #ifndef _UAPI_LINUX_BINFMTS_H
121 #define _UAPI_LINUX_BINFMTS_H
122
123 +#include <unistd.h>
124 #include <linux/capability.h>
125
126 struct pt_regs;
127 @@ -12,7 +13,7 @@ struct pt_regs;
128 * prevent the kernel from being unduly impacted by misaddressed pointers.
129 * MAX_ARG_STRINGS is chosen to fit in a signed 32-bit integer.
130 */
131 -#define MAX_ARG_STRLEN (PAGE_SIZE * 32)
132 +#define MAX_ARG_STRLEN (sysconf(_SC_PAGESIZE) * 32)
133 #define MAX_ARG_STRINGS 0x7FFFFFFF
134
135 /* sizeof(linux_binprm->buf) */
136 diff --git a/include/uapi/linux/resource.h b/include/uapi/linux/resource.h
137 index cc00fd079631..6f9e76f513b5 100644
138 --- a/include/uapi/linux/resource.h
139 +++ b/include/uapi/linux/resource.h
140 @@ -69,7 +69,8 @@ struct rlimit64 {
141 * GPG2 wants 64kB of mlocked memory, to make sure pass phrases
142 * and other sensitive information are never written to disk.
143 */
144 -#define MLOCK_LIMIT ((PAGE_SIZE > 64*1024) ? PAGE_SIZE : 64*1024)
145 +/* No one currently defines PAGE_SIZE bigger than 64kB */
146 +#define MLOCK_LIMIT (64 * 1024)
147
148 /*
149 * Due to binary compatibility, the actual resource numbers
150 --
151 2.16.1
152
153
154
155
156 1.1 src/patchsets/gentoo-headers/4.15/00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch
157
158 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.15/00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch?rev=1.1&view=markup
159 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.15/00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch?rev=1.1&content-type=text/plain
160
161 Index: 00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch
162 ===================================================================
163 From 687f82d8087c465e3f9f217dad8bbddde75e1294 Mon Sep 17 00:00:00 2001
164 From: Mike Frysinger <vapier@g.o>
165 Date: Mon, 29 Dec 2008 07:39:14 -0500
166 Subject: [PATCH] asm-generic/fcntl.h: namespace kernel file structs
167
168 No one should be using these structs, but just in case they are,
169 keep them available in the __kernel_ namespace.
170
171 Otherwise, trying to include something like:
172 #include <fcntl.h>
173 #include <linux/inotify.h>
174 leads to horrible failure.
175
176 URL: http://bugs.gentoo.org/244470
177 URL: http://bugs.gentoo.org/388633
178 Signed-off-by: Mike Frysinger <vapier@g.o>
179 ---
180 include/uapi/asm-generic/fcntl.h | 6 +++---
181 1 file changed, 3 insertions(+), 3 deletions(-)
182
183 diff --git a/include/uapi/asm-generic/fcntl.h b/include/uapi/asm-generic/fcntl.h
184 index 9dc0bf0c5a6e..dc9b2e467ad9 100644
185 --- a/include/uapi/asm-generic/fcntl.h
186 +++ b/include/uapi/asm-generic/fcntl.h
187 @@ -153,7 +153,7 @@
188 #define F_OWNER_PID 1
189 #define F_OWNER_PGRP 2
190
191 -struct f_owner_ex {
192 +struct __kernel_f_owner_ex {
193 int type;
194 __kernel_pid_t pid;
195 };
196 @@ -193,7 +193,7 @@ struct f_owner_ex {
197 #define __ARCH_FLOCK_PAD
198 #endif
199
200 -struct flock {
201 +struct __kernel_flock {
202 short l_type;
203 short l_whence;
204 __kernel_off_t l_start;
205 @@ -208,7 +208,7 @@ struct flock {
206 #define __ARCH_FLOCK64_PAD
207 #endif
208
209 -struct flock64 {
210 +struct __kernel_flock64 {
211 short l_type;
212 short l_whence;
213 __kernel_loff_t l_start;
214 --
215 2.16.1
216
217
218
219
220 1.1 src/patchsets/gentoo-headers/4.15/00_all_0005-unifdef-drop-unused-errno.h-include.patch
221
222 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.15/00_all_0005-unifdef-drop-unused-errno.h-include.patch?rev=1.1&view=markup
223 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.15/00_all_0005-unifdef-drop-unused-errno.h-include.patch?rev=1.1&content-type=text/plain
224
225 Index: 00_all_0005-unifdef-drop-unused-errno.h-include.patch
226 ===================================================================
227 From c944ef96a02d9e4435f3727c5c517e29f5acbcf1 Mon Sep 17 00:00:00 2001
228 From: Mike Frysinger <vapier@g.o>
229 Date: Tue, 6 Dec 2011 17:22:42 -0500
230 Subject: [PATCH] unifdef: drop unused errno.h include
231
232 This is the only header on my system that ends up requiring kernel
233 headers, so if the kernel headers aren't available, we end up being
234 unable to install kernel headers :).
235
236 Since this file doesn't actually use anything from errno.h, drop
237 the include so it at least makes us a bit more robust on glibc.
238
239 Signed-off-by: Mike Frysinger <vapier@g.o>
240 ---
241 scripts/unifdef.c | 1 -
242 1 file changed, 1 deletion(-)
243
244 diff --git a/scripts/unifdef.c b/scripts/unifdef.c
245 index 7493c0ee51cc..c5dfae538b08 100644
246 --- a/scripts/unifdef.c
247 +++ b/scripts/unifdef.c
248 @@ -48,7 +48,6 @@
249
250 #include <ctype.h>
251 #include <err.h>
252 -#include <errno.h>
253 #include <stdarg.h>
254 #include <stdbool.h>
255 #include <stdio.h>
256 --
257 2.16.1
258
259
260
261
262 1.1 src/patchsets/gentoo-headers/4.15/00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch
263
264 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.15/00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch?rev=1.1&view=markup
265 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.15/00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch?rev=1.1&content-type=text/plain
266
267 Index: 00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch
268 ===================================================================
269 From 1847182448312b5c0879821291d48870ed64ceef Mon Sep 17 00:00:00 2001
270 From: Mike Frysinger <vapier@g.o>
271 Date: Sat, 15 Nov 2014 03:37:38 -0500
272 Subject: [PATCH] x86: do not build relocs tool when installing headers
273
274 This isn't needed to install headers, so don't bother building it.
275 Otherwise we run into a chicken/egg issue where we need the kernel
276 headers in order to install the kernel headers. It's also a waste
277 of time.
278
279 Signed-off-by: Mike Frysinger <vapier@g.o>
280 ---
281 arch/x86/Makefile | 2 ++
282 1 file changed, 2 insertions(+)
283
284 diff --git a/arch/x86/Makefile b/arch/x86/Makefile
285 index fad55160dcb9..c561b5f1206c 100644
286 --- a/arch/x86/Makefile
287 +++ b/arch/x86/Makefile
288 @@ -238,8 +238,10 @@ ifdef CONFIG_RETPOLINE
289 endif
290 endif
291
292 +ifneq ($(filter-out headers_install,$(MAKECMDGOALS)),)
293 archscripts: scripts_basic
294 $(Q)$(MAKE) $(build)=arch/x86/tools relocs
295 +endif
296
297 ###
298 # Syscall table generation
299 --
300 2.16.1
301
302
303
304
305 1.1 src/patchsets/gentoo-headers/4.15/00_all_0007-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch
306
307 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.15/00_all_0007-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch?rev=1.1&view=markup
308 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.15/00_all_0007-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch?rev=1.1&content-type=text/plain
309
310 Index: 00_all_0007-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch
311 ===================================================================
312 From 97cf1649748dd0e52cfdf56795474ebcac82411d Mon Sep 17 00:00:00 2001
313 From: Mike Frysinger <vapier@g.o>
314 Date: Thu, 5 Mar 2015 00:26:58 -0500
315 Subject: [PATCH] netlink: drop (int) cast on length arg in NLMSG_OK
316
317 The NLMSG_OK macro compares three things:
318 - the len arg from the user
319 - a size_t: sizeof(struct nlmsghdr)
320 - an int: sizeof(struct nlmsghdr) casted
321 - an u32: the nlmsghdr->nlmsg_len member
322
323 When building with -Wsign-compare, this macro triggers a signed compare
324 warning. This is because it compares len to an int, and then compares
325 it to a u32. If len is signed, we get a warning due to the last test.
326 If len is unsigned, we get a warning due to the first test. Like in
327 strace:
328 socketutils.c:145:8: warning: comparison between signed and unsigned
329 integer expressions [-Wsign-compare]
330
331 Lets drop the int cast on the first sizeof. This way, once the user
332 casts len to an unsigned value, everything shakes out correctly.
333
334 Signed-off-by: Mike Frysinger <vapier@g.o>
335 ---
336 include/uapi/linux/netlink.h | 2 +-
337 1 file changed, 1 insertion(+), 1 deletion(-)
338
339 diff --git a/include/uapi/linux/netlink.h b/include/uapi/linux/netlink.h
340 index 776bc92e9118..d0c4df5fa670 100644
341 --- a/include/uapi/linux/netlink.h
342 +++ b/include/uapi/linux/netlink.h
343 @@ -94,7 +94,7 @@ struct nlmsghdr {
344 #define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0)))
345 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \
346 (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len)))
347 -#define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && \
348 +#define NLMSG_OK(nlh,len) ((len) >= sizeof(struct nlmsghdr) && \
349 (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \
350 (nlh)->nlmsg_len <= (len))
351 #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len)))
352 --
353 2.16.1
354
355
356
357
358 1.1 src/patchsets/gentoo-headers/4.15/00_all_0008-uapi-fix-System-V-buf-header-includes.patch
359
360 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.15/00_all_0008-uapi-fix-System-V-buf-header-includes.patch?rev=1.1&view=markup
361 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.15/00_all_0008-uapi-fix-System-V-buf-header-includes.patch?rev=1.1&content-type=text/plain
362
363 Index: 00_all_0008-uapi-fix-System-V-buf-header-includes.patch
364 ===================================================================
365 From 0bcecc945bf14c70f07d55b99a07f9ce16a0821f Mon Sep 17 00:00:00 2001
366 From: Mike Frysinger <vapier@g.o>
367 Date: Mon, 2 Nov 2015 13:30:12 -0500
368 Subject: [PATCH] uapi: fix System V buf header includes
369
370 These headers rely on kernel types but don't include the other headers
371 that define them. So when you try to include them directly, you often
372 hit build failures due to unknown types.
373
374 Signed-off-by: Mike Frysinger <vapier@g.o>
375 ---
376 include/uapi/asm-generic/ipcbuf.h | 2 ++
377 include/uapi/asm-generic/msgbuf.h | 3 +++
378 include/uapi/asm-generic/sembuf.h | 2 ++
379 include/uapi/asm-generic/shmbuf.h | 2 ++
380 4 files changed, 9 insertions(+)
381
382 diff --git a/include/uapi/asm-generic/ipcbuf.h b/include/uapi/asm-generic/ipcbuf.h
383 index 7d80dbd336fb..b4534bfd63e4 100644
384 --- a/include/uapi/asm-generic/ipcbuf.h
385 +++ b/include/uapi/asm-generic/ipcbuf.h
386 @@ -2,6 +2,8 @@
387 #ifndef __ASM_GENERIC_IPCBUF_H
388 #define __ASM_GENERIC_IPCBUF_H
389
390 +#include <linux/types.h>
391 +
392 /*
393 * The generic ipc64_perm structure:
394 * Note extra padding because this structure is passed back and forth
395 diff --git a/include/uapi/asm-generic/msgbuf.h b/include/uapi/asm-generic/msgbuf.h
396 index fb306ebdb36f..f28b8e6fe931 100644
397 --- a/include/uapi/asm-generic/msgbuf.h
398 +++ b/include/uapi/asm-generic/msgbuf.h
399 @@ -2,7 +2,10 @@
400 #ifndef __ASM_GENERIC_MSGBUF_H
401 #define __ASM_GENERIC_MSGBUF_H
402
403 +#include <linux/types.h>
404 #include <asm/bitsperlong.h>
405 +#include <asm/ipcbuf.h>
406 +
407 /*
408 * generic msqid64_ds structure.
409 *
410 diff --git a/include/uapi/asm-generic/sembuf.h b/include/uapi/asm-generic/sembuf.h
411 index cbf9cfe977d6..3058e1ec00b5 100644
412 --- a/include/uapi/asm-generic/sembuf.h
413 +++ b/include/uapi/asm-generic/sembuf.h
414 @@ -2,7 +2,9 @@
415 #ifndef __ASM_GENERIC_SEMBUF_H
416 #define __ASM_GENERIC_SEMBUF_H
417
418 +#include <linux/types.h>
419 #include <asm/bitsperlong.h>
420 +#include <asm/ipcbuf.h>
421
422 /*
423 * The semid64_ds structure for x86 architecture.
424 diff --git a/include/uapi/asm-generic/shmbuf.h b/include/uapi/asm-generic/shmbuf.h
425 index 2b6c3bb97f97..a0171147d796 100644
426 --- a/include/uapi/asm-generic/shmbuf.h
427 +++ b/include/uapi/asm-generic/shmbuf.h
428 @@ -2,7 +2,9 @@
429 #ifndef __ASM_GENERIC_SHMBUF_H
430 #define __ASM_GENERIC_SHMBUF_H
431
432 +#include <linux/types.h>
433 #include <asm/bitsperlong.h>
434 +#include <asm/ipcbuf.h>
435
436 /*
437 * The shmid64_ds structure for x86 architecture.
438 --
439 2.16.1