]> git.pld-linux.org Git - packages/kernel.git/blob - patch-rml-2.4.10-netdev-random-1
- added description of djurban's branch
[packages/kernel.git] / patch-rml-2.4.10-netdev-random-1
1 diff -urN linux-2.4.10/Documentation/Configure.help linux/Documentation/Configure.help
2 --- linux-2.4.10/Documentation/Configure.help   Wed Sep 19 02:47:21 2001
3 +++ linux/Documentation/Configure.help  Wed Sep 19 02:57:55 2001
4 @@ -7758,6 +7758,21 @@
5  
6    If you don't know what to use this for, you don't need it.
7  
8 +Allow Net Devices to contribute to /dev/random
9 +CONFIG_NET_RANDOM
10 +  If you say Y here, network device interrupts will contribute to the
11 +  kernel entropy pool at /dev/random. Normally, block devices and
12 +  some other devices (keyboard, mouse) add to the pool. Some systems, such
13 +  as those that are headless or diskless, need additional entropy sources.
14 +  Some people, however, feel that network devices should not contribute to
15 +  /dev/random because an external attacker could observe incoming packets
16 +  in an attempt to learn the entropy pool's state. Note this is completely
17 +  theoretical. 
18 +
19 +  If you believe there is a chance of your network packets being observed
20 +  and you doubt the security of the entropy pool's one-way hash, do not
21 +  enable this.
22 +
23  Ethertap network tap (OBSOLETE)
24  CONFIG_ETHERTAP
25    If you say Y here (and have said Y to "Kernel/User network link
26 diff -urN linux-2.4.10/drivers/net/Config.in linux/drivers/net/Config.in
27 --- linux-2.4.10/drivers/net/Config.in  Wed Sep 19 02:46:33 2001
28 +++ linux/drivers/net/Config.in Wed Sep 19 02:57:55 2001
29 @@ -9,6 +9,7 @@
30  tristate 'Bonding driver support' CONFIG_BONDING
31  tristate 'EQL (serial line load balancing) support' CONFIG_EQUALIZER
32  tristate 'Universal TUN/TAP device driver support' CONFIG_TUN
33 +bool 'Allow Net Devices to contribute to /dev/random' CONFIG_NET_RANDOM
34  if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
35     if [ "$CONFIG_NETLINK" = "y" ]; then
36        tristate 'Ethertap network tap (OBSOLETE)' CONFIG_ETHERTAP
37 diff -urN linux-2.4.10/include/asm-alpha/signal.h linux/include/asm-alpha/signal.h
38 --- linux-2.4.10/include/asm-alpha/signal.h     Wed Sep 19 02:46:23 2001
39 +++ linux/include/asm-alpha/signal.h    Wed Sep 19 02:57:55 2001
40 @@ -121,8 +121,20 @@
41  #define SA_PROBE               SA_ONESHOT
42  #define SA_SAMPLE_RANDOM       SA_RESTART
43  #define SA_SHIRQ               0x40000000
44 +
45 +/*
46 + * Net Devices can use SA_SAMPLE_NET_RANDOM and thus only
47 + * contribute to the kernel entropy pool if users want that
48 + * at compile time.
49 + */
50 +#ifdef CONFIG_NET_RANDOM
51 +#define SA_SAMPLE_NET_RANDOM   SA_SAMPLE_RANDOM
52 +#else
53 +#define SA_SAMPLE_NET_RANDOM   0
54  #endif
55  
56 +#endif /* __KERNEL__ */
57 +
58  #define SIG_BLOCK          1   /* for blocking signals */
59  #define SIG_UNBLOCK        2   /* for unblocking signals */
60  #define SIG_SETMASK        3   /* for setting the signal mask */
61 diff -urN linux-2.4.10/include/asm-arm/signal.h linux/include/asm-arm/signal.h
62 --- linux-2.4.10/include/asm-arm/signal.h       Wed Sep 19 02:46:24 2001
63 +++ linux/include/asm-arm/signal.h      Wed Sep 19 02:57:55 2001
64 @@ -124,8 +124,20 @@
65  #define SA_SAMPLE_RANDOM       0x10000000
66  #define SA_IRQNOMASK           0x08000000
67  #define SA_SHIRQ               0x04000000
68 +
69 +/*
70 + * Net Devices can use SA_SAMPLE_NET_RANDOM and thus only
71 + * contribute to the kernel entropy pool if users want that
72 + * at compile time.
73 + */
74 +#ifdef CONFIG_NET_RANDOM
75 +#define SA_SAMPLE_NET_RANDOM   SA_SAMPLE_RANDOM
76 +#else
77 +#define SA_SAMPLE_NET_RANDOM   0
78  #endif
79  
80 +#endif /* __KERNEL__ */
81 +
82  #define SIG_BLOCK          0   /* for blocking signals */
83  #define SIG_UNBLOCK        1   /* for unblocking signals */
84  #define SIG_SETMASK        2   /* for setting the signal mask */
85 diff -urN linux-2.4.10/include/asm-cris/signal.h linux/include/asm-cris/signal.h
86 --- linux-2.4.10/include/asm-cris/signal.h      Wed Sep 19 02:46:25 2001
87 +++ linux/include/asm-cris/signal.h     Wed Sep 19 02:57:55 2001
88 @@ -120,8 +120,20 @@
89  #define SA_PROBE               SA_ONESHOT
90  #define SA_SAMPLE_RANDOM       SA_RESTART
91  #define SA_SHIRQ               0x04000000
92 +
93 +/*
94 + * Net Devices can use SA_SAMPLE_NET_RANDOM and thus only
95 + * contribute to the kernel entropy pool if users want that
96 + * at compile time.
97 + */
98 +#ifdef CONFIG_NET_RANDOM
99 +#define SA_SAMPLE_NET_RANDOM   SA_SAMPLE_RANDOM
100 +#else
101 +#define SA_SAMPLE_NET_RANDOM   0
102  #endif
103  
104 +#endif /* __KERNEL__ */
105 +
106  #define SIG_BLOCK          0   /* for blocking signals */
107  #define SIG_UNBLOCK        1   /* for unblocking signals */
108  #define SIG_SETMASK        2   /* for setting the signal mask */
109 diff -urN linux-2.4.10/include/asm-i386/signal.h linux/include/asm-i386/signal.h
110 --- linux-2.4.10/include/asm-i386/signal.h      Wed Sep 19 02:46:23 2001
111 +++ linux/include/asm-i386/signal.h     Wed Sep 19 02:57:55 2001
112 @@ -119,8 +119,20 @@
113  #define SA_PROBE               SA_ONESHOT
114  #define SA_SAMPLE_RANDOM       SA_RESTART
115  #define SA_SHIRQ               0x04000000
116 +
117 +/*
118 + * Net Devices can use SA_SAMPLE_NET_RANDOM and thus only
119 + * contribute to the kernel entropy pool if users want that
120 + * at compile time.
121 + */
122 +#ifdef CONFIG_NET_RANDOM
123 +#define SA_SAMPLE_NET_RANDOM   SA_SAMPLE_RANDOM
124 +#else
125 +#define SA_SAMPLE_NET_RANDOM   0
126  #endif
127  
128 +#endif /* __KERNEL__ */
129 +
130  #define SIG_BLOCK          0   /* for blocking signals */
131  #define SIG_UNBLOCK        1   /* for unblocking signals */
132  #define SIG_SETMASK        2   /* for setting the signal mask */
133 diff -urN linux-2.4.10/include/asm-ia64/signal.h linux/include/asm-ia64/signal.h
134 --- linux-2.4.10/include/asm-ia64/signal.h      Wed Sep 19 02:46:24 2001
135 +++ linux/include/asm-ia64/signal.h     Wed Sep 19 02:57:55 2001
136 @@ -106,6 +106,17 @@
137  #define SA_SAMPLE_RANDOM       SA_RESTART
138  #define SA_SHIRQ               0x04000000
139  
140 +/*
141 + * Net Devices can use SA_SAMPLE_NET_RANDOM and thus only
142 + * contribute to the kernel entropy pool if users want that
143 + * at compile time.
144 + */
145 +#ifdef CONFIG_NET_RANDOM
146 +#define SA_SAMPLE_NET_RANDOM   SA_SAMPLE_RANDOM
147 +#else
148 +#define SA_SAMPLE_NET_RANDOM   0
149 +#endif
150 +
151  #endif /* __KERNEL__ */
152  
153  #define SIG_BLOCK          0   /* for blocking signals */
154 diff -urN linux-2.4.10/include/asm-m68k/signal.h linux/include/asm-m68k/signal.h
155 --- linux-2.4.10/include/asm-m68k/signal.h      Wed Sep 19 02:46:23 2001
156 +++ linux/include/asm-m68k/signal.h     Wed Sep 19 02:57:55 2001
157 @@ -116,8 +116,20 @@
158  #define SA_PROBE               SA_ONESHOT
159  #define SA_SAMPLE_RANDOM       SA_RESTART
160  #define SA_SHIRQ               0x04000000
161 +
162 +/*
163 + * Net Devices can use SA_SAMPLE_NET_RANDOM and thus only
164 + * contribute to the kernel entropy pool if users want that
165 + * at compile time.
166 + */
167 +#ifdef CONFIG_NET_RANDOM
168 +#define SA_SAMPLE_NET_RANDOM   SA_SAMPLE_RANDOM
169 +#else
170 +#define SA_SAMPLE_NET_RANDOM   0
171  #endif
172  
173 +#endif /* __KERNEL__ */
174 +
175  #define SIG_BLOCK          0   /* for blocking signals */
176  #define SIG_UNBLOCK        1   /* for unblocking signals */
177  #define SIG_SETMASK        2   /* for setting the signal mask */
178 diff -urN linux-2.4.10/include/asm-mips/signal.h linux/include/asm-mips/signal.h
179 --- linux-2.4.10/include/asm-mips/signal.h      Wed Sep 19 02:46:23 2001
180 +++ linux/include/asm-mips/signal.h     Wed Sep 19 02:57:55 2001
181 @@ -111,6 +111,17 @@
182  #define SA_SAMPLE_RANDOM       SA_RESTART
183  #define SA_SHIRQ               0x02000000
184  
185 +/*
186 + * Net Devices can use SA_SAMPLE_NET_RANDOM and thus only
187 + * contribute to the kernel entropy pool if users want that
188 + * at compile time.
189 + */
190 +#ifdef CONFIG_NET_RANDOM
191 +#define SA_SAMPLE_NET_RANDOM   SA_SAMPLE_RANDOM
192 +#else
193 +#define SA_SAMPLE_NET_RANDOM   0
194 +#endif
195 +
196  #endif /* __KERNEL__ */
197  
198  #define SIG_BLOCK      1       /* for blocking signals */
199 diff -urN linux-2.4.10/include/asm-mips64/signal.h linux/include/asm-mips64/signal.h
200 --- linux-2.4.10/include/asm-mips64/signal.h    Wed Sep 19 02:46:25 2001
201 +++ linux/include/asm-mips64/signal.h   Wed Sep 19 02:57:55 2001
202 @@ -111,6 +111,17 @@
203  #define SA_SAMPLE_RANDOM       SA_RESTART
204  #define SA_SHIRQ               0x02000000
205  
206 +/*
207 + * Net Devices can use SA_SAMPLE_NET_RANDOM and thus only
208 + * contribute to the kernel entropy pool if users want that
209 + * at compile time.
210 + */
211 +#ifdef CONFIG_NET_RANDOM
212 +#define SA_SAMPLE_NET_RANDOM   SA_SAMPLE_RANDOM
213 +#else
214 +#define SA_SAMPLE_NET_RANDOM   0
215 +#endif
216 +
217  #endif /* __KERNEL__ */
218  
219  #define SIG_BLOCK      1       /* for blocking signals */
220 diff -urN linux-2.4.10/include/asm-parisc/signal.h linux/include/asm-parisc/signal.h
221 --- linux-2.4.10/include/asm-parisc/signal.h    Wed Sep 19 02:46:25 2001
222 +++ linux/include/asm-parisc/signal.h   Wed Sep 19 02:57:55 2001
223 @@ -100,6 +100,17 @@
224  #define SA_SAMPLE_RANDOM       SA_RESTART
225  #define SA_SHIRQ               0x04000000
226  
227 +/*
228 + * Net Devices can use SA_SAMPLE_NET_RANDOM and thus only
229 + * contribute to the kernel entropy pool if users want that
230 + * at compile time.
231 + */
232 +#ifdef CONFIG_NET_RANDOM
233 +#define SA_SAMPLE_NET_RANDOM   SA_SAMPLE_RANDOM
234 +#else
235 +#define SA_SAMPLE_NET_RANDOM   0
236 +#endif
237 +
238  #endif /* __KERNEL__ */
239  
240  #define SIG_BLOCK          0   /* for blocking signals */
241 diff -urN linux-2.4.10/include/asm-ppc/signal.h linux/include/asm-ppc/signal.h
242 --- linux-2.4.10/include/asm-ppc/signal.h       Wed Sep 19 02:46:24 2001
243 +++ linux/include/asm-ppc/signal.h      Wed Sep 19 02:57:55 2001
244 @@ -114,8 +114,20 @@
245  #define SA_PROBE               SA_ONESHOT
246  #define SA_SAMPLE_RANDOM       SA_RESTART
247  #define SA_SHIRQ               0x04000000
248 +
249 +/*
250 + * Net Devices can use SA_SAMPLE_NET_RANDOM and thus only
251 + * contribute to the kernel entropy pool if users want that
252 + * at compile time.
253 + */
254 +#ifdef CONFIG_NET_RANDOM
255 +#define SA_SAMPLE_NET_RANDOM   SA_SAMPLE_RANDOM
256 +#else
257 +#define SA_SAMPLE_NET_RANDOM   0
258  #endif
259  
260 +#endif /* __KERNEL__ */
261 +
262  #define SIG_BLOCK          0   /* for blocking signals */
263  #define SIG_UNBLOCK        1   /* for unblocking signals */
264  #define SIG_SETMASK        2   /* for setting the signal mask */
265 diff -urN linux-2.4.10/include/asm-s390/signal.h linux/include/asm-s390/signal.h
266 --- linux-2.4.10/include/asm-s390/signal.h      Wed Sep 19 02:46:25 2001
267 +++ linux/include/asm-s390/signal.h     Wed Sep 19 02:57:55 2001
268 @@ -127,8 +127,20 @@
269  #define SA_PROBE                SA_ONESHOT
270  #define SA_SAMPLE_RANDOM        SA_RESTART
271  #define SA_SHIRQ                0x04000000
272 +
273 +/*
274 + * Net Devices can use SA_SAMPLE_NET_RANDOM and thus only
275 + * contribute to the kernel entropy pool if users want that
276 + * at compile time.
277 + */
278 +#ifdef CONFIG_NET_RANDOM
279 +#define SA_SAMPLE_NET_RANDOM   SA_SAMPLE_RANDOM
280 +#else
281 +#define SA_SAMPLE_NET_RANDOM   0
282  #endif
283  
284 +#endif /* __KERNEL__ */
285 +
286  #define SIG_BLOCK          0    /* for blocking signals */
287  #define SIG_UNBLOCK        1    /* for unblocking signals */
288  #define SIG_SETMASK        2    /* for setting the signal mask */
289 diff -urN linux-2.4.10/include/asm-s390x/signal.h linux/include/asm-s390x/signal.h
290 --- linux-2.4.10/include/asm-s390x/signal.h     Wed Sep 19 02:46:25 2001
291 +++ linux/include/asm-s390x/signal.h    Wed Sep 19 02:57:55 2001
292 @@ -127,8 +127,20 @@
293  #define SA_PROBE                SA_ONESHOT
294  #define SA_SAMPLE_RANDOM        SA_RESTART
295  #define SA_SHIRQ                0x04000000
296 +
297 +/*
298 + * Net Devices can use SA_SAMPLE_NET_RANDOM and thus only
299 + * contribute to the kernel entropy pool if users want that
300 + * at compile time.
301 + */
302 +#ifdef CONFIG_NET_RANDOM
303 +#define SA_SAMPLE_NET_RANDOM   SA_SAMPLE_RANDOM
304 +#else
305 +#define SA_SAMPLE_NET_RANDOM   0
306  #endif
307  
308 +#endif /* __KERNEL__ */
309 +
310  #define SIG_BLOCK          0    /* for blocking signals */
311  #define SIG_UNBLOCK        1    /* for unblocking signals */
312  #define SIG_SETMASK        2    /* for setting the signal mask */
313 diff -urN linux-2.4.10/include/asm-sh/signal.h linux/include/asm-sh/signal.h
314 --- linux-2.4.10/include/asm-sh/signal.h        Wed Sep 19 02:46:24 2001
315 +++ linux/include/asm-sh/signal.h       Wed Sep 19 02:57:55 2001
316 @@ -107,8 +107,20 @@
317  #define SA_PROBE               SA_ONESHOT
318  #define SA_SAMPLE_RANDOM       SA_RESTART
319  #define SA_SHIRQ               0x04000000
320 +
321 +/*
322 + * Net Devices can use SA_SAMPLE_NET_RANDOM and thus only
323 + * contribute to the kernel entropy pool if users want that
324 + * at compile time.
325 + */
326 +#ifdef CONFIG_NET_RANDOM
327 +#define SA_SAMPLE_NET_RANDOM   SA_SAMPLE_RANDOM
328 +#else
329 +#define SA_SAMPLE_NET_RANDOM   0
330  #endif
331  
332 +#endif /* __KERNEL__ */
333 +
334  #define SIG_BLOCK          0   /* for blocking signals */
335  #define SIG_UNBLOCK        1   /* for unblocking signals */
336  #define SIG_SETMASK        2   /* for setting the signal mask */
337 diff -urN linux-2.4.10/include/asm-sparc/signal.h linux/include/asm-sparc/signal.h
338 --- linux-2.4.10/include/asm-sparc/signal.h     Wed Sep 19 02:46:23 2001
339 +++ linux/include/asm-sparc/signal.h    Wed Sep 19 02:57:55 2001
340 @@ -176,8 +176,20 @@
341  #define SA_PROBE SA_ONESHOT
342  #define SA_SAMPLE_RANDOM SA_RESTART
343  #define SA_STATIC_ALLOC                0x80
344 +
345 +/*
346 + * Net Devices can use SA_SAMPLE_NET_RANDOM and thus only
347 + * contribute to the kernel entropy pool if users want that
348 + * at compile time.
349 + */
350 +#ifdef CONFIG_NET_RANDOM
351 +#define SA_SAMPLE_NET_RANDOM   SA_SAMPLE_RANDOM
352 +#else
353 +#define SA_SAMPLE_NET_RANDOM   0
354  #endif
355  
356 +#endif /* __KERNEL__ */
357 +
358  /* Type of a signal handler.  */
359  #ifdef __KERNEL__
360  typedef void (*__sighandler_t)(int, int, struct sigcontext *, char *);
361 diff -urN linux-2.4.10/include/asm-sparc64/signal.h linux/include/asm-sparc64/signal.h
362 --- linux-2.4.10/include/asm-sparc64/signal.h   Wed Sep 19 02:46:24 2001
363 +++ linux/include/asm-sparc64/signal.h  Wed Sep 19 02:57:55 2001
364 @@ -192,8 +192,20 @@
365  #define SA_PROBE SA_ONESHOT
366  #define SA_SAMPLE_RANDOM SA_RESTART
367  #define SA_STATIC_ALLOC                0x80
368 +
369 +/*
370 + * Net Devices can use SA_SAMPLE_NET_RANDOM and thus only
371 + * contribute to the kernel entropy pool if users want that
372 + * at compile time.
373 + */
374 +#ifdef CONFIG_NET_RANDOM
375 +#define SA_SAMPLE_NET_RANDOM   SA_SAMPLE_RANDOM
376 +#else
377 +#define SA_SAMPLE_NET_RANDOM   0
378  #endif
379  
380 +#endif /* __KERNEL__ */
381 +
382  /* Type of a signal handler.  */
383  #ifdef __KERNEL__
384  typedef void (*__sighandler_t)(int, struct sigcontext *);
This page took 0.071154 seconds and 3 git commands to generate.