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/3.6: 00_all_0001-kbuild-auto-convert-size-types-in-userspace-headers.patch 00_all_0002-linux-stat.h-remove-__GLIBC__-checks.patch 00_all_0003-linux-stddef.h-export-offsetof-to-userspace.patch 00_all_0004-linux-pull-in-other-needed-headers-for-userspace.patch 00_all_0005-netfilter-pull-in-limits.h.patch 00_all_0006-convert-PAGE_SIZE-usage.patch 00_all_0007-asm-generic-fcntl.h-namespace-kernel-file-structs.patch 00_all_0008-unifdef-drop-unused-errno.h-include.patch
Date: Mon, 01 Oct 2012 05:56:13
Message-Id: 20121001055603.C53CA21600@flycatcher.gentoo.org
1 vapier 12/10/01 05:56:03
2
3 Added:
4 00_all_0001-kbuild-auto-convert-size-types-in-userspace-headers.patch
5 00_all_0002-linux-stat.h-remove-__GLIBC__-checks.patch
6 00_all_0003-linux-stddef.h-export-offsetof-to-userspace.patch
7 00_all_0004-linux-pull-in-other-needed-headers-for-userspace.patch
8 00_all_0005-netfilter-pull-in-limits.h.patch
9 00_all_0006-convert-PAGE_SIZE-usage.patch
10 00_all_0007-asm-generic-fcntl.h-namespace-kernel-file-structs.patch
11 00_all_0008-unifdef-drop-unused-errno.h-include.patch
12 Log:
13 inital 3.6 patchset based on last 3.5 patchset
14
15 Revision Changes Path
16 1.1 src/patchsets/gentoo-headers/3.6/00_all_0001-kbuild-auto-convert-size-types-in-userspace-headers.patch
17
18 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/3.6/00_all_0001-kbuild-auto-convert-size-types-in-userspace-headers.patch?rev=1.1&view=markup
19 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/3.6/00_all_0001-kbuild-auto-convert-size-types-in-userspace-headers.patch?rev=1.1&content-type=text/plain
20
21 Index: 00_all_0001-kbuild-auto-convert-size-types-in-userspace-headers.patch
22 ===================================================================
23 From f70dfad40f32ede761e5606a1fe8dbb47c66569d Mon Sep 17 00:00:00 2001
24 From: Mike Frysinger <vapier@g.o>
25 Date: Mon, 29 Dec 2008 06:07:47 -0500
26 Subject: [PATCH] kbuild: auto-convert size types in userspace headers
27
28 Rather than constantly fixing up size type breakage in userspace headers,
29 auto convert the types u_intXX_t, uintXX_t, intXX_t, uXX, and sXX to the
30 appropriate __uXX or __sXX type.
31
32 Signed-off-by: Mike Frysinger <vapier@g.o>
33 ---
34 scripts/headers_install.pl | 3 +++
35 1 file changed, 3 insertions(+)
36
37 diff --git a/scripts/headers_install.pl b/scripts/headers_install.pl
38 index 48462be..92101b9 100644
39 --- a/scripts/headers_install.pl
40 +++ b/scripts/headers_install.pl
41 @@ -40,6 +40,9 @@ foreach my $file (@files) {
42 $line =~ s/(^|\s)(inline)\b/$1__$2__/g;
43 $line =~ s/(^|\s)(asm)\b(\s|[(]|$)/$1__$2__$3/g;
44 $line =~ s/(^|\s|[(])(volatile)\b(\s|[(]|$)/$1__$2__$3/g;
45 + $line =~ s/\b([us](8|16|32|64))\b/__$1/g;
46 + $line =~ s/\b(u_?int(8|16|32|64)_t)\b/__u$2/g;
47 + $line =~ s/\b(int(8|16|32|64)_t)\b/__s$2/g;
48 printf {$out} "%s", $line;
49 }
50 close $out;
51 --
52 1.7.12
53
54
55
56
57 1.1 src/patchsets/gentoo-headers/3.6/00_all_0002-linux-stat.h-remove-__GLIBC__-checks.patch
58
59 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/3.6/00_all_0002-linux-stat.h-remove-__GLIBC__-checks.patch?rev=1.1&view=markup
60 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/3.6/00_all_0002-linux-stat.h-remove-__GLIBC__-checks.patch?rev=1.1&content-type=text/plain
61
62 Index: 00_all_0002-linux-stat.h-remove-__GLIBC__-checks.patch
63 ===================================================================
64 From 0502dd5833669ee7cf460f4be096a4718f39ea34 Mon Sep 17 00:00:00 2001
65 From: Mike Frysinger <vapier@g.o>
66 Date: Mon, 29 Dec 2008 06:52:59 -0500
67 Subject: [PATCH] linux/stat.h: remove __GLIBC__ checks
68
69 Only check __KERNEL__ so we don't assume the C library is glibc.
70
71 Signed-off-by: Mike Frysinger <vapier@g.o>
72 ---
73 include/linux/stat.h | 2 +-
74 1 file changed, 1 insertion(+), 1 deletion(-)
75
76 diff --git a/include/linux/stat.h b/include/linux/stat.h
77 index 4613240..e84f489 100644
78 --- a/include/linux/stat.h
79 +++ b/include/linux/stat.h
80 @@ -7,7 +7,7 @@
81
82 #endif
83
84 -#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
85 +#ifdef __KERNEL__
86
87 #define S_IFMT 00170000
88 #define S_IFSOCK 0140000
89 --
90 1.7.12
91
92
93
94
95 1.1 src/patchsets/gentoo-headers/3.6/00_all_0003-linux-stddef.h-export-offsetof-to-userspace.patch
96
97 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/3.6/00_all_0003-linux-stddef.h-export-offsetof-to-userspace.patch?rev=1.1&view=markup
98 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/3.6/00_all_0003-linux-stddef.h-export-offsetof-to-userspace.patch?rev=1.1&content-type=text/plain
99
100 Index: 00_all_0003-linux-stddef.h-export-offsetof-to-userspace.patch
101 ===================================================================
102 From fd7395db33844ddd6289e959f64779ccd253347c Mon Sep 17 00:00:00 2001
103 From: Mike Frysinger <vapier@g.o>
104 Date: Fri, 2 Jan 2009 02:34:03 -0500
105 Subject: [PATCH] linux/stddef.h: export offsetof() to userspace
106
107 Some userspace headers (like fuse.h) utilize the offsetof() macro. Some
108 userspace packages (like lkcd) expect linux/stddef.h to provide this as
109 well.
110
111 Signed-off-by: Mike Frysinger <vapier@g.o>
112 ---
113 include/linux/stddef.h | 7 +++++--
114 1 file changed, 5 insertions(+), 2 deletions(-)
115
116 diff --git a/include/linux/stddef.h b/include/linux/stddef.h
117 index 1747b67..f69354b 100644
118 --- a/include/linux/stddef.h
119 +++ b/include/linux/stddef.h
120 @@ -16,9 +16,12 @@ enum {
121 #undef offsetof
122 #ifdef __compiler_offsetof
123 #define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER)
124 -#else
125 -#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
126 #endif
127 #endif /* __KERNEL__ */
128
129 +#include <stddef.h> /* newer gcc includes this */
130 +#ifndef offsetof
131 +#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
132 +#endif
133 +
134 #endif
135 --
136 1.7.12
137
138
139
140
141 1.1 src/patchsets/gentoo-headers/3.6/00_all_0004-linux-pull-in-other-needed-headers-for-userspace.patch
142
143 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/3.6/00_all_0004-linux-pull-in-other-needed-headers-for-userspace.patch?rev=1.1&view=markup
144 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/3.6/00_all_0004-linux-pull-in-other-needed-headers-for-userspace.patch?rev=1.1&content-type=text/plain
145
146 Index: 00_all_0004-linux-pull-in-other-needed-headers-for-userspace.patch
147 ===================================================================
148 From 557be17e680b283b86c9cf7eb2e7a97aeb5e9ebd Mon Sep 17 00:00:00 2001
149 From: Mike Frysinger <vapier@g.o>
150 Date: Mon, 29 Dec 2008 07:41:01 -0500
151 Subject: [PATCH] linux/*: pull in other needed headers for userspace
152
153 mondo patch
154
155 Signed-off-by: Mike Frysinger <vapier@g.o>
156 ---
157 include/linux/cm4000_cs.h | 1 +
158 include/linux/dn.h | 1 +
159 include/linux/ppp-ioctl.h | 1 +
160 3 files changed, 3 insertions(+)
161
162 diff --git a/include/linux/cm4000_cs.h b/include/linux/cm4000_cs.h
163 index 3c4aac4..ac230b6 100644
164 --- a/include/linux/cm4000_cs.h
165 +++ b/include/linux/cm4000_cs.h
166 @@ -2,6 +2,7 @@
167 #define _CM4000_H_
168
169 #include <linux/types.h>
170 +#include <linux/ioctl.h>
171
172 #define MAX_ATR 33
173
174 diff --git a/include/linux/dn.h b/include/linux/dn.h
175 index 9c50445..dc9f005 100644
176 --- a/include/linux/dn.h
177 +++ b/include/linux/dn.h
178 @@ -1,6 +1,7 @@
179 #ifndef _LINUX_DN_H
180 #define _LINUX_DN_H
181
182 +#include <linux/ioctl.h>
183 #include <linux/types.h>
184
185 /*
186 diff --git a/include/linux/ppp-ioctl.h b/include/linux/ppp-ioctl.h
187 index 2d9a885..63a23a3 100644
188 --- a/include/linux/ppp-ioctl.h
189 +++ b/include/linux/ppp-ioctl.h
190 @@ -12,6 +12,7 @@
191
192 #include <linux/types.h>
193 #include <linux/compiler.h>
194 +#include <linux/ppp_defs.h>
195
196 /*
197 * Bit definitions for flags argument to PPPIOCGFLAGS/PPPIOCSFLAGS.
198 --
199 1.7.12
200
201
202
203
204 1.1 src/patchsets/gentoo-headers/3.6/00_all_0005-netfilter-pull-in-limits.h.patch
205
206 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/3.6/00_all_0005-netfilter-pull-in-limits.h.patch?rev=1.1&view=markup
207 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/3.6/00_all_0005-netfilter-pull-in-limits.h.patch?rev=1.1&content-type=text/plain
208
209 Index: 00_all_0005-netfilter-pull-in-limits.h.patch
210 ===================================================================
211 From 0bfe8329127e86851703fefae0e7314594745a30 Mon Sep 17 00:00:00 2001
212 From: Mike Frysinger <vapier@g.o>
213 Date: Sat, 9 May 2009 17:30:35 -0400
214 Subject: [PATCH] netfilter: pull in limits.h
215
216 A few netfilter sub-headers use INT_MAX which is in limits.h.
217
218 URL: http://bugs.gentoo.org/246160
219 Signed-off-by: Mike Frysinger <vapier@g.o>
220 ---
221 include/linux/netfilter.h | 1 +
222 1 file changed, 1 insertion(+)
223
224 diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
225 index c613cf0..13b729e 100644
226 --- a/include/linux/netfilter.h
227 +++ b/include/linux/netfilter.h
228 @@ -14,6 +14,7 @@
229 #include <linux/types.h>
230 #include <linux/compiler.h>
231 #include <linux/sysctl.h>
232 +#include <limits.h>
233
234 /* Responses from hook functions. */
235 #define NF_DROP 0
236 --
237 1.7.12
238
239
240
241
242 1.1 src/patchsets/gentoo-headers/3.6/00_all_0006-convert-PAGE_SIZE-usage.patch
243
244 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/3.6/00_all_0006-convert-PAGE_SIZE-usage.patch?rev=1.1&view=markup
245 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/3.6/00_all_0006-convert-PAGE_SIZE-usage.patch?rev=1.1&content-type=text/plain
246
247 Index: 00_all_0006-convert-PAGE_SIZE-usage.patch
248 ===================================================================
249 From 88c724e02c2c4dd5afc679df0c72287d043cb917 Mon Sep 17 00:00:00 2001
250 From: Mike Frysinger <vapier@g.o>
251 Date: Sat, 13 Feb 2010 03:09:23 -0500
252 Subject: [PATCH] convert PAGE_SIZE usage
253
254 The size of a page may change at runtime or based on kernel settings, so
255 a static value at compile time doesn't work. More importantly, no one
256 exports PAGE_SIZE to user space anymore.
257
258 URL: http://bugs.gentoo.org/301431
259 Signed-off-by: Mike Frysinger <vapier@g.o>
260 ---
261 include/linux/binfmts.h | 3 ++-
262 include/linux/resource.h | 3 ++-
263 2 files changed, 4 insertions(+), 2 deletions(-)
264
265 diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h
266 index 366422b..589502a 100644
267 --- a/include/linux/binfmts.h
268 +++ b/include/linux/binfmts.h
269 @@ -1,6 +1,7 @@
270 #ifndef _LINUX_BINFMTS_H
271 #define _LINUX_BINFMTS_H
272
273 +#include <unistd.h>
274 #include <linux/capability.h>
275
276 struct pt_regs;
277 @@ -11,7 +12,7 @@ struct pt_regs;
278 * prevent the kernel from being unduly impacted by misaddressed pointers.
279 * MAX_ARG_STRINGS is chosen to fit in a signed 32-bit integer.
280 */
281 -#define MAX_ARG_STRLEN (PAGE_SIZE * 32)
282 +#define MAX_ARG_STRLEN (sysconf(_SC_PAGESIZE) * 32)
283 #define MAX_ARG_STRINGS 0x7FFFFFFF
284
285 /* sizeof(linux_binprm->buf) */
286 diff --git a/include/linux/resource.h b/include/linux/resource.h
287 index d01c96c..5a0559d 100644
288 --- a/include/linux/resource.h
289 +++ b/include/linux/resource.h
290 @@ -68,7 +68,8 @@ struct rlimit64 {
291 * GPG2 wants 64kB of mlocked memory, to make sure pass phrases
292 * and other sensitive information are never written to disk.
293 */
294 -#define MLOCK_LIMIT ((PAGE_SIZE > 64*1024) ? PAGE_SIZE : 64*1024)
295 +/* No one currently defines PAGE_SIZE bigger than 64kB */
296 +#define MLOCK_LIMIT (64 * 1024)
297
298 /*
299 * Due to binary compatibility, the actual resource numbers
300 --
301 1.7.12
302
303
304
305
306 1.1 src/patchsets/gentoo-headers/3.6/00_all_0007-asm-generic-fcntl.h-namespace-kernel-file-structs.patch
307
308 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/3.6/00_all_0007-asm-generic-fcntl.h-namespace-kernel-file-structs.patch?rev=1.1&view=markup
309 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/3.6/00_all_0007-asm-generic-fcntl.h-namespace-kernel-file-structs.patch?rev=1.1&content-type=text/plain
310
311 Index: 00_all_0007-asm-generic-fcntl.h-namespace-kernel-file-structs.patch
312 ===================================================================
313 From 6f9f589d74c099f5f875c203716316a9bf76623d Mon Sep 17 00:00:00 2001
314 From: Mike Frysinger <vapier@g.o>
315 Date: Mon, 29 Dec 2008 07:39:14 -0500
316 Subject: [PATCH] asm-generic/fcntl.h: namespace kernel file structs
317
318 No one should be using these structs, but just in case they are,
319 keep them available in the __kernel_ namespace.
320
321 Otherwise, trying to include something like:
322 #include <fcntl.h>
323 #include <linux/inotify.h>
324 leads to horrible failure.
325
326 URL: http://bugs.gentoo.org/244470
327 URL: http://bugs.gentoo.org/388633
328 Signed-off-by: Mike Frysinger <vapier@g.o>
329 ---
330 include/asm-generic/fcntl.h | 6 +++---
331 1 file changed, 3 insertions(+), 3 deletions(-)
332
333 diff --git a/include/asm-generic/fcntl.h b/include/asm-generic/fcntl.h
334 index a48937d..43a6e03 100644
335 --- a/include/asm-generic/fcntl.h
336 +++ b/include/asm-generic/fcntl.h
337 @@ -128,7 +128,7 @@
338 #define F_OWNER_PID 1
339 #define F_OWNER_PGRP 2
340
341 -struct f_owner_ex {
342 +struct __kernel_f_owner_ex {
343 int type;
344 __kernel_pid_t pid;
345 };
346 @@ -168,7 +168,7 @@ struct f_owner_ex {
347 #define __ARCH_FLOCK_PAD
348 #endif
349
350 -struct flock {
351 +struct __kernel_flock {
352 short l_type;
353 short l_whence;
354 __kernel_off_t l_start;
355 @@ -185,7 +185,7 @@ struct flock {
356 #define __ARCH_FLOCK64_PAD
357 #endif
358
359 -struct flock64 {
360 +struct __kernel_flock64 {
361 short l_type;
362 short l_whence;
363 __kernel_loff_t l_start;
364 --
365 1.7.12
366
367
368
369
370 1.1 src/patchsets/gentoo-headers/3.6/00_all_0008-unifdef-drop-unused-errno.h-include.patch
371
372 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/3.6/00_all_0008-unifdef-drop-unused-errno.h-include.patch?rev=1.1&view=markup
373 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/3.6/00_all_0008-unifdef-drop-unused-errno.h-include.patch?rev=1.1&content-type=text/plain
374
375 Index: 00_all_0008-unifdef-drop-unused-errno.h-include.patch
376 ===================================================================
377 From 8c9fd4dffd087d9dfcb369979c342409f6672f96 Mon Sep 17 00:00:00 2001
378 From: Mike Frysinger <vapier@g.o>
379 Date: Tue, 6 Dec 2011 17:22:42 -0500
380 Subject: [PATCH] unifdef: drop unused errno.h include
381
382 This is the only header on my system that ends up requiring kernel
383 headers, so if the kernel headers aren't available, we end up being
384 unable to install kernel headers :).
385
386 Since this file doesn't actually use anything from errno.h, drop
387 the include so it at least makes us a bit more robust on glibc.
388
389 Signed-off-by: Mike Frysinger <vapier@g.o>
390 ---
391 scripts/unifdef.c | 1 -
392 1 file changed, 1 deletion(-)
393
394 diff --git a/scripts/unifdef.c b/scripts/unifdef.c
395 index 7493c0e..c5dfae5 100644
396 --- a/scripts/unifdef.c
397 +++ b/scripts/unifdef.c
398 @@ -48,7 +48,6 @@
399
400 #include <ctype.h>
401 #include <err.h>
402 -#include <errno.h>
403 #include <stdarg.h>
404 #include <stdbool.h>
405 #include <stdio.h>
406 --
407 1.7.12