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