hw_random driver unsafe endianness assumption

From: Andrew Scull <hidden>
Date: 2022-02-07 17:46:13

I was looking over some uses of the SMCCC TRNG interface and came
across the hw_random driver. In copy_from_registers() from
drivers/char/hw_random/arm_smccc_trng.c, the trailing entropy is
copied out of a1 with memcpy(&buf[copied], &res->a1, chunk). That
appears to make an unsafe assumption about endianness?

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help