1 --- a/Documentation/Configure.help
2 +++ b/Documentation/Configure.help
3 @@ -10687,6 +10687,20 @@ CONFIG_TUN
5 If you don't know what to use this for, you don't need it.
7 +Allow Net Devices to contribute to /dev/random
9 + If you say Y here, network device interrupts will contribute to the
10 + kernel entropy pool. Normally, block devices and some other devices
11 + feed the pool. Some systems, such as those that are headless or diskless,
12 + need additional entropy sources. Some people, however, feel that network
13 + devices should not contribute to /dev/random because an external attacker
14 + could observe incoming packets in an attempt to learn the entropy pool's
15 + state. If you say N, no network device will contribute entropy.
17 + If you believe there is a chance of your network packets being observed
18 + and you doubt the security of the entropy pool's one-way hash, do not
19 + enable this. If unsure, say N.
21 Ethertap network tap (OBSOLETE)
23 If you say Y here (and have said Y to "Kernel/User network link
24 --- a/drivers/net/Config.in
25 +++ b/drivers/net/Config.in
26 @@ -8,6 +8,7 @@ tristate 'Dummy net driver support' CONF
27 tristate 'Bonding driver support' CONFIG_BONDING
28 tristate 'EQL (serial line load balancing) support' CONFIG_EQUALIZER
29 tristate 'Universal TUN/TAP device driver support' CONFIG_TUN
30 +bool 'Allow Net Devices to contribute to /dev/random' CONFIG_NET_RANDOM
31 if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
32 tristate 'Ethertap network tap (OBSOLETE)' CONFIG_ETHERTAP
34 --- a/include/asm-alpha/signal.h
35 +++ b/include/asm-alpha/signal.h
36 @@ -121,8 +121,15 @@ typedef unsigned long sigset_t;
37 #define SA_PROBE SA_ONESHOT
38 #define SA_SAMPLE_RANDOM SA_RESTART
39 #define SA_SHIRQ 0x40000000
41 +#ifdef CONFIG_NET_RANDOM
42 +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
44 +#define SA_NET_RANDOM 0
47 +#endif /* __KERNEL__ */
49 #define SIG_BLOCK 1 /* for blocking signals */
50 #define SIG_UNBLOCK 2 /* for unblocking signals */
51 #define SIG_SETMASK 3 /* for setting the signal mask */
52 --- a/include/asm-arm/signal.h
53 +++ b/include/asm-arm/signal.h
54 @@ -125,8 +125,15 @@ typedef unsigned long sigset_t;
55 #define SA_PROBE 0x80000000
56 #define SA_SAMPLE_RANDOM 0x10000000
57 #define SA_SHIRQ 0x04000000
59 +#ifdef CONFIG_NET_RANDOM
60 +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
62 +#define SA_NET_RANDOM 0
65 +#endif /* __KERNEL__ */
67 #define SIG_BLOCK 0 /* for blocking signals */
68 #define SIG_UNBLOCK 1 /* for unblocking signals */
69 #define SIG_SETMASK 2 /* for setting the signal mask */
70 --- a/include/asm-cris/signal.h
71 +++ b/include/asm-cris/signal.h
72 @@ -120,8 +120,15 @@ typedef unsigned long sigset_t;
73 #define SA_PROBE SA_ONESHOT
74 #define SA_SAMPLE_RANDOM SA_RESTART
75 #define SA_SHIRQ 0x04000000
77 +#ifdef CONFIG_NET_RANDOM
78 +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
80 +#define SA_NET_RANDOM 0
83 +#endif /* __KERNEL__ */
85 #define SIG_BLOCK 0 /* for blocking signals */
86 #define SIG_UNBLOCK 1 /* for unblocking signals */
87 #define SIG_SETMASK 2 /* for setting the signal mask */
88 --- a/include/asm-i386/signal.h
89 +++ b/include/asm-i386/signal.h
90 @@ -119,8 +119,15 @@ typedef unsigned long sigset_t;
91 #define SA_PROBE SA_ONESHOT
92 #define SA_SAMPLE_RANDOM SA_RESTART
93 #define SA_SHIRQ 0x04000000
95 +#ifdef CONFIG_NET_RANDOM
96 +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
98 +#define SA_NET_RANDOM 0
101 +#endif /* __KERNEL__ */
103 #define SIG_BLOCK 0 /* for blocking signals */
104 #define SIG_UNBLOCK 1 /* for unblocking signals */
105 #define SIG_SETMASK 2 /* for setting the signal mask */
106 --- a/include/asm-ia64/signal.h
107 +++ b/include/asm-ia64/signal.h
109 #define SA_SHIRQ 0x04000000
110 #define SA_PERCPU_IRQ 0x02000000
112 +#ifdef CONFIG_NET_RANDOM
113 +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
115 +#define SA_NET_RANDOM 0
118 #endif /* __KERNEL__ */
120 #define SIG_BLOCK 0 /* for blocking signals */
121 --- a/include/asm-m68k/signal.h
122 +++ b/include/asm-m68k/signal.h
123 @@ -116,8 +116,15 @@ typedef unsigned long sigset_t;
124 #define SA_PROBE SA_ONESHOT
125 #define SA_SAMPLE_RANDOM SA_RESTART
126 #define SA_SHIRQ 0x04000000
128 +#ifdef CONFIG_NET_RANDOM
129 +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
131 +#define SA_NET_RANDOM 0
134 +#endif /* __KERNEL__ */
136 #define SIG_BLOCK 0 /* for blocking signals */
137 #define SIG_UNBLOCK 1 /* for unblocking signals */
138 #define SIG_SETMASK 2 /* for setting the signal mask */
139 --- a/include/asm-mips/signal.h
140 +++ b/include/asm-mips/signal.h
141 @@ -111,6 +111,12 @@ typedef unsigned long old_sigset_t; /*
142 #define SA_SAMPLE_RANDOM SA_RESTART
143 #define SA_SHIRQ 0x02000000
145 +#ifdef CONFIG_NET_RANDOM
146 +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
148 +#define SA_NET_RANDOM 0
151 #endif /* __KERNEL__ */
153 #define SIG_BLOCK 1 /* for blocking signals */
154 --- a/include/asm-mips64/signal.h
155 +++ b/include/asm-mips64/signal.h
156 @@ -119,6 +119,12 @@ typedef unsigned int old_sigset_t32;
157 #define SA_SAMPLE_RANDOM SA_RESTART
158 #define SA_SHIRQ 0x02000000
160 +#ifdef CONFIG_NET_RANDOM
161 +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
163 +#define SA_NET_RANDOM 0
166 #endif /* __KERNEL__ */
168 #define SIG_BLOCK 1 /* for blocking signals */
169 --- a/include/asm-parisc/signal.h
170 +++ b/include/asm-parisc/signal.h
172 #define SA_SAMPLE_RANDOM SA_RESTART
173 #define SA_SHIRQ 0x04000000
175 +#ifdef CONFIG_NET_RANDOM
176 +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
178 +#define SA_NET_RANDOM 0
181 #endif /* __KERNEL__ */
183 #define SIG_BLOCK 0 /* for blocking signals */
184 --- a/include/asm-ppc/signal.h
185 +++ b/include/asm-ppc/signal.h
186 @@ -111,6 +111,13 @@ typedef struct {
187 #define SA_PROBE SA_ONESHOT
188 #define SA_SAMPLE_RANDOM SA_RESTART
189 #define SA_SHIRQ 0x04000000
191 +#ifdef CONFIG_NET_RANDOM
192 +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
194 +#define SA_NET_RANDOM 0
197 #endif /* __KERNEL__ */
199 #define SIG_BLOCK 0 /* for blocking signals */
200 --- a/include/asm-s390/signal.h
201 +++ b/include/asm-s390/signal.h
202 @@ -129,8 +129,15 @@ typedef unsigned long sigset_t;
203 #define SA_SHIRQ 0x04000000
204 #define SA_DOPATHGROUP 0x00100000
205 #define SA_FORCE 0x00200000
207 +#ifdef CONFIG_NET_RANDOM
208 +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
210 +#define SA_NET_RANDOM 0
213 +#endif /* __KERNEL__ */
215 #define SIG_BLOCK 0 /* for blocking signals */
216 #define SIG_UNBLOCK 1 /* for unblocking signals */
217 #define SIG_SETMASK 2 /* for setting the signal mask */
218 --- a/include/asm-s390x/signal.h
219 +++ b/include/asm-s390x/signal.h
220 @@ -129,8 +129,15 @@ typedef unsigned long sigset_t;
221 #define SA_SHIRQ 0x04000000
222 #define SA_DOPATHGROUP 0x00100000
223 #define SA_FORCE 0x00200000
225 +#ifdef CONFIG_NET_RANDOM
226 +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
228 +#define SA_NET_RANDOM 0
231 +#endif /* __KERNEL__ */
233 #define SIG_BLOCK 0 /* for blocking signals */
234 #define SIG_UNBLOCK 1 /* for unblocking signals */
235 #define SIG_SETMASK 2 /* for setting the signal mask */
236 --- a/include/asm-sh/signal.h
237 +++ b/include/asm-sh/signal.h
238 @@ -107,8 +107,15 @@ typedef struct {
239 #define SA_PROBE SA_ONESHOT
240 #define SA_SAMPLE_RANDOM SA_RESTART
241 #define SA_SHIRQ 0x04000000
243 +#ifdef CONFIG_NET_RANDOM
244 +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
246 +#define SA_NET_RANDOM 0
249 +#endif /* __KERNEL__ */
251 #define SIG_BLOCK 0 /* for blocking signals */
252 #define SIG_UNBLOCK 1 /* for unblocking signals */
253 #define SIG_SETMASK 2 /* for setting the signal mask */
254 --- a/include/asm-sparc/signal.h
255 +++ b/include/asm-sparc/signal.h
256 @@ -176,8 +176,15 @@ struct sigstack {
257 #define SA_PROBE SA_ONESHOT
258 #define SA_SAMPLE_RANDOM SA_RESTART
259 #define SA_STATIC_ALLOC 0x80
261 +#ifdef CONFIG_NET_RANDOM
262 +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
264 +#define SA_NET_RANDOM 0
267 +#endif /* __KERNEL__ */
269 /* Type of a signal handler. */
271 typedef void (*__sighandler_t)(int, int, struct sigcontext *, char *);
272 --- a/include/asm-sparc64/signal.h
273 +++ b/include/asm-sparc64/signal.h
274 @@ -192,8 +192,15 @@ struct sigstack {
275 #define SA_PROBE SA_ONESHOT
276 #define SA_SAMPLE_RANDOM SA_RESTART
277 #define SA_STATIC_ALLOC 0x80
279 +#ifdef CONFIG_NET_RANDOM
280 +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
282 +#define SA_NET_RANDOM 0
285 +#endif /* __KERNEL__ */
287 /* Type of a signal handler. */
289 typedef void (*__sighandler_t)(int, struct sigcontext *);