lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aKBKul0unf06oBiV@gondor.apana.org.au>
Date: Sat, 16 Aug 2025 17:09:14 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Ovidiu Panait <ovidiu.panait.oss@...il.com>
Cc: clabbe.montjoie@...il.com, davem@...emloft.net,
	linux-crypto@...r.kernel.org, wens@...e.org,
	jernej.skrabec@...il.com, samuel@...lland.org,
	linux-arm-kernel@...ts.infradead.org, linux-sunxi@...ts.linux.dev,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 8/9] crypto: sun8i-ce - save hash buffers and dma info to
 request context

On Mon, Jul 28, 2025 at 09:07:00AM +0300, Ovidiu Panait wrote:
>
> +	u8 result[CE_MAX_HASH_DIGEST_SIZE] ____cacheline_aligned;

To get proper alignment for the reqctx, the driver should use
the ahash_request_ctx_dma helper.  Of course, the reqsize should
also be increased by CRYPTO_DMA_PADDING.

For the struct member, instead of __cacheline_aligned use
__aligned(CRYPTO_DMA_ALIGN).

> +	u8 pad[2 * CE_MAX_HASH_BLOCK_SIZE] ____cacheline_aligned;

This is to-devce only, right? If so it doesn't need to be aligned.

Cheers,
-- 
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