110-netdev_random_core.patch 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. diff -urN linux-2.4.26-pre5/Documentation/Configure.help linux-2.4.26-pre5-netdev-core/Documentation/Configure.help
  2. --- linux-2.4.26-pre5/Documentation/Configure.help Sat Mar 20 10:08:18 2004
  3. +++ linux-2.4.26-pre5-netdev-core/Documentation/Configure.help Sun Mar 21 10:16:14 2004
  4. @@ -10419,6 +10419,20 @@
  5. If you don't know what to use this for, you don't need it.
  6. +Allow Net Devices to contribute to /dev/random
  7. +CONFIG_NET_RANDOM
  8. + If you say Y here, network device interrupts will contribute to the
  9. + kernel entropy pool. Normally, block devices and some other devices
  10. + feed the pool. Some systems, such as those that are headless or diskless,
  11. + need additional entropy sources. Some people, however, feel that network
  12. + devices should not contribute to /dev/random because an external attacker
  13. + could observe incoming packets in an attempt to learn the entropy pool's
  14. + state. If you say N, no network device will contribute entropy.
  15. +
  16. + If you believe there is a chance of your network packets being observed
  17. + and you doubt the security of the entropy pool's one-way hash, do not
  18. + enable this. If unsure, say N.
  19. +
  20. Ethertap network tap (OBSOLETE)
  21. CONFIG_ETHERTAP
  22. If you say Y here (and have said Y to "Kernel/User network link
  23. diff -urN linux-2.4.26-pre5/drivers/net/Config.in linux-2.4.26-pre5-netdev-core/drivers/net/Config.in
  24. --- linux-2.4.26-pre5/drivers/net/Config.in Sat Mar 20 10:08:18 2004
  25. +++ linux-2.4.26-pre5-netdev-core/drivers/net/Config.in Sun Mar 21 10:16:14 2004
  26. @@ -8,6 +8,7 @@
  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
  33. fi
  34. diff -urN linux-2.4.26-pre5/include/asm-alpha/signal.h linux-2.4.26-pre5-netdev-core/include/asm-alpha/signal.h
  35. --- linux-2.4.26-pre5/include/asm-alpha/signal.h Sat Dec 1 18:27:14 2001
  36. +++ linux-2.4.26-pre5-netdev-core/include/asm-alpha/signal.h Sun Mar 21 10:16:14 2004
  37. @@ -121,7 +121,14 @@
  38. #define SA_PROBE SA_ONESHOT
  39. #define SA_SAMPLE_RANDOM SA_RESTART
  40. #define SA_SHIRQ 0x40000000
  41. +
  42. +#ifdef CONFIG_NET_RANDOM
  43. +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
  44. +#else
  45. +#define SA_NET_RANDOM 0
  46. #endif
  47. +
  48. +#endif /* __KERNEL__ */
  49. #define SIG_BLOCK 1 /* for blocking signals */
  50. #define SIG_UNBLOCK 2 /* for unblocking signals */
  51. diff -urN linux-2.4.26-pre5/include/asm-arm/signal.h linux-2.4.26-pre5-netdev-core/include/asm-arm/signal.h
  52. --- linux-2.4.26-pre5/include/asm-arm/signal.h Sat Sep 13 07:57:29 2003
  53. +++ linux-2.4.26-pre5-netdev-core/include/asm-arm/signal.h Sun Mar 21 10:16:14 2004
  54. @@ -125,7 +125,14 @@
  55. #define SA_PROBE 0x80000000
  56. #define SA_SAMPLE_RANDOM 0x10000000
  57. #define SA_SHIRQ 0x04000000
  58. +
  59. +#ifdef CONFIG_NET_RANDOM
  60. +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
  61. +#else
  62. +#define SA_NET_RANDOM 0
  63. #endif
  64. +
  65. +#endif /* __KERNEL__ */
  66. #define SIG_BLOCK 0 /* for blocking signals */
  67. #define SIG_UNBLOCK 1 /* for unblocking signals */
  68. diff -urN linux-2.4.26-pre5/include/asm-cris/signal.h linux-2.4.26-pre5-netdev-core/include/asm-cris/signal.h
  69. --- linux-2.4.26-pre5/include/asm-cris/signal.h Sat Dec 1 18:27:14 2001
  70. +++ linux-2.4.26-pre5-netdev-core/include/asm-cris/signal.h Sun Mar 21 10:16:14 2004
  71. @@ -120,7 +120,14 @@
  72. #define SA_PROBE SA_ONESHOT
  73. #define SA_SAMPLE_RANDOM SA_RESTART
  74. #define SA_SHIRQ 0x04000000
  75. +
  76. +#ifdef CONFIG_NET_RANDOM
  77. +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
  78. +#else
  79. +#define SA_NET_RANDOM 0
  80. #endif
  81. +
  82. +#endif /* __KERNEL__ */
  83. #define SIG_BLOCK 0 /* for blocking signals */
  84. #define SIG_UNBLOCK 1 /* for unblocking signals */
  85. diff -urN linux-2.4.26-pre5/include/asm-i386/signal.h linux-2.4.26-pre5-netdev-core/include/asm-i386/signal.h
  86. --- linux-2.4.26-pre5/include/asm-i386/signal.h Sun Mar 21 00:00:43 2004
  87. +++ linux-2.4.26-pre5-netdev-core/include/asm-i386/signal.h Sun Mar 21 10:16:14 2004
  88. @@ -119,7 +119,14 @@
  89. #define SA_PROBE SA_ONESHOT
  90. #define SA_SAMPLE_RANDOM SA_RESTART
  91. #define SA_SHIRQ 0x04000000
  92. +
  93. +#ifdef CONFIG_NET_RANDOM
  94. +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
  95. +#else
  96. +#define SA_NET_RANDOM 0
  97. #endif
  98. +
  99. +#endif /* __KERNEL__ */
  100. #define SIG_BLOCK 0 /* for blocking signals */
  101. #define SIG_UNBLOCK 1 /* for unblocking signals */
  102. diff -urN linux-2.4.26-pre5/include/asm-ia64/signal.h linux-2.4.26-pre5-netdev-core/include/asm-ia64/signal.h
  103. --- linux-2.4.26-pre5/include/asm-ia64/signal.h Sat Mar 20 10:08:20 2004
  104. +++ linux-2.4.26-pre5-netdev-core/include/asm-ia64/signal.h Sun Mar 21 10:16:14 2004
  105. @@ -117,6 +117,12 @@
  106. #define SA_SHIRQ 0x04000000
  107. #define SA_PERCPU_IRQ 0x02000000
  108. +#ifdef CONFIG_NET_RANDOM
  109. +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
  110. +#else
  111. +#define SA_NET_RANDOM 0
  112. +#endif
  113. +
  114. #endif /* __KERNEL__ */
  115. #define SIG_BLOCK 0 /* for blocking signals */
  116. diff -urN linux-2.4.26-pre5/include/asm-m68k/signal.h linux-2.4.26-pre5-netdev-core/include/asm-m68k/signal.h
  117. --- linux-2.4.26-pre5/include/asm-m68k/signal.h Fri Feb 20 07:38:33 2004
  118. +++ linux-2.4.26-pre5-netdev-core/include/asm-m68k/signal.h Sun Mar 21 10:16:14 2004
  119. @@ -116,7 +116,14 @@
  120. #define SA_PROBE SA_ONESHOT
  121. #define SA_SAMPLE_RANDOM SA_RESTART
  122. #define SA_SHIRQ 0x04000000
  123. +
  124. +#ifdef CONFIG_NET_RANDOM
  125. +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
  126. +#else
  127. +#define SA_NET_RANDOM 0
  128. #endif
  129. +
  130. +#endif /* __KERNEL__ */
  131. #define SIG_BLOCK 0 /* for blocking signals */
  132. #define SIG_UNBLOCK 1 /* for unblocking signals */
  133. diff -urN linux-2.4.26-pre5/include/asm-mips/signal.h linux-2.4.26-pre5-netdev-core/include/asm-mips/signal.h
  134. --- linux-2.4.26-pre5/include/asm-mips/signal.h Sat Sep 13 07:57:31 2003
  135. +++ linux-2.4.26-pre5-netdev-core/include/asm-mips/signal.h Sun Mar 21 10:16:14 2004
  136. @@ -111,6 +111,12 @@
  137. #define SA_SAMPLE_RANDOM SA_RESTART
  138. #define SA_SHIRQ 0x02000000
  139. +#ifdef CONFIG_NET_RANDOM
  140. +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
  141. +#else
  142. +#define SA_NET_RANDOM 0
  143. +#endif
  144. +
  145. #endif /* __KERNEL__ */
  146. #define SIG_BLOCK 1 /* for blocking signals */
  147. diff -urN linux-2.4.26-pre5/include/asm-mips64/signal.h linux-2.4.26-pre5-netdev-core/include/asm-mips64/signal.h
  148. --- linux-2.4.26-pre5/include/asm-mips64/signal.h Sat Sep 13 07:57:32 2003
  149. +++ linux-2.4.26-pre5-netdev-core/include/asm-mips64/signal.h Sun Mar 21 10:16:14 2004
  150. @@ -119,6 +119,12 @@
  151. #define SA_SAMPLE_RANDOM SA_RESTART
  152. #define SA_SHIRQ 0x02000000
  153. +#ifdef CONFIG_NET_RANDOM
  154. +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
  155. +#else
  156. +#define SA_NET_RANDOM 0
  157. +#endif
  158. +
  159. #endif /* __KERNEL__ */
  160. #define SIG_BLOCK 1 /* for blocking signals */
  161. diff -urN linux-2.4.26-pre5/include/asm-parisc/signal.h linux-2.4.26-pre5-netdev-core/include/asm-parisc/signal.h
  162. --- linux-2.4.26-pre5/include/asm-parisc/signal.h Sun Jan 11 18:48:21 2004
  163. +++ linux-2.4.26-pre5-netdev-core/include/asm-parisc/signal.h Sun Mar 21 10:16:14 2004
  164. @@ -100,6 +100,12 @@
  165. #define SA_SAMPLE_RANDOM SA_RESTART
  166. #define SA_SHIRQ 0x04000000
  167. +#ifdef CONFIG_NET_RANDOM
  168. +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
  169. +#else
  170. +#define SA_NET_RANDOM 0
  171. +#endif
  172. +
  173. #endif /* __KERNEL__ */
  174. #define SIG_BLOCK 0 /* for blocking signals */
  175. diff -urN linux-2.4.26-pre5/include/asm-ppc/signal.h linux-2.4.26-pre5-netdev-core/include/asm-ppc/signal.h
  176. --- linux-2.4.26-pre5/include/asm-ppc/signal.h Sat Sep 13 07:57:32 2003
  177. +++ linux-2.4.26-pre5-netdev-core/include/asm-ppc/signal.h Sun Mar 21 10:16:14 2004
  178. @@ -111,6 +111,13 @@
  179. #define SA_PROBE SA_ONESHOT
  180. #define SA_SAMPLE_RANDOM SA_RESTART
  181. #define SA_SHIRQ 0x04000000
  182. +
  183. +#ifdef CONFIG_NET_RANDOM
  184. +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
  185. +#else
  186. +#define SA_NET_RANDOM 0
  187. +#endif
  188. +
  189. #endif /* __KERNEL__ */
  190. #define SIG_BLOCK 0 /* for blocking signals */
  191. diff -urN linux-2.4.26-pre5/include/asm-s390/signal.h linux-2.4.26-pre5-netdev-core/include/asm-s390/signal.h
  192. --- linux-2.4.26-pre5/include/asm-s390/signal.h Fri Feb 20 07:38:34 2004
  193. +++ linux-2.4.26-pre5-netdev-core/include/asm-s390/signal.h Sun Mar 21 10:16:14 2004
  194. @@ -129,7 +129,14 @@
  195. #define SA_SHIRQ 0x04000000
  196. #define SA_DOPATHGROUP 0x00100000
  197. #define SA_FORCE 0x00200000
  198. +
  199. +#ifdef CONFIG_NET_RANDOM
  200. +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
  201. +#else
  202. +#define SA_NET_RANDOM 0
  203. #endif
  204. +
  205. +#endif /* __KERNEL__ */
  206. #define SIG_BLOCK 0 /* for blocking signals */
  207. #define SIG_UNBLOCK 1 /* for unblocking signals */
  208. diff -urN linux-2.4.26-pre5/include/asm-s390x/signal.h linux-2.4.26-pre5-netdev-core/include/asm-s390x/signal.h
  209. --- linux-2.4.26-pre5/include/asm-s390x/signal.h Fri Feb 20 07:38:34 2004
  210. +++ linux-2.4.26-pre5-netdev-core/include/asm-s390x/signal.h Sun Mar 21 10:16:14 2004
  211. @@ -129,7 +129,14 @@
  212. #define SA_SHIRQ 0x04000000
  213. #define SA_DOPATHGROUP 0x00100000
  214. #define SA_FORCE 0x00200000
  215. +
  216. +#ifdef CONFIG_NET_RANDOM
  217. +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
  218. +#else
  219. +#define SA_NET_RANDOM 0
  220. #endif
  221. +
  222. +#endif /* __KERNEL__ */
  223. #define SIG_BLOCK 0 /* for blocking signals */
  224. #define SIG_UNBLOCK 1 /* for unblocking signals */
  225. diff -urN linux-2.4.26-pre5/include/asm-sh/signal.h linux-2.4.26-pre5-netdev-core/include/asm-sh/signal.h
  226. --- linux-2.4.26-pre5/include/asm-sh/signal.h Sat Dec 1 18:27:13 2001
  227. +++ linux-2.4.26-pre5-netdev-core/include/asm-sh/signal.h Sun Mar 21 10:16:14 2004
  228. @@ -107,7 +107,14 @@
  229. #define SA_PROBE SA_ONESHOT
  230. #define SA_SAMPLE_RANDOM SA_RESTART
  231. #define SA_SHIRQ 0x04000000
  232. +
  233. +#ifdef CONFIG_NET_RANDOM
  234. +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
  235. +#else
  236. +#define SA_NET_RANDOM 0
  237. #endif
  238. +
  239. +#endif /* __KERNEL__ */
  240. #define SIG_BLOCK 0 /* for blocking signals */
  241. #define SIG_UNBLOCK 1 /* for unblocking signals */
  242. diff -urN linux-2.4.26-pre5/include/asm-sparc/signal.h linux-2.4.26-pre5-netdev-core/include/asm-sparc/signal.h
  243. --- linux-2.4.26-pre5/include/asm-sparc/signal.h Sat Dec 1 18:27:14 2001
  244. +++ linux-2.4.26-pre5-netdev-core/include/asm-sparc/signal.h Sun Mar 21 10:16:14 2004
  245. @@ -176,7 +176,14 @@
  246. #define SA_PROBE SA_ONESHOT
  247. #define SA_SAMPLE_RANDOM SA_RESTART
  248. #define SA_STATIC_ALLOC 0x80
  249. +
  250. +#ifdef CONFIG_NET_RANDOM
  251. +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
  252. +#else
  253. +#define SA_NET_RANDOM 0
  254. #endif
  255. +
  256. +#endif /* __KERNEL__ */
  257. /* Type of a signal handler. */
  258. #ifdef __KERNEL__
  259. diff -urN linux-2.4.26-pre5/include/asm-sparc64/signal.h linux-2.4.26-pre5-netdev-core/include/asm-sparc64/signal.h
  260. --- linux-2.4.26-pre5/include/asm-sparc64/signal.h Sat Dec 1 18:27:14 2001
  261. +++ linux-2.4.26-pre5-netdev-core/include/asm-sparc64/signal.h Sun Mar 21 10:16:14 2004
  262. @@ -192,7 +192,14 @@
  263. #define SA_PROBE SA_ONESHOT
  264. #define SA_SAMPLE_RANDOM SA_RESTART
  265. #define SA_STATIC_ALLOC 0x80
  266. +
  267. +#ifdef CONFIG_NET_RANDOM
  268. +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
  269. +#else
  270. +#define SA_NET_RANDOM 0
  271. #endif
  272. +
  273. +#endif /* __KERNEL__ */
  274. /* Type of a signal handler. */
  275. #ifdef __KERNEL__