1 |
vapier 10/08/23 20:40:12 |
2 |
|
3 |
Added: |
4 |
0001-kbuild-auto-convert-size-types-in-userspace-headers.patch |
5 |
0002-linux-types.h-create-userspace-safe-64bit-aligned-de.patch |
6 |
0003-linux-stat.h-remove-__GLIBC__-checks.patch |
7 |
0004-linux-stddef.h-export-offsetof-to-userspace.patch |
8 |
0005-linux-pull-in-other-needed-headers-for-userspace.patch |
9 |
0006-netfilter-pull-in-limits.h.patch |
10 |
0007-convert-PAGE_SIZE-usage.patch |
11 |
0008-HACK-asm-pull-in-C-library-headers.patch |
12 |
Log: |
13 |
initial 2.6.35 patchset based on last 2.6.34 patchset |
14 |
|
15 |
Revision Changes Path |
16 |
1.1 src/patchsets/gentoo-headers/2.6.35/0001-kbuild-auto-convert-size-types-in-userspace-headers.patch |
17 |
|
18 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/2.6.35/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/2.6.35/0001-kbuild-auto-convert-size-types-in-userspace-headers.patch?rev=1.1&content-type=text/plain |
20 |
|
21 |
Index: 0001-kbuild-auto-convert-size-types-in-userspace-headers.patch |
22 |
=================================================================== |
23 |
From 7bc85683fa4d108f4735f9cca0d471cb47a74c0d 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 1/9] 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 files changed, 3 insertions(+), 0 deletions(-) |
36 |
|
37 |
diff --git a/scripts/headers_install.pl b/scripts/headers_install.pl |
38 |
index 4ca3be3..8ac1121 100644 |
39 |
--- a/scripts/headers_install.pl |
40 |
+++ b/scripts/headers_install.pl |
41 |
@@ -39,6 +39,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.2 |
53 |
|
54 |
|
55 |
|
56 |
|
57 |
1.1 src/patchsets/gentoo-headers/2.6.35/0002-linux-types.h-create-userspace-safe-64bit-aligned-de.patch |
58 |
|
59 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/2.6.35/0002-linux-types.h-create-userspace-safe-64bit-aligned-de.patch?rev=1.1&view=markup |
60 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/2.6.35/0002-linux-types.h-create-userspace-safe-64bit-aligned-de.patch?rev=1.1&content-type=text/plain |
61 |
|
62 |
Index: 0002-linux-types.h-create-userspace-safe-64bit-aligned-de.patch |
63 |
=================================================================== |
64 |
From 3900376a34a89ce82fc3d050c9db24323e69d897 Mon Sep 17 00:00:00 2001 |
65 |
From: Mike Frysinger <vapier@g.o> |
66 |
Date: Mon, 29 Dec 2008 06:51:45 -0500 |
67 |
Subject: [PATCH 2/9] linux/types.h: create userspace safe 64bit aligned defines |
68 |
|
69 |
Some kernel headers exported to userspace rely on these 64bit aligned |
70 |
defines. However, they are hidden behind __KERNEL_STRICT_NAMES at the |
71 |
moment which means most of the time, they're never actually available. |
72 |
These these defines dont actually conflict with normal userspace / C |
73 |
library types, there's no reason to hide them behind the |
74 |
__KERNEL_STRICT_NAMES define. |
75 |
|
76 |
Signed-off-by: Mike Frysinger <vapier@g.o> |
77 |
Cc: Sam Ravnborg <sam@××××××××.org> |
78 |
Cc: David Woodhouse <dwmw2@×××××××××.org> |
79 |
Cc: Jan Engelhardt <jengelh@××××××××××××.de> |
80 |
Cc: Patrick McHardy <kaber@×××××.net> |
81 |
Cc: David S. Miller <davem@×××××××××.net> |
82 |
Signed-off-by: Andrew Morton <akpm@××××××××××××××××.org> |
83 |
--- |
84 |
include/linux/if_ppp.h | 16 ++++++++-------- |
85 |
include/linux/netfilter/nfnetlink_log.h | 4 ++-- |
86 |
include/linux/netfilter/nfnetlink_queue.h | 4 ++-- |
87 |
include/linux/netfilter/xt_connbytes.h | 4 ++-- |
88 |
include/linux/netfilter/xt_quota.h | 2 +- |
89 |
include/linux/types.h | 14 +++++++++----- |
90 |
6 files changed, 24 insertions(+), 20 deletions(-) |
91 |
|
92 |
diff --git a/include/linux/if_ppp.h b/include/linux/if_ppp.h |
93 |
index fcef103..c9ad383 100644 |
94 |
--- a/include/linux/if_ppp.h |
95 |
+++ b/include/linux/if_ppp.h |
96 |
@@ -114,14 +114,14 @@ struct pppol2tp_ioc_stats { |
97 |
__u16 tunnel_id; /* redundant */ |
98 |
__u16 session_id; /* if zero, get tunnel stats */ |
99 |
__u32 using_ipsec:1; /* valid only for session_id == 0 */ |
100 |
- aligned_u64 tx_packets; |
101 |
- aligned_u64 tx_bytes; |
102 |
- aligned_u64 tx_errors; |
103 |
- aligned_u64 rx_packets; |
104 |
- aligned_u64 rx_bytes; |
105 |
- aligned_u64 rx_seq_discards; |
106 |
- aligned_u64 rx_oos_packets; |
107 |
- aligned_u64 rx_errors; |
108 |
+ __aligned_u64 tx_packets; |
109 |
+ __aligned_u64 tx_bytes; |
110 |
+ __aligned_u64 tx_errors; |
111 |
+ __aligned_u64 rx_packets; |
112 |
+ __aligned_u64 rx_bytes; |
113 |
+ __aligned_u64 rx_seq_discards; |
114 |
+ __aligned_u64 rx_oos_packets; |
115 |
+ __aligned_u64 rx_errors; |
116 |
}; |
117 |
|
118 |
#define ifr__name b.ifr_ifrn.ifrn_name |
119 |
diff --git a/include/linux/netfilter/nfnetlink_log.h b/include/linux/netfilter/nfnetlink_log.h |
120 |
index d3bab7a..1c37f87 100644 |
121 |
--- a/include/linux/netfilter/nfnetlink_log.h |
122 |
+++ b/include/linux/netfilter/nfnetlink_log.h |
123 |
@@ -28,8 +28,8 @@ struct nfulnl_msg_packet_hw { |
124 |
}; |
125 |
|
126 |
struct nfulnl_msg_packet_timestamp { |
127 |
- aligned_be64 sec; |
128 |
- aligned_be64 usec; |
129 |
+ __aligned_be64 sec; |
130 |
+ __aligned_be64 usec; |
131 |
}; |
132 |
|
133 |
enum nfulnl_attr_type { |
134 |
diff --git a/include/linux/netfilter/nfnetlink_queue.h b/include/linux/netfilter/nfnetlink_queue.h |
135 |
index 2455fe5..af94e00 100644 |
136 |
--- a/include/linux/netfilter/nfnetlink_queue.h |
137 |
+++ b/include/linux/netfilter/nfnetlink_queue.h |
138 |
@@ -25,8 +25,8 @@ struct nfqnl_msg_packet_hw { |
139 |
}; |
140 |
|
141 |
struct nfqnl_msg_packet_timestamp { |
142 |
- aligned_be64 sec; |
143 |
- aligned_be64 usec; |
144 |
+ __aligned_be64 sec; |
145 |
+ __aligned_be64 usec; |
146 |
}; |
147 |
|
148 |
enum nfqnl_attr_type { |
149 |
diff --git a/include/linux/netfilter/xt_connbytes.h b/include/linux/netfilter/xt_connbytes.h |
150 |
index 92fcbb0..f1d6c15 100644 |
151 |
--- a/include/linux/netfilter/xt_connbytes.h |
152 |
+++ b/include/linux/netfilter/xt_connbytes.h |
153 |
@@ -17,8 +17,8 @@ enum xt_connbytes_direction { |
154 |
|
155 |
struct xt_connbytes_info { |
156 |
struct { |
157 |
- aligned_u64 from; /* count to be matched */ |
158 |
- aligned_u64 to; /* count to be matched */ |
159 |
+ __aligned_u64 from; /* count to be matched */ |
160 |
+ __aligned_u64 to; /* count to be matched */ |
161 |
} count; |
162 |
__u8 what; /* ipt_connbytes_what */ |
163 |
__u8 direction; /* ipt_connbytes_direction */ |
164 |
diff --git a/include/linux/netfilter/xt_quota.h b/include/linux/netfilter/xt_quota.h |
165 |
index 8dc89df..417ab17 100644 |
166 |
--- a/include/linux/netfilter/xt_quota.h |
167 |
+++ b/include/linux/netfilter/xt_quota.h |
168 |
@@ -13,7 +13,7 @@ struct xt_quota_info { |
169 |
u_int32_t pad; |
170 |
|
171 |
/* Used internally by the kernel */ |
172 |
- aligned_u64 quota; |
173 |
+ __aligned_u64 quota; |
174 |
struct xt_quota_priv *master; |
175 |
}; |
176 |
|
177 |
diff --git a/include/linux/types.h b/include/linux/types.h |
178 |
index 23d237a..c2efbfc 100644 |
179 |
--- a/include/linux/types.h |
180 |
+++ b/include/linux/types.h |
181 |
@@ -118,11 +118,6 @@ typedef __u64 u_int64_t; |
182 |
typedef __s64 int64_t; |
183 |
#endif |
184 |
|
185 |
-/* this is a special 64bit data type that is 8-byte aligned */ |
186 |
-#define aligned_u64 __u64 __attribute__((aligned(8))) |
187 |
-#define aligned_be64 __be64 __attribute__((aligned(8))) |
188 |
-#define aligned_le64 __le64 __attribute__((aligned(8))) |
189 |
- |
190 |
/** |
191 |
* The type used for indexing onto a disc or disc partition. |
192 |
* |
193 |
@@ -147,8 +142,17 @@ typedef unsigned long blkcnt_t; |
194 |
#define pgoff_t unsigned long |
195 |
#endif |
196 |
|
197 |
+#define aligned_u64 __aligned_u64 |
198 |
+#define aligned_be64 __aligned_be64 |
199 |
+#define aligned_le64 __aligned_le64 |
200 |
+ |
201 |
#endif /* __KERNEL__ */ |
202 |
|
203 |
+/* this is a special 64bit data type that is 8-byte aligned */ |
204 |
+#define __aligned_u64 __u64 __attribute__((aligned(8))) |
205 |
+#define __aligned_be64 __be64 __attribute__((aligned(8))) |
206 |
+#define __aligned_le64 __le64 __attribute__((aligned(8))) |
207 |
+ |
208 |
/* |
209 |
* Below are truly Linux-specific types that should never collide with |
210 |
* any application/library that wants linux/types.h. |
211 |
-- |
212 |
1.7.2 |
213 |
|
214 |
|
215 |
|
216 |
|
217 |
1.1 src/patchsets/gentoo-headers/2.6.35/0003-linux-stat.h-remove-__GLIBC__-checks.patch |
218 |
|
219 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/2.6.35/0003-linux-stat.h-remove-__GLIBC__-checks.patch?rev=1.1&view=markup |
220 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/2.6.35/0003-linux-stat.h-remove-__GLIBC__-checks.patch?rev=1.1&content-type=text/plain |
221 |
|
222 |
Index: 0003-linux-stat.h-remove-__GLIBC__-checks.patch |
223 |
=================================================================== |
224 |
From 07c1336e1fde9c28c61e14f0a5c7b422c9c65800 Mon Sep 17 00:00:00 2001 |
225 |
From: Mike Frysinger <vapier@g.o> |
226 |
Date: Mon, 29 Dec 2008 06:52:59 -0500 |
227 |
Subject: [PATCH 3/9] linux/stat.h: remove __GLIBC__ checks |
228 |
|
229 |
Only check __KERNEL__ so we don't assume the C library is glibc. |
230 |
|
231 |
Signed-off-by: Mike Frysinger <vapier@g.o> |
232 |
--- |
233 |
include/linux/stat.h | 2 +- |
234 |
1 files changed, 1 insertions(+), 1 deletions(-) |
235 |
|
236 |
diff --git a/include/linux/stat.h b/include/linux/stat.h |
237 |
index 611c398..5460344 100644 |
238 |
--- a/include/linux/stat.h |
239 |
+++ b/include/linux/stat.h |
240 |
@@ -7,7 +7,7 @@ |
241 |
|
242 |
#endif |
243 |
|
244 |
-#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) |
245 |
+#ifdef __KERNEL__ |
246 |
|
247 |
#define S_IFMT 00170000 |
248 |
#define S_IFSOCK 0140000 |
249 |
-- |
250 |
1.7.2 |
251 |
|
252 |
|
253 |
|
254 |
|
255 |
1.1 src/patchsets/gentoo-headers/2.6.35/0004-linux-stddef.h-export-offsetof-to-userspace.patch |
256 |
|
257 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/2.6.35/0004-linux-stddef.h-export-offsetof-to-userspace.patch?rev=1.1&view=markup |
258 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/2.6.35/0004-linux-stddef.h-export-offsetof-to-userspace.patch?rev=1.1&content-type=text/plain |
259 |
|
260 |
Index: 0004-linux-stddef.h-export-offsetof-to-userspace.patch |
261 |
=================================================================== |
262 |
From 0f3378929e052f93a0f5f5723af94c99704a9fec Mon Sep 17 00:00:00 2001 |
263 |
From: Mike Frysinger <vapier@g.o> |
264 |
Date: Fri, 2 Jan 2009 02:34:03 -0500 |
265 |
Subject: [PATCH 4/9] linux/stddef.h: export offsetof() to userspace |
266 |
|
267 |
Some userspace headers (like fuse.h) utilize the offsetof() macro. Some |
268 |
userspace packages (like lkcd) expect linux/stddef.h to provide this as |
269 |
well. |
270 |
|
271 |
Signed-off-by: Mike Frysinger <vapier@g.o> |
272 |
--- |
273 |
include/linux/stddef.h | 7 +++++-- |
274 |
1 files changed, 5 insertions(+), 2 deletions(-) |
275 |
|
276 |
diff --git a/include/linux/stddef.h b/include/linux/stddef.h |
277 |
index 6a40c76..4894d59 100644 |
278 |
--- a/include/linux/stddef.h |
279 |
+++ b/include/linux/stddef.h |
280 |
@@ -20,9 +20,12 @@ enum { |
281 |
#undef offsetof |
282 |
#ifdef __compiler_offsetof |
283 |
#define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER) |
284 |
-#else |
285 |
-#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) |
286 |
#endif |
287 |
#endif /* __KERNEL__ */ |
288 |
|
289 |
+#include <stddef.h> /* newer gcc includes this */ |
290 |
+#ifndef offsetof |
291 |
+#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) |
292 |
+#endif |
293 |
+ |
294 |
#endif |
295 |
-- |
296 |
1.7.2 |
297 |
|
298 |
|
299 |
|
300 |
|
301 |
1.1 src/patchsets/gentoo-headers/2.6.35/0005-linux-pull-in-other-needed-headers-for-userspace.patch |
302 |
|
303 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/2.6.35/0005-linux-pull-in-other-needed-headers-for-userspace.patch?rev=1.1&view=markup |
304 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/2.6.35/0005-linux-pull-in-other-needed-headers-for-userspace.patch?rev=1.1&content-type=text/plain |
305 |
|
306 |
Index: 0005-linux-pull-in-other-needed-headers-for-userspace.patch |
307 |
=================================================================== |
308 |
From bf157099263e7a630d79853ba9ec11876f2698f8 Mon Sep 17 00:00:00 2001 |
309 |
From: Mike Frysinger <vapier@g.o> |
310 |
Date: Mon, 29 Dec 2008 07:41:01 -0500 |
311 |
Subject: [PATCH 5/9] linux/*: pull in other needed headers for userspace |
312 |
|
313 |
mondo patch |
314 |
|
315 |
Signed-off-by: Mike Frysinger <vapier@g.o> |
316 |
--- |
317 |
include/linux/cm4000_cs.h | 1 + |
318 |
include/linux/dn.h | 1 + |
319 |
include/linux/ext2_fs.h | 1 + |
320 |
include/linux/if_ppp.h | 1 + |
321 |
include/linux/netrom.h | 2 ++ |
322 |
include/linux/romfs_fs.h | 2 ++ |
323 |
include/linux/rose.h | 2 ++ |
324 |
7 files changed, 10 insertions(+), 0 deletions(-) |
325 |
|
326 |
diff --git a/include/linux/cm4000_cs.h b/include/linux/cm4000_cs.h |
327 |
index 72bfefd..b179b68 100644 |
328 |
--- a/include/linux/cm4000_cs.h |
329 |
+++ b/include/linux/cm4000_cs.h |
330 |
@@ -2,6 +2,7 @@ |
331 |
#define _CM4000_H_ |
332 |
|
333 |
#include <linux/types.h> |
334 |
+#include <linux/ioctl.h> |
335 |
|
336 |
#define MAX_ATR 33 |
337 |
|
338 |
diff --git a/include/linux/dn.h b/include/linux/dn.h |
339 |
index 9c50445..dc9f005 100644 |
340 |
--- a/include/linux/dn.h |
341 |
+++ b/include/linux/dn.h |
342 |
@@ -1,6 +1,7 @@ |
343 |
#ifndef _LINUX_DN_H |
344 |
#define _LINUX_DN_H |
345 |
|
346 |
+#include <linux/ioctl.h> |
347 |
#include <linux/types.h> |
348 |
|
349 |
/* |
350 |
diff --git a/include/linux/ext2_fs.h b/include/linux/ext2_fs.h |
351 |
index 2dfa707..53792bf 100644 |
352 |
--- a/include/linux/ext2_fs.h |
353 |
+++ b/include/linux/ext2_fs.h |
354 |
@@ -18,6 +18,7 @@ |
355 |
|
356 |
#include <linux/types.h> |
357 |
#include <linux/magic.h> |
358 |
+#include <linux/fs.h> |
359 |
|
360 |
/* |
361 |
* The second extended filesystem constants/structures |
362 |
diff --git a/include/linux/if_ppp.h b/include/linux/if_ppp.h |
363 |
index c9ad383..4d70e16 100644 |
364 |
--- a/include/linux/if_ppp.h |
365 |
+++ b/include/linux/if_ppp.h |
366 |
@@ -35,6 +35,7 @@ |
367 |
|
368 |
#include <linux/types.h> |
369 |
#include <linux/compiler.h> |
370 |
+#include <linux/ppp_defs.h> |
371 |
|
372 |
/* |
373 |
* Packet sizes |
374 |
diff --git a/include/linux/netrom.h b/include/linux/netrom.h |
375 |
index 6939b32..af7313c 100644 |
376 |
--- a/include/linux/netrom.h |
377 |
+++ b/include/linux/netrom.h |
378 |
@@ -7,6 +7,8 @@ |
379 |
#ifndef NETROM_KERNEL_H |
380 |
#define NETROM_KERNEL_H |
381 |
|
382 |
+#include <linux/ax25.h> |
383 |
+ |
384 |
#define NETROM_MTU 236 |
385 |
|
386 |
#define NETROM_T1 1 |
387 |
diff --git a/include/linux/romfs_fs.h b/include/linux/romfs_fs.h |
388 |
index c490fbc..2a0269a 100644 |
389 |
--- a/include/linux/romfs_fs.h |
390 |
+++ b/include/linux/romfs_fs.h |
391 |
@@ -1,6 +1,8 @@ |
392 |
#ifndef __LINUX_ROMFS_FS_H |
393 |
#define __LINUX_ROMFS_FS_H |
394 |
|
395 |
+#include <linux/types.h> |
396 |
+ |
397 |
/* The basic structures of the romfs filesystem */ |
398 |
|
399 |
#define ROMBSIZE BLOCK_SIZE |
400 |
diff --git a/include/linux/rose.h b/include/linux/rose.h |
401 |
index c7b4b18..e8289cd 100644 |
402 |
--- a/include/linux/rose.h |
403 |
+++ b/include/linux/rose.h |
404 |
@@ -7,6 +7,8 @@ |
405 |
#ifndef ROSE_KERNEL_H |
406 |
#define ROSE_KERNEL_H |
407 |
|
408 |
+#include <linux/ax25.h> |
409 |
+ |
410 |
#define ROSE_MTU 251 |
411 |
|
412 |
#define ROSE_MAX_DIGIS 6 |
413 |
-- |
414 |
1.7.2 |
415 |
|
416 |
|
417 |
|
418 |
|
419 |
1.1 src/patchsets/gentoo-headers/2.6.35/0006-netfilter-pull-in-limits.h.patch |
420 |
|
421 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/2.6.35/0006-netfilter-pull-in-limits.h.patch?rev=1.1&view=markup |
422 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/2.6.35/0006-netfilter-pull-in-limits.h.patch?rev=1.1&content-type=text/plain |
423 |
|
424 |
Index: 0006-netfilter-pull-in-limits.h.patch |
425 |
=================================================================== |
426 |
From ba57654b52cfc5e84fce2ff832c156c66e3260f0 Mon Sep 17 00:00:00 2001 |
427 |
From: Mike Frysinger <vapier@g.o> |
428 |
Date: Sat, 9 May 2009 17:30:35 -0400 |
429 |
Subject: [PATCH 6/9] netfilter: pull in limits.h |
430 |
|
431 |
A few netfilter sub-headers use INT_MAX which is in limits.h. |
432 |
|
433 |
URL: http://bugs.gentoo.org/246160 |
434 |
Signed-off-by: Mike Frysinger <vapier@g.o> |
435 |
--- |
436 |
include/linux/netfilter.h | 1 + |
437 |
1 files changed, 1 insertions(+), 0 deletions(-) |
438 |
|
439 |
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h |
440 |
index 89341c3..3617225 100644 |
441 |
--- a/include/linux/netfilter.h |
442 |
+++ b/include/linux/netfilter.h |
443 |
@@ -13,6 +13,7 @@ |
444 |
#endif |
445 |
#include <linux/types.h> |
446 |
#include <linux/compiler.h> |
447 |
+#include <limits.h> |
448 |
|
449 |
/* Responses from hook functions. */ |
450 |
#define NF_DROP 0 |
451 |
-- |
452 |
1.7.2 |
453 |
|
454 |
|
455 |
|
456 |
|
457 |
1.1 src/patchsets/gentoo-headers/2.6.35/0007-convert-PAGE_SIZE-usage.patch |
458 |
|
459 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/2.6.35/0007-convert-PAGE_SIZE-usage.patch?rev=1.1&view=markup |
460 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/2.6.35/0007-convert-PAGE_SIZE-usage.patch?rev=1.1&content-type=text/plain |
461 |
|
462 |
Index: 0007-convert-PAGE_SIZE-usage.patch |
463 |
=================================================================== |
464 |
From ed33af0ec59648ec5c71d31b222dd64b9b169900 Mon Sep 17 00:00:00 2001 |
465 |
From: Mike Frysinger <vapier@g.o> |
466 |
Date: Sat, 13 Feb 2010 03:09:23 -0500 |
467 |
Subject: [PATCH 7/9] convert PAGE_SIZE usage |
468 |
|
469 |
The size of a page may change at runtime or based on kernel settings, so |
470 |
a static value at compile time doesn't work. More importantly, no one |
471 |
exports PAGE_SIZE to user space anymore. |
472 |
|
473 |
URL: http://bugs.gentoo.org/301431 |
474 |
Signed-off-by: Mike Frysinger <vapier@g.o> |
475 |
--- |
476 |
include/linux/binfmts.h | 3 ++- |
477 |
include/linux/resource.h | 3 ++- |
478 |
2 files changed, 4 insertions(+), 2 deletions(-) |
479 |
|
480 |
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h |
481 |
index c809e28..18be62b 100644 |
482 |
--- a/include/linux/binfmts.h |
483 |
+++ b/include/linux/binfmts.h |
484 |
@@ -1,6 +1,7 @@ |
485 |
#ifndef _LINUX_BINFMTS_H |
486 |
#define _LINUX_BINFMTS_H |
487 |
|
488 |
+#include <unistd.h> |
489 |
#include <linux/capability.h> |
490 |
|
491 |
struct pt_regs; |
492 |
@@ -11,7 +12,7 @@ struct pt_regs; |
493 |
* prevent the kernel from being unduly impacted by misaddressed pointers. |
494 |
* MAX_ARG_STRINGS is chosen to fit in a signed 32-bit integer. |
495 |
*/ |
496 |
-#define MAX_ARG_STRLEN (PAGE_SIZE * 32) |
497 |
+#define MAX_ARG_STRLEN (sysconf(_SC_PAGESIZE) * 32) |
498 |
#define MAX_ARG_STRINGS 0x7FFFFFFF |
499 |
|
500 |
/* sizeof(linux_binprm->buf) */ |
501 |
diff --git a/include/linux/resource.h b/include/linux/resource.h |
502 |
index f1e914e..4e0beaf 100644 |
503 |
--- a/include/linux/resource.h |
504 |
+++ b/include/linux/resource.h |
505 |
@@ -60,7 +60,8 @@ struct rlimit { |
506 |
* GPG2 wants 64kB of mlocked memory, to make sure pass phrases |
507 |
* and other sensitive information are never written to disk. |
508 |
*/ |
509 |
-#define MLOCK_LIMIT ((PAGE_SIZE > 64*1024) ? PAGE_SIZE : 64*1024) |
510 |
+/* No one currently defines PAGE_SIZE bigger than 64kB */ |
511 |
+#define MLOCK_LIMIT (64 * 1024) |
512 |
|
513 |
/* |
514 |
* Due to binary compatibility, the actual resource numbers |
515 |
-- |
516 |
1.7.2 |
517 |
|
518 |
|
519 |
|
520 |
|
521 |
1.1 src/patchsets/gentoo-headers/2.6.35/0008-HACK-asm-pull-in-C-library-headers.patch |
522 |
|
523 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/2.6.35/0008-HACK-asm-pull-in-C-library-headers.patch?rev=1.1&view=markup |
524 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/2.6.35/0008-HACK-asm-pull-in-C-library-headers.patch?rev=1.1&content-type=text/plain |
525 |
|
526 |
Index: 0008-HACK-asm-pull-in-C-library-headers.patch |
527 |
=================================================================== |
528 |
From f584d2e43e78eebce9ca7e28576532d811115bde Mon Sep 17 00:00:00 2001 |
529 |
From: Mike Frysinger <vapier@g.o> |
530 |
Date: Mon, 29 Dec 2008 07:39:14 -0500 |
531 |
Subject: [PATCH 8/9] HACK: asm/*: pull in C library headers |
532 |
|
533 |
Pull in the libc versions of these headers so that the proper |
534 |
userspace defines/typedefs are utilized. |
535 |
|
536 |
Signed-off-by: Mike Frysinger <vapier@g.o> |
537 |
--- |
538 |
include/asm-generic/fcntl.h | 5 +++++ |
539 |
1 files changed, 5 insertions(+), 0 deletions(-) |
540 |
|
541 |
diff --git a/include/asm-generic/fcntl.h b/include/asm-generic/fcntl.h |
542 |
index fcd268c..aa54f91 100644 |
543 |
--- a/include/asm-generic/fcntl.h |
544 |
+++ b/include/asm-generic/fcntl.h |
545 |
@@ -1,6 +1,11 @@ |
546 |
#ifndef _ASM_GENERIC_FCNTL_H |
547 |
#define _ASM_GENERIC_FCNTL_H |
548 |
|
549 |
+/* Pull in fcntl structs from the libc #244470 */ |
550 |
+#include <fcntl.h> |
551 |
+#define HAVE_ARCH_STRUCT_FLOCK |
552 |
+#define HAVE_ARCH_STRUCT_FLOCK64 |
553 |
+ |
554 |
#include <linux/types.h> |
555 |
|
556 |
#define O_ACCMODE 00000003 |
557 |
-- |
558 |
1.7.2 |