[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241226190507.GA4648@quark.localdomain>
Date: Thu, 26 Dec 2024 11:05:07 -0800
From: Eric Biggers <ebiggers@...nel.org>
To: Atharva Tiwari <evepolonium@...il.com>
Cc: Herbert Xu <herbert@...dor.apana.org.au>,
"David S. Miller" <davem@...emloft.net>,
linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] crypto: vmac - Handle unaligned input in vmac_update
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@...il.com>
Are you using vmac for something? As far as I know it is unused upstream, and
we should just remove it instead.
- Eric
Powered by blists - more mailing lists