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:49:14 -0800 [thread overview]
Message-ID: <20241226194914.GB4648@quark.localdomain> (raw)
In-Reply-To: <20241226190507.GA4648@quark.localdomain>
On Thu, Dec 26, 2024 at 11:05:07AM -0800, Eric Biggers wrote:
> 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.
>
I strongly suspect this was just to address the TODO in the source code, and
this would be a good time to finally remove vmac
(https://lore.kernel.org/linux-crypto/20241226194309.27733-1-ebiggers@kernel.org)
from the kernel's museum of cryptographic algorithms. But let me know if you're
in fact actually using it, and if so for what. Thanks!
- Eric
next prev parent reply other threads:[~2024-12-26 19:49 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
2024-12-26 19:49 ` Eric Biggers [this message]
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=20241226194914.GB4648@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