Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Nathan Royce <nroycea+kernel@gmail.com>,
	davem@davemloft.net, linux-crypto@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: XTS Crypto Not Found In /proc/crypto Even After Compiled for 4.10.1.
Date: Sat, 8 Apr 2017 14:23:23 +0200	[thread overview]
Message-ID: <20170408122323.x34ytemitl7h7rzz@kozik-lap> (raw)
In-Reply-To: <20170408020246.GA4815@gondor.apana.org.au>

On Sat, Apr 08, 2017 at 10:02:46AM +0800, Herbert Xu wrote:
> On Thu, Apr 06, 2017 at 05:54:14PM +0800, Herbert Xu wrote:
> > On Mon, Mar 13, 2017 at 07:06:01PM +0200, Krzysztof Kozlowski wrote:
> > >
> > > I bisected this to commit f1c131b45410 ("crypto: xts - Convert to
> > > skcipher"). The s5p-sss driver stays the same... but the xts changes and
> > > as a result we have a NULL pointer dereference (actually of value
> > > 00000004):
> > > [   18.930195] Unable to handle kernel NULL pointer dereference at virtual address 00000004
> > > ...
> > > [   18.972325] [<c0313c98>] (post_crypt) from [<c031408c>] (decrypt_done+0x4c/0x54)
> > > [   18.972343] [<c031408c>] (decrypt_done) from [<c056309c>] (s5p_aes_interrupt+0x1bc/0x208)
> > > [   18.972360] [<c056309c>] (s5p_aes_interrupt) from [<c0164930>] (irq_thread_fn+0x1c/0x54)
> > > 
> > > Any hints?
> > 
> > I haven't found any smoking guns, but the locking between the
> > tasklet and the IRQ routine looks suspect.  First of all the
> > tasklet is modifying the dev structure without holding any locks.
> 
> I think I see the problem.  Could you please try this patch and
> let me know if it fixes the crash?

Yes, fixed! Thanks.
Tested on Odroid XU3 with following script:
https://github.com/krzk/tools/blob/master/tests/s5p-sss-cryptsetup.sh

Tested-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

  reply	other threads:[~2017-04-08 12:23 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-06 16:18 XTS Crypto Not Found In /proc/crypto Even After Compiled for 4.10.1 Nathan Royce
2017-03-06 17:35 ` Krzysztof Kozlowski
2017-03-06 21:29   ` Nathan Royce
2017-03-08 17:45     ` Krzysztof Kozlowski
2017-03-08 21:15       ` Krzysztof Kozlowski
2017-03-09 11:16         ` Nathan Royce
2017-03-10 18:06           ` Krzysztof Kozlowski
2017-03-10 21:44             ` Nathan Royce
2017-03-12 19:13               ` Krzysztof Kozlowski
2017-03-13 17:06                 ` Krzysztof Kozlowski
2017-03-14  9:20                   ` Herbert Xu
2017-04-06  9:54                   ` Herbert Xu
2017-04-08  2:02                     ` Herbert Xu
2017-04-08 12:23                       ` Krzysztof Kozlowski [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-03-03 10:36 Nathan Royce
2017-03-03 12:04 ` Herbert Xu
2017-03-03 14:08   ` Nathan Royce
     [not found] <CALaQ_hoZ6wh-H_NNoT80r6kthvFpL05zNWr7upVqispknXMEvg@mail.gmail.com>
2017-03-03  4:02 ` Herbert Xu
2017-03-03  9:00   ` Nathan Royce
2017-03-03  9:33     ` Herbert Xu
2017-03-05 17:16   ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170408122323.x34ytemitl7h7rzz@kozik-lap \
    --to=krzk@kernel.org \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=nroycea+kernel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox