Re: [PATCH net] Revert tcp: switch tcp_fastopen key generation to net_get_random_once

2015-06-18 Thread Eric Dumazet
On Thu, 2015-06-18 at 11:32 +0200, Hannes Frederic Sowa wrote: Hello Christoph, There does not seem to be a better way to handle this. We could try to make the call to kmalloc and crypto_alloc_cipher during bootup, and then generate the random value only on-the-fly (when the first TFO-SYN

Re: [PATCH net] Revert tcp: switch tcp_fastopen key generation to net_get_random_once

2015-06-18 Thread Christoph Paasch
On 18/06/15 - 04:14:13, Eric Dumazet wrote: On Thu, 2015-06-18 at 11:32 +0200, Hannes Frederic Sowa wrote: There does not seem to be a better way to handle this. We could try to make the call to kmalloc and crypto_alloc_cipher during bootup, and then generate the random value only

Re: [PATCH net] Revert tcp: switch tcp_fastopen key generation to net_get_random_once

2015-06-18 Thread Hannes Frederic Sowa
Hello Christoph, On Wed, 2015-06-17 at 17:28 -0700, Christoph Paasch wrote: This reverts commit 222e83d2e0aecb6a5e8d42b1a8d51332a1eba960. tcp_fastopen_reset_cipher really cannot be called from interrupt context. It allocates the tcp_fastopen_context with GFP_KERNEL and calls

[PATCH net] Revert tcp: switch tcp_fastopen key generation to net_get_random_once

2015-06-17 Thread Christoph Paasch
This reverts commit 222e83d2e0aecb6a5e8d42b1a8d51332a1eba960. tcp_fastopen_reset_cipher really cannot be called from interrupt context. It allocates the tcp_fastopen_context with GFP_KERNEL and calls crypto_alloc_cipher, which allocates all kind of stuff with GFP_KERNEL. Thus, we might sleep