Re: [PATCH 1/2 v2] scripts/coccinelle: catch freeing cryptographic structures via kfree

2014-11-19 Thread Julia Lawall
+// Comments: There are false positives in crypto/ where they are actually freed. I didn't really understand this comment. I ran the semantic patch and got around 10 results, but it wasn't clear to me how to see which were false positives. I would suggest to extend the rule a little bit to

Re: [PATCH] crypto: Fix a typo in ahash.c

2014-11-19 Thread Herbert Xu
On Mon, Nov 17, 2014 at 06:52:40PM +, Terence Eden wrote: From: Terence Eden terence.e...@gmail.com its == something belong to it. it's == it is, it has, it was, etc. Sorry - just bugged me as I was reading the code. (Resubmitting - hopefully correctly!) Signed-off-by: Terence Eden

Re: [PATCH 1/2 v2] scripts/coccinelle: catch freeing cryptographic structures via kfree

2014-11-19 Thread Konstantin Khlebnikov
On Wed, Nov 19, 2014 at 12:41 PM, Julia Lawall julia.law...@lip6.fr wrote: +// Comments: There are false positives in crypto/ where they are actually freed. I didn't really understand this comment. I ran the semantic patch and got around 10 results, but it wasn't clear to me how to see which

[PATCH RESEND 1/4] hwrng: atmel: use clk_prepapre_enable/_disable_unprepare

2014-11-19 Thread Boris Brezillon
Use clk_prepare_enable/_disable_unprepare instead of clk_enable/disable to work properly with the CCF. Signed-off-by: Boris Brezillon boris.brezil...@free-electrons.com Acked-by: Peter Korsgaard pe...@korsgaard.com Acked-by: Nicolas Ferre nicolas.fe...@atmel.com ---

[PATCH RESEND 2/4] hwrng: atmel: add DT support

2014-11-19 Thread Boris Brezillon
Add DT support. Make the driver depend on CONFIG_OF as at91sam9g45 was the only SoC making use of the TRNG block and this SoC is now fully migrated to DT. Signed-off-by: Boris Brezillon boris.brezil...@free-electrons.com Acked-by: Nicolas Ferre nicolas.fe...@atmel.com ---

[PATCH RESEND 0/4] ARM: at91: remove at91sam9g45/9m10 legacy board support

2014-11-19 Thread Boris Brezillon
Hello, This series adds DT support for the TRNG (True Random Generator) block and adds missing trng nodes to dtsi files. Best Regards, Boris Boris Brezillon (4): hwrng: atmel: use clk_prepapre_enable/_disable_unprepare hwrng: atmel: add DT support hwrng: atmel: Add TRNG DT binding doc

[PATCH RESEND 3/4] hwrng: atmel: Add TRNG DT binding doc

2014-11-19 Thread Boris Brezillon
Document DT bindings of Atmel's TRNG (True Random Number Generator) IP. Signed-off-by: Boris Brezillon boris.brezil...@free-electrons.com Acked-by: Nicolas Ferre nicolas.fe...@atmel.com --- Documentation/devicetree/bindings/hwrng/atmel-trng.txt | 16 1 file changed, 16

[PATCH RESEND 4/4] ARM: at91/dt: add trng node

2014-11-19 Thread Boris Brezillon
Add a DT node for the TRNG (True Random Number Generator) block. Keep this block enabled as it does not depend on any external connection, and thus should be available on all boards. Signed-off-by: Boris Brezillon boris.brezil...@free-electrons.com Acked-by: Nicolas Ferre nicolas.fe...@atmel.com

Re: [PATCH RESEND 0/4] ARM: at91: remove at91sam9g45/9m10 legacy board support

2014-11-19 Thread Nicolas Ferre
On 19/11/2014 17:07, Boris Brezillon : Hello, This series adds DT support for the TRNG (True Random Generator) block and adds missing trng nodes to dtsi files. Nitpicking: subject of this cover letter seems not good ;-) Herbert, do you think you can take this series yourself or do I have to

