[PATCH] crypto: ccm - remove goto

2015-10-13 Thread Sudip Mukherjee
Instead of using goto and jumping to a label and then returning from there, lets return directly. The label out: is not used from anywhere else in the code. Signed-off-by: Sudip Mukherjee --- crypto/ccm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crypto/ccm.c b/crypto

Crypto Fixes for 4.3

2015-10-13 Thread Herbert Xu
Hi Linus: This push fixes the following issues: * Fix AVX detection to prevent use of non-existent AESNI. * Some SPARC ciphers did not set their IV size which may lead to memory corruption. Please pull from git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6.git Ben Hutchings

Re: [PATCH v3b 5/5] crypto: marvell: factor out common import/export functions

2015-10-13 Thread Herbert Xu
On Sun, Oct 11, 2015 at 02:55:05PM +0800, Herbert Xu wrote: > On Sat, Oct 10, 2015 at 05:17:54PM +0100, Russell King - ARM Linux wrote: > > > > I _also_ notice that despite having the ARM assembly crypto functions > > enabled and built-in to the kernel, they don't appear in /proc/crypto - > > and t

Re: unaligned access in pkcs7_verify

2015-10-13 Thread Sowmini Varadhan
On (10/12/15 21:32), Herbert Xu wrote: > > .. pkcs7_verify definitely > shouldn't place the structure after the digest without aligning the > pointer. So something like your patch is needed (but please use > alignof instead of sizeof). Also don't put in digest_size but > instead align the pointe

Re: unaligned access in pkcs7_verify

2015-10-13 Thread Herbert Xu
On Tue, Oct 13, 2015 at 09:29:28AM -0400, Sowmini Varadhan wrote: > > diff --git a/crypto/asymmetric_keys/pkcs7_verify.c > b/crypto/asymmetric_keys/pkcs7_verify.c > index d20c0b4..958ac01 100644 > --- a/crypto/asymmetric_keys/pkcs7_verify.c > +++ b/crypto/asymmetric_keys/pkcs7_verify.c > @@ -46,1

Re: unaligned access in pkcs7_verify

2015-10-13 Thread Herbert Xu
On Mon, Oct 12, 2015 at 07:06:34AM -0700, David Miller wrote: > From: Herbert Xu > Date: Mon, 12 Oct 2015 21:32:09 +0800 > > > The sparc sha algorithms themselves need to declare the alignment > > that they require. Currently they claim to be able to handle any > > alignment which appears to not

[PATCH] crypto: Allow drivers to build if COMPILE_TEST is enabled

2015-10-13 Thread Javier Martinez Canillas
These drivers only have runtime but no build time dependencies so can be built for testing purposes if the Kconfig COMPILE_TEST option is enabled. This is useful to have more build coverage and make sure that drivers are not affected by changes that could cause build regressions. Signed-off-by: J

Re: [PATCH v3b 5/5] crypto: marvell: factor out common import/export functions

2015-10-13 Thread Russell King - ARM Linux
On Tue, Oct 13, 2015 at 09:00:48PM +0800, Herbert Xu wrote: > On Sun, Oct 11, 2015 at 02:55:05PM +0800, Herbert Xu wrote: > > On Sat, Oct 10, 2015 at 05:17:54PM +0100, Russell King - ARM Linux wrote: > > > > > > I _also_ notice that despite having the ARM assembly crypto functions > > > enabled and

Re: [PATCH v3b 5/5] crypto: marvell: factor out common import/export functions

2015-10-13 Thread Russell King - ARM Linux
On Tue, Oct 13, 2015 at 09:57:22PM +0800, Herbert Xu wrote: > On Tue, Oct 13, 2015 at 02:55:18PM +0100, Russell King - ARM Linux wrote: > > > > Given it's size so far, I'm not sure it makes much sense to backport > > any of these fixes to stable; I think maybe we should just say "okay, > > before t

Re: [PATCH v3b 5/5] crypto: marvell: factor out common import/export functions

2015-10-13 Thread Herbert Xu
On Tue, Oct 13, 2015 at 02:55:18PM +0100, Russell King - ARM Linux wrote: > > Given it's size so far, I'm not sure it makes much sense to backport > any of these fixes to stable; I think maybe we should just say "okay, > before these fixes, it's just broken." OK as long as your first patch goes in

Re: [PATCH v3b 5/5] crypto: marvell: factor out common import/export functions

2015-10-13 Thread Herbert Xu
On Tue, Oct 13, 2015 at 02:59:47PM +0100, Russell King - ARM Linux wrote: > > It will disable the Marvell driver, along with the SW implementations in > arch/arm/crypto/ which don't set .statesize, .import and .export. I > would not be surprised if it also affects others too. As I said earlier I'

Re: [PATCH v3 1/5] crypto: ensure algif_hash does not pass a zero-sized state

2015-10-13 Thread Herbert Xu
On Fri, Oct 09, 2015 at 08:43:33PM +0100, Russell King wrote: > If the algorithm passed a zero statesize, do not pass a valid pointer > into the export/import functions. Passing a valid pointer covers up > bugs in driver code which then go on to smash the kernel stack. > Instead, pass NULL, which

[PATCH] crypto/pkcs7_verify: Fix unaligned access in pkcs7_verify()

2015-10-13 Thread Sowmini Varadhan
On sparc, we see unaligned access messages on each modprobe[-r]: Kernel unaligned access at TPC[6ad9b4] pkcs7_verify [..] Kernel unaligned access at TPC[6a5484] crypto_shash_finup [..] Kernel unaligned access at TPC[6a5390] crypto_shash_update [..] Kernel unaligned access at TPC[10150308] sha1_sp

Re: Crypto Fixes for 4.3

2015-10-13 Thread Linus Torvalds
On Tue, Oct 13, 2015 at 5:17 AM, Herbert Xu wrote: > > This push fixes the following issues: > > * Fix AVX detection to prevent use of non-existent AESNI. > * Some SPARC ciphers did not set their IV size which may lead > to memory corruption. Hmm. It looks like you also quietly added a ahash fi

Re: [PATCH] crypto: Allow drivers to build if COMPILE_TEST is enabled

2015-10-13 Thread kbuild test robot
Hi Javier, [auto build test WARNING on cryptodev/master -- if it's inappropriate base, please suggest rules for selecting the more suitable base] url: https://github.com/0day-ci/linux/commits/Javier-Martinez-Canillas/crypto-Allow-drivers-to-build-if-COMPILE_TEST-is-enabled/20151013-2

Re: Crypto Fixes for 4.3

2015-10-13 Thread Herbert Xu
On Tue, Oct 13, 2015 at 10:23:39AM -0700, Linus Torvalds wrote: > > Hmm. It looks like you also quietly added a ahash fix this morning. > > I took it despite it not being described or in the diffstat. But > please send new pull requests when you update a branch you asked me to > pull. Oops, I sho

Re: Crypto Fixes for 4.3

2015-10-13 Thread Linus Torvalds
On Tue, Oct 13, 2015 at 6:03 PM, Herbert Xu wrote: > > Oops, I should've waited for you to pull the previous one before > pushing this one out. You might try to start using signed tags for your pull requests. That lessens this kind of issue, because now only will you write the tag message and the

Re: Crypto Fixes for 4.3

2015-10-13 Thread Herbert Xu
On Tue, Oct 13, 2015 at 07:00:20PM -0700, Linus Torvalds wrote: > > You might try to start using signed tags for your pull requests. That > lessens this kind of issue, because now only will you write the tag > message and then your signing key pass phrase etc, the tag would > specify one very parti