110-netdev_random_core.patch 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. Index: linux-2.4.35.4/Documentation/Configure.help
  2. ===================================================================
  3. --- linux-2.4.35.4.orig/Documentation/Configure.help
  4. +++ linux-2.4.35.4/Documentation/Configure.help
  5. @@ -10675,6 +10675,20 @@ CONFIG_TUN
  6. If you don't know what to use this for, you don't need it.
  7. +Allow Net Devices to contribute to /dev/random
  8. +CONFIG_NET_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.
  16. +
  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.
  20. +
  21. Ethertap network tap (OBSOLETE)
  22. CONFIG_ETHERTAP
  23. If you say Y here (and have said Y to "Kernel/User network link
  24. Index: linux-2.4.35.4/drivers/net/Config.in
  25. ===================================================================
  26. --- linux-2.4.35.4.orig/drivers/net/Config.in
  27. +++ linux-2.4.35.4/drivers/net/Config.in
  28. @@ -8,6 +8,7 @@ tristate 'Dummy net driver support' CONF
  29. tristate 'Bonding driver support' CONFIG_BONDING
  30. tristate 'EQL (serial line load balancing) support' CONFIG_EQUALIZER
  31. tristate 'Universal TUN/TAP device driver support' CONFIG_TUN
  32. +bool 'Allow Net Devices to contribute to /dev/random' CONFIG_NET_RANDOM
  33. if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
  34. tristate 'Ethertap network tap (OBSOLETE)' CONFIG_ETHERTAP
  35. fi
  36. Index: linux-2.4.35.4/include/asm-alpha/signal.h
  37. ===================================================================
  38. --- linux-2.4.35.4.orig/include/asm-alpha/signal.h
  39. +++ linux-2.4.35.4/include/asm-alpha/signal.h
  40. @@ -121,8 +121,15 @@ typedef unsigned long sigset_t;
  41. #define SA_PROBE SA_ONESHOT
  42. #define SA_SAMPLE_RANDOM SA_RESTART
  43. #define SA_SHIRQ 0x40000000
  44. +
  45. +#ifdef CONFIG_NET_RANDOM
  46. +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
  47. +#else
  48. +#define SA_NET_RANDOM 0
  49. #endif
  50. +#endif /* __KERNEL__ */
  51. +
  52. #define SIG_BLOCK 1 /* for blocking signals */
  53. #define SIG_UNBLOCK 2 /* for unblocking signals */
  54. #define SIG_SETMASK 3 /* for setting the signal mask */
  55. Index: linux-2.4.35.4/include/asm-arm/signal.h
  56. ===================================================================
  57. --- linux-2.4.35.4.orig/include/asm-arm/signal.h
  58. +++ linux-2.4.35.4/include/asm-arm/signal.h
  59. @@ -125,8 +125,15 @@ typedef unsigned long sigset_t;
  60. #define SA_PROBE 0x80000000
  61. #define SA_SAMPLE_RANDOM 0x10000000
  62. #define SA_SHIRQ 0x04000000
  63. +
  64. +#ifdef CONFIG_NET_RANDOM
  65. +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
  66. +#else
  67. +#define SA_NET_RANDOM 0
  68. #endif
  69. +#endif /* __KERNEL__ */
  70. +
  71. #define SIG_BLOCK 0 /* for blocking signals */
  72. #define SIG_UNBLOCK 1 /* for unblocking signals */
  73. #define SIG_SETMASK 2 /* for setting the signal mask */
  74. Index: linux-2.4.35.4/include/asm-cris/signal.h
  75. ===================================================================
  76. --- linux-2.4.35.4.orig/include/asm-cris/signal.h
  77. +++ linux-2.4.35.4/include/asm-cris/signal.h
  78. @@ -120,8 +120,15 @@ typedef unsigned long sigset_t;
  79. #define SA_PROBE SA_ONESHOT
  80. #define SA_SAMPLE_RANDOM SA_RESTART
  81. #define SA_SHIRQ 0x04000000
  82. +
  83. +#ifdef CONFIG_NET_RANDOM
  84. +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
  85. +#else
  86. +#define SA_NET_RANDOM 0
  87. #endif
  88. +#endif /* __KERNEL__ */
  89. +
  90. #define SIG_BLOCK 0 /* for blocking signals */
  91. #define SIG_UNBLOCK 1 /* for unblocking signals */
  92. #define SIG_SETMASK 2 /* for setting the signal mask */
  93. Index: linux-2.4.35.4/include/asm-i386/signal.h
  94. ===================================================================
  95. --- linux-2.4.35.4.orig/include/asm-i386/signal.h
  96. +++ linux-2.4.35.4/include/asm-i386/signal.h
  97. @@ -119,8 +119,15 @@ typedef unsigned long sigset_t;
  98. #define SA_PROBE SA_ONESHOT
  99. #define SA_SAMPLE_RANDOM SA_RESTART
  100. #define SA_SHIRQ 0x04000000
  101. +
  102. +#ifdef CONFIG_NET_RANDOM
  103. +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
  104. +#else
  105. +#define SA_NET_RANDOM 0
  106. #endif
  107. +#endif /* __KERNEL__ */
  108. +
  109. #define SIG_BLOCK 0 /* for blocking signals */
  110. #define SIG_UNBLOCK 1 /* for unblocking signals */
  111. #define SIG_SETMASK 2 /* for setting the signal mask */
  112. Index: linux-2.4.35.4/include/asm-ia64/signal.h
  113. ===================================================================
  114. --- linux-2.4.35.4.orig/include/asm-ia64/signal.h
  115. +++ linux-2.4.35.4/include/asm-ia64/signal.h
  116. @@ -117,6 +117,12 @@
  117. #define SA_SHIRQ 0x04000000
  118. #define SA_PERCPU_IRQ 0x02000000
  119. +#ifdef CONFIG_NET_RANDOM
  120. +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
  121. +#else
  122. +#define SA_NET_RANDOM 0
  123. +#endif
  124. +
  125. #endif /* __KERNEL__ */
  126. #define SIG_BLOCK 0 /* for blocking signals */
  127. Index: linux-2.4.35.4/include/asm-m68k/signal.h
  128. ===================================================================
  129. --- linux-2.4.35.4.orig/include/asm-m68k/signal.h
  130. +++ linux-2.4.35.4/include/asm-m68k/signal.h
  131. @@ -116,8 +116,15 @@ typedef unsigned long sigset_t;
  132. #define SA_PROBE SA_ONESHOT
  133. #define SA_SAMPLE_RANDOM SA_RESTART
  134. #define SA_SHIRQ 0x04000000
  135. +
  136. +#ifdef CONFIG_NET_RANDOM
  137. +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
  138. +#else
  139. +#define SA_NET_RANDOM 0
  140. #endif
  141. +#endif /* __KERNEL__ */
  142. +
  143. #define SIG_BLOCK 0 /* for blocking signals */
  144. #define SIG_UNBLOCK 1 /* for unblocking signals */
  145. #define SIG_SETMASK 2 /* for setting the signal mask */
  146. Index: linux-2.4.35.4/include/asm-mips/signal.h
  147. ===================================================================
  148. --- linux-2.4.35.4.orig/include/asm-mips/signal.h
  149. +++ linux-2.4.35.4/include/asm-mips/signal.h
  150. @@ -111,6 +111,12 @@ typedef unsigned long old_sigset_t; /*
  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. Index: linux-2.4.35.4/include/asm-mips64/signal.h
  162. ===================================================================
  163. --- linux-2.4.35.4.orig/include/asm-mips64/signal.h
  164. +++ linux-2.4.35.4/include/asm-mips64/signal.h
  165. @@ -119,6 +119,12 @@ typedef unsigned int old_sigset_t32;
  166. #define SA_SAMPLE_RANDOM SA_RESTART
  167. #define SA_SHIRQ 0x02000000
  168. +#ifdef CONFIG_NET_RANDOM
  169. +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
  170. +#else
  171. +#define SA_NET_RANDOM 0
  172. +#endif
  173. +
  174. #endif /* __KERNEL__ */
  175. #define SIG_BLOCK 1 /* for blocking signals */
  176. Index: linux-2.4.35.4/include/asm-parisc/signal.h
  177. ===================================================================
  178. --- linux-2.4.35.4.orig/include/asm-parisc/signal.h
  179. +++ linux-2.4.35.4/include/asm-parisc/signal.h
  180. @@ -100,6 +100,12 @@
  181. #define SA_SAMPLE_RANDOM SA_RESTART
  182. #define SA_SHIRQ 0x04000000
  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. Index: linux-2.4.35.4/include/asm-ppc/signal.h
  192. ===================================================================
  193. --- linux-2.4.35.4.orig/include/asm-ppc/signal.h
  194. +++ linux-2.4.35.4/include/asm-ppc/signal.h
  195. @@ -111,6 +111,13 @@ typedef struct {
  196. #define SA_PROBE SA_ONESHOT
  197. #define SA_SAMPLE_RANDOM SA_RESTART
  198. #define SA_SHIRQ 0x04000000
  199. +
  200. +#ifdef CONFIG_NET_RANDOM
  201. +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
  202. +#else
  203. +#define SA_NET_RANDOM 0
  204. +#endif
  205. +
  206. #endif /* __KERNEL__ */
  207. #define SIG_BLOCK 0 /* for blocking signals */
  208. Index: linux-2.4.35.4/include/asm-s390/signal.h
  209. ===================================================================
  210. --- linux-2.4.35.4.orig/include/asm-s390/signal.h
  211. +++ linux-2.4.35.4/include/asm-s390/signal.h
  212. @@ -129,8 +129,15 @@ typedef unsigned long sigset_t;
  213. #define SA_SHIRQ 0x04000000
  214. #define SA_DOPATHGROUP 0x00100000
  215. #define SA_FORCE 0x00200000
  216. +
  217. +#ifdef CONFIG_NET_RANDOM
  218. +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
  219. +#else
  220. +#define SA_NET_RANDOM 0
  221. #endif
  222. +#endif /* __KERNEL__ */
  223. +
  224. #define SIG_BLOCK 0 /* for blocking signals */
  225. #define SIG_UNBLOCK 1 /* for unblocking signals */
  226. #define SIG_SETMASK 2 /* for setting the signal mask */
  227. Index: linux-2.4.35.4/include/asm-s390x/signal.h
  228. ===================================================================
  229. --- linux-2.4.35.4.orig/include/asm-s390x/signal.h
  230. +++ linux-2.4.35.4/include/asm-s390x/signal.h
  231. @@ -129,8 +129,15 @@ typedef unsigned long sigset_t;
  232. #define SA_SHIRQ 0x04000000
  233. #define SA_DOPATHGROUP 0x00100000
  234. #define SA_FORCE 0x00200000
  235. +
  236. +#ifdef CONFIG_NET_RANDOM
  237. +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
  238. +#else
  239. +#define SA_NET_RANDOM 0
  240. #endif
  241. +#endif /* __KERNEL__ */
  242. +
  243. #define SIG_BLOCK 0 /* for blocking signals */
  244. #define SIG_UNBLOCK 1 /* for unblocking signals */
  245. #define SIG_SETMASK 2 /* for setting the signal mask */
  246. Index: linux-2.4.35.4/include/asm-sh/signal.h
  247. ===================================================================
  248. --- linux-2.4.35.4.orig/include/asm-sh/signal.h
  249. +++ linux-2.4.35.4/include/asm-sh/signal.h
  250. @@ -107,8 +107,15 @@ typedef struct {
  251. #define SA_PROBE SA_ONESHOT
  252. #define SA_SAMPLE_RANDOM SA_RESTART
  253. #define SA_SHIRQ 0x04000000
  254. +
  255. +#ifdef CONFIG_NET_RANDOM
  256. +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
  257. +#else
  258. +#define SA_NET_RANDOM 0
  259. #endif
  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. Index: linux-2.4.35.4/include/asm-sparc/signal.h
  266. ===================================================================
  267. --- linux-2.4.35.4.orig/include/asm-sparc/signal.h
  268. +++ linux-2.4.35.4/include/asm-sparc/signal.h
  269. @@ -176,8 +176,15 @@ struct sigstack {
  270. #define SA_PROBE SA_ONESHOT
  271. #define SA_SAMPLE_RANDOM SA_RESTART
  272. #define SA_STATIC_ALLOC 0x80
  273. +
  274. +#ifdef CONFIG_NET_RANDOM
  275. +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
  276. +#else
  277. +#define SA_NET_RANDOM 0
  278. #endif
  279. +#endif /* __KERNEL__ */
  280. +
  281. /* Type of a signal handler. */
  282. #ifdef __KERNEL__
  283. typedef void (*__sighandler_t)(int, int, struct sigcontext *, char *);
  284. Index: linux-2.4.35.4/include/asm-sparc64/signal.h
  285. ===================================================================
  286. --- linux-2.4.35.4.orig/include/asm-sparc64/signal.h
  287. +++ linux-2.4.35.4/include/asm-sparc64/signal.h
  288. @@ -192,8 +192,15 @@ struct sigstack {
  289. #define SA_PROBE SA_ONESHOT
  290. #define SA_SAMPLE_RANDOM SA_RESTART
  291. #define SA_STATIC_ALLOC 0x80
  292. +
  293. +#ifdef CONFIG_NET_RANDOM
  294. +#define SA_NET_RANDOM SA_SAMPLE_RANDOM
  295. +#else
  296. +#define SA_NET_RANDOM 0
  297. #endif
  298. +#endif /* __KERNEL__ */
  299. +
  300. /* Type of a signal handler. */
  301. #ifdef __KERNEL__
  302. typedef void (*__sighandler_t)(int, struct sigcontext *);