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

2015-10-15 Thread David Howells
Sowmini Varadhan wrote: > 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 unal

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

2015-10-14 Thread Herbert Xu
On Tue, Oct 13, 2015 at 10:54:01AM -0400, Sowmini Varadhan wrote: > > 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[6a5

[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: 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

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 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-12 Thread David Miller
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 be the case. The sparc SHA assembler can handle arbitrary alignment. --

Re: unaligned access in pkcs7_verify

2015-10-12 Thread Sowmini Varadhan
On (10/12/15 21:32), Herbert Xu wrote: > Thanks. We have two bugs here. First of all 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 di

Re: unaligned access in pkcs7_verify

2015-10-12 Thread Herbert Xu
On Thu, Oct 08, 2015 at 10:43:43AM -0400, Sowmini Varadhan wrote: > On (10/08/15 21:15), Herbert Xu wrote: > > > desc_size = crypto_shash_descsize(tfm) + sizeof(*desc); > > > - sinfo->sig.digest_size = digest_size = > > > crypto_shash_digestsize(tfm); > > > + sinfo->sig.digest_

Re: unaligned access in pkcs7_verify

2015-10-08 Thread Sowmini Varadhan
On (10/08/15 21:15), Herbert Xu wrote: > > desc_size = crypto_shash_descsize(tfm) + sizeof(*desc); > > - sinfo->sig.digest_size = digest_size = crypto_shash_digestsize(tfm); > > + sinfo->sig.digest_size = digest_size = > > + ALIGN(crypto_shash_digestsize(tfm), siz

Re: unaligned access in pkcs7_verify

2015-10-08 Thread Herbert Xu
On Fri, Oct 02, 2015 at 02:00:14PM +, Sowmini Varadhan wrote: > > I'm getting a lot of unaligned access messages each time I > do "modprobe [-r] " on sparc: > > Kernel unaligned access at TPC[6ad9b4] pkcs7_verify+0x1ec/0x5e0 > Kernel unaligned access at TPC[6a5484] crypto_shash_finup+0xc/0x5

unaligned access in pkcs7_verify

2015-10-02 Thread Sowmini Varadhan
Hi, I'm getting a lot of unaligned access messages each time I do "modprobe [-r] " on sparc: Kernel unaligned access at TPC[6ad9b4] pkcs7_verify+0x1ec/0x5e0 Kernel unaligned access at TPC[6a5484] crypto_shash_finup+0xc/0x5c Kernel unaligned access at TPC[6a5390] crypto_shash_update+0xc/0x54 Ker