From: Eric Biggers <ebiggers@kernel.org>
To: Atharva Tiwari <evepolonium@gmail.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] crypto: vmac - Handle unaligned input in vmac_update
Date: Thu, 26 Dec 2024 11:05:07 -0800 [thread overview]
Message-ID: <20241226190507.GA4648@quark.localdomain> (raw)
In-Reply-To: <20241226170049.1526-1-evepolonium@gmail.com>
On Thu, Dec 26, 2024 at 10:30:49PM +0530, Atharva Tiwari wrote:
> The `vmac_update` function previously assumed that `p` was aligned,
> which could lead to misaligned memory accesses when processing blocks.
> This patch resolves the issue by,
> introducing a temporary buffer to ensure alignment.
>
> Changes include:
> - Allocating a temporary buffer (`__le64 *data`) to store aligned blocks.
> - Using `get_unaligned_le64` to safely read data into the temporary buffer.
> - Iteratively processing blocks with the `vhash_blocks` function.
> - Properly freeing the allocated temporary buffer after processing.
>
> Signed-off-by: Atharva Tiwari <evepolonium@gmail.com>
Are you using vmac for something? As far as I know it is unused upstream, and
we should just remove it instead.
- Eric
next prev parent reply other threads:[~2024-12-26 19:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-26 17:00 [PATCH] crypto: vmac - Handle unaligned input in vmac_update Atharva Tiwari
2024-12-26 19:05 ` Eric Biggers [this message]
2024-12-26 19:49 ` Eric Biggers
2024-12-27 1:33 ` Herbert Xu
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=20241226190507.GA4648@quark.localdomain \
--to=ebiggers@kernel.org \
--cc=davem@davemloft.net \
--cc=evepolonium@gmail.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox