Re: [PATCH, RFC] random: introduce getrandom(2) system call

2014-07-22 Thread Hannes Frederic Sowa
Hello, On Di, 2014-07-22 at 00:44 -0400, Theodore Ts'o wrote: On Tue, Jul 22, 2014 at 03:02:20AM +0200, Hannes Frederic Sowa wrote: Ted, would it make sense to specifiy a 512 byte upper bound limit for random entropy extraction (I am not yet convinced to do that for urandom) and in case

Re: [PATCH -v4] random: introduce getrandom(2) system call

2014-07-22 Thread Rolf Eike Beer
EAGAIN The requested entropy was not available, and the getentropy(2) would have blocked if GRND_BLOCK flag was set. I think either and the call to getentropy(2) or and getentropy(2) here. Greetings, Eike -- To unsubscribe from this

[GIT PULL] Keyrings and asymmetric keys patches for 3.17

2014-07-22 Thread David Howells
: git diff keys-next-20140717 keys-next-20140722 | diffstat keys.txt |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) The component subsets are: (1) Tag keys-preparse-1-20140722 A set of patches that mostly convert extant key types to perform preparsing to make

Re: [PATCH] crypto: caam - fix DECO RSR polling

2014-07-22 Thread Kim Phillips
On Mon, 21 Jul 2014 16:03:21 +0300 Horia Geanta horia.gea...@freescale.com wrote: RSR (Request Source Register) is not used when virtualization is disabled, thus don't poll for Valid bit. Besides this, if used, timeout has to be reinitialized. Signed-off-by: Horia Geanta

[PATCH v5 0/7] crypto: SHA1 multibuffer implementation

2014-07-22 Thread Tim Chen
Herbert, I've updated my implementation from v4 to have the multi-buffer daemon flush the jobs if there're no other jobs running on the cpu. The flusher logic is reorganized so it is contained in mcryptd per Peter's feedback. The multi-buffer crypto daemon now directly takes advantage of the cpu

[PATCH v5 2/7] crypto: SHA1 multibuffer crypto hash infrastructure

2014-07-22 Thread Tim Chen
This patch introduces the multi-buffer crypto daemon which is responsible for submitting crypto jobs in a work queue to the responsible multi-buffer crypto algorithm. The idea of the multi-buffer algorihtm is to put data streams from multiple jobs in a wide (AVX2) register and then take advantage

[PATCH v5 6/7] crypto: SHA1 multibuffer crypto computation (x8 AVX2)

2014-07-22 Thread Tim Chen
This patch introduces the assembly routines to do SHA1 computation on buffers belonging to serveral jobs at once. The assembly routines are optimized with AVX2 instructions that have 8 data lanes and using AVX2 registers. Signed-off-by: Tim Chen tim.c.c...@linux.intel.com ---

[PATCH v5 7/7] crypto: SHA1 multibuffer scheduler

2014-07-22 Thread Tim Chen
This patch introduces the multi-buffer scheduler which is responsible for submitting scatter-gather buffers from several SHA1 jobs to the multi-buffer algorithm. It also contains the flush routine to that's called by the crypto daemon to complete the job when no new jobs arrive before the

[PATCH v5 3/7] crypto: SHA1 multibuffer crypto opportunistic flush

2014-07-22 Thread Tim Chen
The crypto daemon can take advantage of available cpu cycles to flush any unfinished jobs if it is the only task running on the cpu, and there are no more crypto jobs to process. Signed-off-by: Tim Chen tim.c.c...@linux.intel.com --- crypto/mcryptd.c | 39 ---

[PATCH v5 1/7] sched: Add function single_task_running to let a task check if it is the only task running on a cpu

2014-07-22 Thread Tim Chen
This function will help an async task processing batched jobs from workqueue decide if it wants to keep processing on more chunks of batched work that can be delayed, or to accumulate more work for more efficient batched processing later. If no other tasks are running on the cpu, it can take

Re: [PATCH 01/10] crypto: testmgr - avoid DMA mapping from text, rodata, stack

2014-07-22 Thread Kim Phillips
On Fri, 11 Jul 2014 15:34:46 +0300 Horia Geanta horia.gea...@freescale.com wrote: +++ b/crypto/testmgr.c @@ -198,13 +198,20 @@ static int __test_hash(struct crypto_ahash *tfm, struct hash_testvec *template, const char *algo = crypto_tfm_alg_driver_name(crypto_ahash_tfm(tfm));

Re: [PATCH, RFC] random: introduce getrandom(2) system call

2014-07-22 Thread Theodore Ts'o
On Tue, Jul 22, 2014 at 11:49:52AM +0200, Hannes Frederic Sowa wrote: I think a lot of checks are of the type if (getrandom() 0), so this actually was the kind of programming errors I wanted to guard against. Also, on some systems it is very likely that we return a short write to user