On Fri, Sep 16, 2022, at 7:32 AM, Rohan McLure wrote:
> As reported[1] by Arnd, the arch-specific fadvise64_64 and fallocate
> compatibility handlers assume parameters are passed with 32-bit
> big-endian ABI. This affects the assignment of odd-even parameter pairs
> to the high or low words of a 64-bit syscall parameter.
>
> Fix fadvise64_64 fallocate compat handlers to correctly swap upper/lower
> 32 bits conditioned on endianness.
>
> A future patch will replace the arch-specific compat fallocate with an
> asm-generic implementation. This patch is intended for ease of
> back-port.
>
> [1]: 
> https://lore.kernel.org/all/be29926f-226e-48dc-871a-e29a54e80...@www.fastmail.com/
>
> Fixes: 57f48b4b74e7 ("powerpc/compat_sys: swap hi/lo parts of 64-bit 
> syscall args in LE mode")
> Reported-by: Arnd Bergmann <a...@arndb.de>
> Signed-off-by: Rohan McLure <rmcl...@linux.ibm.com>

Looks good, thanks!

Reviewed-by: Arnd Bergmann <a...@arndb.de>
Cc: sta...@vger.kernel.org # v5.12+

Reply via email to