linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Harald Freudenberger <freude@linux.ibm.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: linux390-list@tuxmaker.boeblingen.de.ibm.com,
	linux-crypto@vger.kernel.org, ifranzki@linux.ibm.com,
	ebiggers@kernel.org
Subject: Re: [PATCH] s390/crypto: Rework on paes implementation
Date: Mon, 28 Oct 2019 11:07:27 +0100	[thread overview]
Message-ID: <17eda70d-d1fc-8b9d-ffb3-48b3c8f5799b@linux.ibm.com> (raw)
In-Reply-To: <20191028082433.qdaabj2imf34ikam@gondor.apana.org.au>

On 28.10.19 09:24, Herbert Xu wrote:
> Harald Freudenberger <freude@linux.ibm.com> wrote:
>> @@ -165,18 +183,31 @@ static int ecb_paes_crypt(struct skcipher_request *req, unsigned long modifier)
>>        struct skcipher_walk walk;
>>        unsigned int nbytes, n, k;
>>        int ret;
>> +       struct {
>> +               u8 key[MAXPROTKEYSIZE];
>> +       } param;
>>
>>        ret = skcipher_walk_virt(&walk, req, false);
>> +       if (ret)
>> +               return ret;
>> +
>> +       spin_lock(&ctx->pk_lock);
>> +       memcpy(param.key, ctx->pk.protkey, MAXPROTKEYSIZE);
>> +       spin_unlock(&ctx->pk_lock);
> I think using a plain spin lock is unsafe as you may have callers
> from both kernel thread context and BH context.  So you need to
> have at least a spin_lock_bh here.
>
> Cheers,

Thanks, I'll change this.


      reply	other threads:[~2019-10-28 10:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-28  7:37 [PATCH] s390/crypto: Rework on paes implementation Harald Freudenberger
2019-10-28  8:24 ` Herbert Xu
2019-10-28 10:07   ` Harald Freudenberger [this message]

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=17eda70d-d1fc-8b9d-ffb3-48b3c8f5799b@linux.ibm.com \
    --to=freude@linux.ibm.com \
    --cc=ebiggers@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=ifranzki@linux.ibm.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux390-list@tuxmaker.boeblingen.de.ibm.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;
as well as URLs for NNTP newsgroup(s).