[PATCH 4/4] crypto: algif_skcipher - User-space interface for skcipher operations

2010-11-26 Thread Herbert Xu
crypto: algif_skcipher - User-space interface for skcipher operations This patch adds the af_alg plugin for symmetric key ciphers, corresponding to the ablkcipher kernel operation type. Keys can optionally be set through the setsockopt interface. Once a sendmsg call occurs without MSG_MORE no fu

Re: [PATCH 4/4] crypto: algif_skcipher - User-space interface for skcipher operations

2010-11-26 Thread Herbert Xu
On Fri, Nov 19, 2010 at 05:51:36PM +0800, Herbert Xu wrote: > > Miroslave found quite a few more problems with the patch-set > so here is another revision with those problems resolved: OK two more bugs found and fixed so here is one more revision: * If recvmsg leaves bytes behind in the last SG

[PATCH 4/4] crypto: algif_skcipher - User-space interface for skcipher operations

2010-11-19 Thread Herbert Xu
crypto: algif_skcipher - User-space interface for skcipher operations This patch adds the af_alg plugin for symmetric key ciphers, corresponding to the ablkcipher kernel operation type. Keys can optionally be set through the setsockopt interface. Once a sendmsg call occurs without MSG_MORE no fu

Re: [PATCH 4/4] crypto: algif_skcipher - User-space interface for skcipher operations

2010-11-19 Thread Herbert Xu
On Mon, Nov 15, 2010 at 03:55:49PM +0100, Martin Willi wrote: > > > This patch adds the af_alg plugin for symmetric key ciphers, > > corresponding to the ablkcipher kernel operation type. > > I can confirm that the newest patch fixes the page leak. > > Tested-by: Martin Willi Thanks Martin! M

Re: [PATCH 4/4] crypto: algif_skcipher - User-space interface for skcipher operations

2010-11-15 Thread Martin Willi
> This patch adds the af_alg plugin for symmetric key ciphers, > corresponding to the ablkcipher kernel operation type. I can confirm that the newest patch fixes the page leak. Tested-by: Martin Willi -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a m

[PATCH 4/4] crypto: algif_skcipher - User-space interface for skcipher operations

2010-11-15 Thread Herbert Xu
crypto: algif_skcipher - User-space interface for skcipher operations This patch adds the af_alg plugin for symmetric key ciphers, corresponding to the ablkcipher kernel operation type. Keys can optionally be set through the setsockopt interface. Once a sendmsg call occurs without MSG_MORE no fu

Re: [PATCH 4/4] crypto: algif_skcipher - User-space interface for skcipher operations

2010-11-15 Thread Herbert Xu
On Mon, Nov 08, 2010 at 10:10:20AM +0100, Martin Willi wrote: > > The test program below runs 1000 encryptions: > > # grep nr_free /proc/vmstat > nr_free_pages 11031 > # ./test Thanks, Miroslav identified a bogosity where if we're not doing a whole page then the last sgl pointer is off by one w

Re: [PATCH 4/4] crypto: algif_skcipher - User-space interface for skcipher operations

2010-11-08 Thread Martin Willi
> Hmm, can you show me your test program and how you determined > that it was leaking pages? The test program below runs 1000 encryptions: # grep nr_free /proc/vmstat nr_free_pages 11031 # ./test ... # grep nr_free /proc/vmstat nr_free_pages 10026 # ./test ... # grep nr_free /proc/vmstat nr_f

Re: [PATCH 4/4] crypto: algif_skcipher - User-space interface for skcipher operations

2010-11-06 Thread Herbert Xu
Martin Willi wrote: > Hi Herbert, > > I did a proof-of-concept implementation for our crypto library, the > interface looks good so far. All our hash, hmac, xcbc and cipher test > vectors matched. > >> + sg_assign_page(sg + i, alloc_page(GFP_KERNEL)); > > Every skcipher oper

Re: [PATCH 4/4] crypto: algif_skcipher - User-space interface for skcipher operations

2010-11-06 Thread Martin Willi
Hi Herbert, I did a proof-of-concept implementation for our crypto library, the interface looks good so far. All our hash, hmac, xcbc and cipher test vectors matched. > + sg_assign_page(sg + i, alloc_page(GFP_KERNEL)); Every skcipher operation leaks memory on my box (this pag

Re: [PATCH 4/4] crypto: algif_skcipher - User-space interface for skcipher operations

2010-11-04 Thread David Miller
From: Herbert Xu Date: Thu, 04 Nov 2010 12:36:20 -0500 > crypto: algif_skcipher - User-space interface for skcipher operations > > This patch adds the af_alg plugin for symmetric key ciphers, > corresponding to the ablkcipher kernel operation type. > > Keys can optionally be set through the set

[PATCH 4/4] crypto: algif_skcipher - User-space interface for skcipher operations

2010-11-04 Thread Herbert Xu
crypto: algif_skcipher - User-space interface for skcipher operations This patch adds the af_alg plugin for symmetric key ciphers, corresponding to the ablkcipher kernel operation type. Keys can optionally be set through the setsockopt interface. Once a sendmsg call occurs without MSG_MORE no fu

[PATCH 4/4] crypto: algif_skcipher - User-space interface for skcipher operations

2010-10-19 Thread Herbert Xu
crypto: algif_skcipher - User-space interface for skcipher operations This patch adds the af_alg plugin for symmetric key ciphers, corresponding to the ablkcipher kernel operation type. Keys can optionally be set through the setsockopt interface. Once a sendmsg call occurs without MSG_MORE no fu