Re: [PATCH 0/6] crypto/realtek: add new driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 06, 2022 at 09:59:49AM +0100, Markus Stockhausen wrote:
>
> 	const struct rtcr_ahash_req *hexp = in;
> 
> 	hreq->state = hexp->state; << *** maybe unaligned? ***

Try

	const struct rctr_ahash_req __packed *hexp = in;

This should tell the compiler to use unaligned accessors.

> Comparing this to safeexcel_ahash_import() where I got my ideas from
> one sees a similar coding:
> 
> 	...
> 	const struct safexcel_ahash_export_state *export = in;

This is equally broken unless that driver can only be used on
platforms where unaligned access is legal (such as x86).

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



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux