Re: [PATCH 0/6] crypto: arm64 - big endian fixes

2016-10-10 Thread Herbert Xu
On Mon, Oct 10, 2016 at 12:26:00PM +0100, Ard Biesheuvel wrote: > > /* This piece of crap needs to disappear into per-type test hooks. */ > if (!((type ^ CRYPTO_ALG_TYPE_BLKCIPHER) & > CRYPTO_ALG_TYPE_BLKCIPHER_MASK) && !(type & CRYPTO_ALG_GENIV) && >((alg->cra_flags & CRYPTO_ALG_TYPE_MAS

Re: Observed a ecryptFS crash

2016-10-10 Thread Tyler Hicks
On 09/29/2016 07:29 AM, liushuoran wrote: > Hi Tyhicks, > > We observed a ecryptFS crash occasionally in Linux kernel 4.1.18. The call > trace is attached below. Is it a known issue? Look forward to hearing from > you. Thanks in advance! It isn't known to me but I'm rarely testing eCryptfs with

Re: [PATCH] crypto: cmac - fix alignment of 'consts'

2016-10-10 Thread Eric Biggers
On Mon, Oct 10, 2016 at 10:51:14AM -0700, Joe Perches wrote: > > Hey Eric. > > I don't see any PTR_ALIGN uses in crypto/ or drivers/crypto/ that > use a bitwise or, just mask + 1, but I believe the effect is the > same. Anyway, your choice, but I think using min is clearer. > > cheers, Joe Usu

Re: [PATCH] crypto: cmac - fix alignment of 'consts'

2016-10-10 Thread Joe Perches
On Mon, 2016-10-10 at 10:37 -0700, Eric Biggers wrote: > On Mon, Oct 10, 2016 at 10:29:55AM -0700, Joe Perches wrote: > > On Mon, 2016-10-10 at 10:15 -0700, Eric Biggers wrote: > > > The per-transform 'consts' array is accessed as __be64 in > > > crypto_cmac_digest_setkey() but was only guaranteed

Re: [PATCH] crypto: cmac - fix alignment of 'consts'

2016-10-10 Thread Eric Biggers
On Mon, Oct 10, 2016 at 10:29:55AM -0700, Joe Perches wrote: > On Mon, 2016-10-10 at 10:15 -0700, Eric Biggers wrote: > > The per-transform 'consts' array is accessed as __be64 in > > crypto_cmac_digest_setkey() but was only guaranteed to be aligned to > > __alignof__(long). Fix this by aligning i

Re: [PATCH] crypto: cmac - fix alignment of 'consts'

2016-10-10 Thread Joe Perches
On Mon, 2016-10-10 at 10:15 -0700, Eric Biggers wrote: > The per-transform 'consts' array is accessed as __be64 in > crypto_cmac_digest_setkey() but was only guaranteed to be aligned to > __alignof__(long). Fix this by aligning it to __alignof__(__be64). [] > diff --git a/crypto/cmac.c b/crypto/cm

[PATCH] crypto: cmac - fix alignment of 'consts'

2016-10-10 Thread Eric Biggers
The per-transform 'consts' array is accessed as __be64 in crypto_cmac_digest_setkey() but was only guaranteed to be aligned to __alignof__(long). Fix this by aligning it to __alignof__(__be64). Signed-off-by: Eric Biggers --- crypto/cmac.c | 13 + 1 file changed, 9 insertions(+), 4

[PATCH] crypto: cmac - return -EINVAL if block size is unsupported

2016-10-10 Thread Eric Biggers
cmac_create() previously returned 0 if a cipher with a block size other than 8 or 16 bytes was specified. It should return -EINVAL instead. Granted, this doesn't actually change any behavior because cryptomgr currently ignores any return value other than -EAGAIN from template ->create() functions.

[PATCH] crypto: ccp - change bitfield type to unsigned ints

2016-10-10 Thread Gary R Hook
Bit fields are not sensitive to endianness, so use a transparent standard data type Signed-off-by: Gary R Hook --- drivers/crypto/ccp/ccp-dev.h | 42 +- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/drivers/crypto/ccp/ccp-dev.h b/driver

Re: [PATCH 0/6] crypto: arm64 - big endian fixes

2016-10-10 Thread Ard Biesheuvel
On 9 October 2016 at 18:42, Ard Biesheuvel wrote: > As it turns out, none of the accelerated crypto routines under > arch/arm64/crypto > currently work, or have ever worked correctly when built for big endian. So > this > series fixes all of them. > > Each of these patches carries a fixes tag, a