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: <ZzczMlpfC33yjQ0j@gondor.apana.org.au>
Date: Fri, 15 Nov 2024 19:40:34 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Alexey Romanov <avromanov@...utedevices.com>
Cc: neil.armstrong@...aro.org, clabbe@...libre.com, davem@...emloft.net,
	robh+dt@...nel.org, krzysztof.kozlowski+dt@...aro.org,
	krzk+dt@...nel.org, conor+dt@...nel.org, khilman@...libre.com,
	jbrunet@...libre.com, martin.blumenstingl@...glemail.com,
	vadim.fedorenko@...ux.dev, linux-crypto@...r.kernel.org,
	linux-amlogic@...ts.infradead.org, linux-kernel@...r.kernel.org,
	devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	kernel@...utedevices.com
Subject: Re: [PATCH v10 11/22] crypto: amlogic - Introduce hasher

On Fri, Nov 08, 2024 at 01:28:56PM +0300, Alexey Romanov wrote:
>
> +struct meson_hasher_req_ctx {
> +	u8 state[SHA256_DIGEST_SIZE + 16] ____cacheline_aligned;
> +	u8 partial[SHA256_BLOCK_SIZE] ____cacheline_aligned;
> +	unsigned int partial_size ____cacheline_aligned;

Is this alignment for DMA? If so you cannot use ___cachealign_aligned
to achieve what you want.

Instead of this check out the crypto_ahash_ctx_dma helper.  For
an example driver doing this for DMA, you could look at caam.

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