possible bug in powerpc LE compat syscalls with 64-bit args
Michael Ellerman
mpe at ellerman.id.au
Fri Jun 17 11:52:45 AEST 2016
On Thu, 2016-06-16 at 11:36 -0400, Chris Metcalf wrote:
> Adhemerval Zanella is cleaning up the preadv/pwritev implementation in glibc
> and came across an issue with the tilepro/tilegx32 implementation of argument
> passing for 64-bit arguments in split register pairs.
>
> The glibc code base uses __LONG_LONG_PAIR to split 64-bit arguments,
> passing "hi, lo" for BE systems and "lo, hi" for LE systems. Tile is almost uniformly
> LE, but we do support BE for specific customers. The 32-bit compat mode on
> tilegx was getting passed "hi, lo" arguments by glibc but looking for them to
> be "lo, hi" arguments on the kernel side. I fixed this here:
>
> https://lkml.kernel.org/g/1466019219-10462-1-git-send-email-cmetcalf@mellanox.com
>
> Reviewing what other platforms do, it seems like powerpc compat mode may
> have the opposite problem in little-endian mode, since arguments are passed
> in "hi, lo" order unconditionally in arch/powerpc/kernel/sys_ppc32.c. You may
> want to adopt the solution in the patch cited above, or similar solutions
> elsewhere, eg regs_to_64 in arch/arm64/include/asm/assembler.h, or
> merge_64 in arch/mips/kernel/linux32.c.
We don't support compat mode on ppc64le. So I think we're OK?
Thanks for letting us know.
cheers
More information about the Linuxppc-dev
mailing list