All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Harald Freudenberger" <freude@linux.ibm.com>
Cc: linux-s390@vger.kernel.org, "Heiko Carstens" <hca@linux.ibm.com>,
	"Alexander Gordeev" <agordeev@linux.ibm.com>,
	"Vasily Gorbik" <gor@linux.ibm.com>,
	"Christian Borntraeger" <borntraeger@linux.ibm.com>
Subject: Re: [PATCH v2 2/2] s390/crypto: Handle cpacf_kma() return code
Date: Thu, 08 Oct 2026 11:03:40 +0000	[thread overview]
Message-ID: <sashiko-outbox-164075@kernel.org> (raw)
In-Reply-To: <20261008105242.20730-3-freude@linux.ibm.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Critical] crypto: s390: missing 'out' label causes build failure
- [Low] s390/crypto: build error due to missing 'out' label
--

commit 45b229c79189e8165da09c03b30411703a7bf4ae
Author: Harald Freudenberger <freude@linux.ibm.com>

s390/crypto: Handle cpacf_kma() return code

This commit updates gcm_aes_crypt() to check the return code of cpacf_kma()
and bail out with -EIO on any non-zero result.

> diff --git a/arch/s390/crypto/aes_s390.c b/arch/s390/crypto/aes_s390.c
> index 62edc66d54788..0e35cca359146 100644
> --- a/arch/s390/crypto/aes_s390.c
> +++ b/arch/s390/crypto/aes_s390.c
> @@ -889,10 +889,13 @@ static int gcm_aes_crypt(struct aead_request *req, unsigned int flags)
>  		if (aad_bytes > 0)
>  			memcpy(gw_out.ptr, gw_in.ptr, aad_bytes);
>  
> -		cpacf_kma(ctx->fc | flags, &param,
> -			  gw_out.ptr + aad_bytes,
> -			  gw_in.ptr + aad_bytes, pc_bytes,
> -			  gw_in.ptr, aad_bytes);
> +		if (cpacf_kma(ctx->fc | flags, &param,
> +			      gw_out.ptr + aad_bytes,
> +			      gw_in.ptr + aad_bytes, pc_bytes,
> +			      gw_in.ptr, aad_bytes)) {
> +			ret = -EIO;
> +			goto out;

[Severity: Critical]
Does this code fail to compile? There does not appear to be an out label
defined anywhere within gcm_aes_crypt().

> +		}
>  
>  		n = aad_bytes + pc_bytes;
>  		if (gcm_in_walk_done(&gw_in, n) != n)

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261008105242.20730-1-freude@linux.ibm.com?part=2

      reply	other threads:[~2026-10-08 11:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-08 10:52 [PATCH v2 0/2] Rework cpacf_kma() function Harald Freudenberger
2026-10-08 10:52 ` [PATCH v2 1/2] s390/cpacf: Rework cpacf_kma() to return condition code Harald Freudenberger
2026-10-08 10:59   ` sashiko-bot
2026-10-08 10:52 ` [PATCH v2 2/2] s390/crypto: Handle cpacf_kma() return code Harald Freudenberger
2026-10-08 11:03   ` sashiko-bot [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=sashiko-outbox-164075@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=freude@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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.