mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: T Pratham <t-pratham@ti.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>,
	<linux-crypto@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Manorit Chawdhry <m-chawdhry@ti.com>,
	"Shiva Tripathi" <s-tripathi1@ti.com>,
	Kamlesh Gurudasani <kamlesh@ti.com>
Subject: Re: [BUG] crypto: tcrypt - data corruption in ahash tests with CRYPTO_AHASH_ALG_BLOCK_ONLY
Date: Fri, 16 Jan 2026 14:03:19 +0530	[thread overview]
Message-ID: <f9890350-cbe2-4cff-b5f2-1c76cd42ab4b@ti.com> (raw)
In-Reply-To: <aWmisYTEC07wOO2i@gondor.apana.org.au>

On 16/01/26 08:00, Herbert Xu wrote:
> On Thu, Jan 15, 2026 at 03:38:50PM +0530, T Pratham wrote:
>>
>> However, in tcrypt, the wait struct is accessed as below:
>>
>> crypto/tcrypt.c:
>> static inline int do_one_ahash_op(struct ahash_request *req, int ret)
>> {
>> 	struct crypto_wait *wait = req->base.data;
> 
> This is just broken.  Even before the partial hash block handling
> there are code paths where req->base.data will be modified prior
> to final return.  That's why the completion function takes a void *
> instead of just passing the request back.

Yeah, I realized this a couple of hours after hitting the send button.
Only that partial block handling is the first place where I hit this.

> 
> So we should fix tcrypt to not do this crazy thing.

Yup, looking forward for this.

> 
> Thanks,

-- 
Regards
T Pratham <t-pratham@ti.com>

      reply	other threads:[~2026-01-16  8:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-15 10:08 T Pratham
2026-01-16  2:30 ` Herbert Xu
2026-01-16  8:33   ` T Pratham [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=f9890350-cbe2-4cff-b5f2-1c76cd42ab4b@ti.com \
    --to=t-pratham@ti.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=kamlesh@ti.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m-chawdhry@ti.com \
    --cc=s-tripathi1@ti.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

all inboxes | Powered by JetHome®