Re: [PATCH RESEND 0/4] hrng: atmel: add DT support

2014-11-19 Thread Boris Brezillon
On Wed, 19 Nov 2014 17:15:47 +0100 Nicolas Ferre nicolas.fe...@atmel.com wrote: On 19/11/2014 17:07, Boris Brezillon : Hello, This series adds DT support for the TRNG (True Random Generator) block and adds missing trng nodes to dtsi files. Nitpicking: subject of this cover letter

[PATCH] arm64: crypto: Add ARM64 CRC32 hw accelerated module

2014-11-19 Thread Yazen Ghannam
This module registers a crc32 algorithm and a crc32c algorithm that use the optional CRC32 and CRC32C instructions in ARMv8. Tested on AMD Seattle. Improvement compared to crc32c-generic algorithm: TCRYPT CRC32C speed test shows ~450% speedup. Simple dd write tests to btrfs filesystem show ~30%

Re: [PATCH RESEND 0/4] hrng: atmel: add DT support

2014-11-19 Thread Nicolas Ferre
On 19/11/2014 17:18, Boris Brezillon : On Wed, 19 Nov 2014 17:15:47 +0100 Nicolas Ferre nicolas.fe...@atmel.com wrote: On 19/11/2014 17:07, Boris Brezillon : Hello, This series adds DT support for the TRNG (True Random Generator) block and adds missing trng nodes to dtsi files.

Re: [PATCH RESEND 0/4] hrng: atmel: add DT support

2014-11-19 Thread Boris Brezillon
On Wed, 19 Nov 2014 18:35:56 +0100 Nicolas Ferre nicolas.fe...@atmel.com wrote: On 19/11/2014 17:18, Boris Brezillon : On Wed, 19 Nov 2014 17:15:47 +0100 Nicolas Ferre nicolas.fe...@atmel.com wrote: On 19/11/2014 17:07, Boris Brezillon : Hello, This series adds DT support for the

RE: [PATCH V2 0/2] crypto: Add support for the IMG hash accelerator

2014-11-19 Thread James Hartley
Hi All, Apologies for this approach, but although my email replies seem to get through to the mailing list, my patches dont (although they do appear to land on the device tree list). I'm sure Herbert will have received it in his inbox, but for anyone else who might want to comment on the

[PATCH] bfin_crc: don't include linux/unaligned/access_ok.h

2014-11-19 Thread Johannes Berg
From: Johannes Berg johannes.b...@intel.com This is a specific implementation, asm/unaligned.h is the multiplexer that has the arch-specific knowledge of which of the implementations needs to be used, so include that. Signed-off-by: Johannes Berg johannes.b...@intel.com ---

Re: [PATCH v2 02/10] crypto: AF_ALG: user space interface for cipher info

2014-11-19 Thread Stephan Mueller
Am Dienstag, 18. November 2014, 22:08:23 schrieb Herbert Xu: Hi Herbert, Steffen, On Sun, Nov 16, 2014 at 03:24:25AM +0100, Stephan Mueller wrote: The AF_ALG interface allows normal cipher (hash, encrypt, decrypt). However, it does not allow user space to obtain the following generic

Re: [PATCH RESEND 0/4] ARM: at91: remove at91sam9g45/9m10 legacy board support

2014-11-19 Thread Herbert Xu
On Wed, Nov 19, 2014 at 05:15:47PM +0100, Nicolas Ferre wrote: On 19/11/2014 17:07, Boris Brezillon : Hello, This series adds DT support for the TRNG (True Random Generator) block and adds missing trng nodes to dtsi files. Nitpicking: subject of this cover letter seems not good ;-)

Re: [PATCH v2 02/10] crypto: AF_ALG: user space interface for cipher info

