All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Carstens <hca@linux.ibm.com>
To: Harald Freudenberger <freude@linux.ibm.com>
Cc: dengler@linux.ibm.com, fcallies@linux.ibm.com,
	ifranzki@linux.ibm.com, linux-s390@vger.kernel.org,
	Vasily Gorbik <gor@linux.ibm.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	linux-crypto@vger.kernel.org
Subject: Re: [PATCH v3 3/3] s390/crypto: Rewrite AES ctr mode to be prepared for context analysis
Date: Thu, 13 Aug 2026 21:39:13 +0200	[thread overview]
Message-ID: <20260813193913.7399A18-hca@linux.ibm.com> (raw)
In-Reply-To: <20260813155406.50051-4-freude@linux.ibm.com>

On Thu, Aug 13, 2026 at 05:54:06PM +0200, Harald Freudenberger wrote:
> Also cover a finding from Sashiko about that the mutex_trylock() may
> be invoked from a softirq context. So add a check to make sure only in
> process context try to lock the mutex.

...

> +	if (in_task() && mutex_trylock(&ctrblk_lock)) {
> +		/* process context and mutex acquired */
> +		ret = __ctr_aes_crypt(sctx, &walk, true);
>  		mutex_unlock(&ctrblk_lock);

Something similar came also up when converting the dasd code: better
convert to semaphore and simply use down_trylock() and up() instead.

Please make the conversion from mutex to semaphore a separate patch,
so it can be easily backported if required.

  parent reply	other threads:[~2026-08-13 19:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-13 15:54 [PATCH v3 0/3] Fixes and rework for aes_s390 Harald Freudenberger
2026-08-13 15:54 ` [PATCH v3 1/3] s390/crypto: Fix skcipher_walk return code handling in aes_s390 Harald Freudenberger
2026-08-13 16:05   ` sashiko-bot
2026-08-13 15:54 ` [PATCH v3 2/3] s390/crypto: Fix missing scrub of temp buffers with AES ctr and gcm algorithm Harald Freudenberger
2026-08-13 16:06   ` sashiko-bot
2026-08-13 15:54 ` [PATCH v3 3/3] s390/crypto: Rewrite AES ctr mode to be prepared for context analysis Harald Freudenberger
2026-08-13 16:04   ` sashiko-bot
2026-08-13 19:39   ` Heiko Carstens [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-08-07 13:54 [PATCH v3 0/3] Fixes and rework for aes_s390 Harald Freudenberger
2026-08-07 13:54 ` [PATCH v3 3/3] s390/crypto: Rewrite AES ctr mode to be prepared for context analysis Harald Freudenberger
2026-08-07 14:31   ` sashiko-bot

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=20260813193913.7399A18-hca@linux.ibm.com \
    --to=hca@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=dengler@linux.ibm.com \
    --cc=fcallies@linux.ibm.com \
    --cc=freude@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=ifranzki@linux.ibm.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.