[PATCH] ARM: fix memset64() on big-endian
Matthew Wilcox
willy at infradead.org
Fri Jan 2 07:22:20 PST 2026
On Fri, Jan 02, 2026 at 08:15:46AM +0100, Thomas Weißschuh wrote:
> On big-endian systems the 32-bit low and high halves need to be swapped,
> for the underlying assembly implemenation to work correctly.
Heh. In my heart, ARM will always be a litte-endian architecture.
I'm not really surprised this bug took, er, 8 years to show up; big-endian
arm is rare enough and memset64() isn't much used on 32-bit systems.
And it turns out that many of the users pass a constant 0 as the value,
which was kind of not the point, but it seems to be an easier API to
use than memset, so whatever ;-)
> Fixes: fd1d362600e2 ("ARM: implement memset32 & memset64")
> Cc: stable at vger.kernel.org
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
Reviewed-by: Matthew Wilcox (Oracle) <willy at infradead.org>
More information about the linux-arm-kernel
mailing list