2014-11-19 Thread Herbert Xu
On Thu, Nov 20, 2014 at 05:03:24AM +0100, Stephan Mueller wrote: crypto_user cannot be applied to the currently active cipher that one has open with AF_ALG. For getting information, one has to call crypto_user with the cra_driver_name of a cipher. (Why is that limitation, btw (see

Re: [PATCH v2 02/10] crypto: AF_ALG: user space interface for cipher info

2014-11-19 Thread Stephan Mueller
Am Donnerstag, 20. November 2014, 12:07:48 schrieb Herbert Xu: Hi Herbert, On Thu, Nov 20, 2014 at 05:03:24AM +0100, Stephan Mueller wrote: crypto_user cannot be applied to the currently active cipher that one has open with AF_ALG. For getting information, one has to call crypto_user with

Re: [PATCH v2 02/10] crypto: AF_ALG: user space interface for cipher info

2014-11-19 Thread Herbert Xu
On Thu, Nov 20, 2014 at 05:14:49AM +0100, Stephan Mueller wrote: Or we have to patch crypto_user to allow the use of cra_name -- which is currently explicitly disabled. In what way is it disabled? Cheers, -- Email: Herbert Xu herb...@gondor.apana.org.au Home Page:

Re: [PATCH v2 02/10] crypto: AF_ALG: user space interface for cipher info

2014-11-19 Thread Stephan Mueller
Am Donnerstag, 20. November 2014, 12:18:24 schrieb Herbert Xu: Hi Herbert, On Thu, Nov 20, 2014 at 05:14:49AM +0100, Stephan Mueller wrote: Or we have to patch crypto_user to allow the use of cra_name -- which is currently explicitly disabled. In what way is it disabled? Here is the

crypto: user - Allow get request with empty driver name

2014-11-19 Thread Herbert Xu
On Thu, Nov 20, 2014 at 05:23:23AM +0100, Stephan Mueller wrote: Here is the code: static int crypto_report(struct sk_buff *in_skb, struct nlmsghdr *in_nlh, struct nlattr **attrs) { ... if (!p-cru_driver_name[0]) return -EINVAL; OK let's fix

Re: [PATCH v2 02/10] crypto: AF_ALG: user space interface for cipher info

2014-11-19 Thread Steffen Klassert
On Thu, Nov 20, 2014 at 05:03:24AM +0100, Stephan Mueller wrote: Am Dienstag, 18. November 2014, 22:08:23 schrieb Herbert Xu: Hi Herbert, Steffen, We already have crypto_user so you should be extending that to cover what's missing. After playing a bit with the interface, I think it

Re: crypto: user - Allow get request with empty driver name

2014-11-19 Thread Steffen Klassert
On Thu, Nov 20, 2014 at 12:46:50PM +0800, Herbert Xu wrote: On Thu, Nov 20, 2014 at 05:23:23AM +0100, Stephan Mueller wrote: Here is the code: static int crypto_report(struct sk_buff *in_skb, struct nlmsghdr *in_nlh, struct nlattr **attrs) { ... if

Re: [PATCH] crypto: aesni-intel - avoid IPsec re-ordering

2014-11-19 Thread Steffen Klassert
On Sat, Nov 15, 2014 at 11:15:50AM +0800, Herbert Xu wrote: On Wed, Nov 12, 2014 at 09:41:38AM +0100, Steffen Klassert wrote: Everything below the local_bh_enable() should not run in atomic context as the subsequent functions may set the CRYPTO_TFM_REQ_MAY_SLEEP flag. Actually I'm

Re: [PATCH] crypto: aesni-intel - avoid IPsec re-ordering

2014-11-19 Thread Herbert Xu
On Thu, Nov 20, 2014 at 08:26:51AM +0100, Steffen Klassert wrote: What about to use a fallback algorithm that does not need to touch FPU/SIMD in such cases? We would not need cryptd at all and it would keep the requests in the right order because we don't defer them. This would be bad for

Re: crypto: user - Allow get request with empty driver name

2014-11-19 Thread Herbert Xu
On Thu, Nov 20, 2014 at 08:11:42AM +0100, Steffen Klassert wrote: I think this is not sufficient, crypto_alg_match() will now return the first algorithm in crypto_alg_list that matches cra_name. We would need to extend crypto_alg_match() to return the algorithm with the highest priority in