[PATCH] Improve endian conversion in umac.c
Christian Weisgerber
naddy at mips.inka.de
Fri Mar 11 09:59:49 AEDT 2022
rapier:
> Versions tested:
> Stock openssh 8.8p1 (stock)
> Migrating all endian functions from misc.c (full)
> Migrating only [get|put]_u32_le from misc.c (little)
put_u32_le() isn't used anywhere.
And a quick look at the code shows that indeed get_u32_le() is used
to process _all_ data to be hashed. Any other endian functions
aren't called in tight loops.
clang on amd64 optimizes these functions to a simple mov or mov+bswap.
I'm kinda curious whether PPC and SPARC compilers are smart enough
to use the load-swapped instructions.
--
Christian "naddy" Weisgerber naddy at mips.inka.de
More information about the openssh-unix-dev
mailing list