linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Chris Metcalf <cmetcalf@mellanox.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	linuxppc-dev@lists.ozlabs.org,
	Adhemerval Zanella <adhemerval.zanella@linaro.org>,
	 Mike Frysinger <vapier@gentoo.org>
Subject: Re: possible bug in powerpc LE compat syscalls with 64-bit args
Date: Fri, 17 Jun 2016 11:52:45 +1000	[thread overview]
Message-ID: <1466128365.12899.9.camel@ellerman.id.au> (raw)
In-Reply-To: <28c367c1-0f60-cd1d-b443-d3876798a627@mellanox.com>

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

  parent reply	other threads:[~2016-06-17  1:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-16 15:36 possible bug in powerpc LE compat syscalls with 64-bit args Chris Metcalf
2016-06-16 15:56 ` Adhemerval Zanella
2016-06-17  1:52 ` Michael Ellerman [this message]
     [not found] <28c367c1-0f60-cd1d-b443-d3876798a627__12262.0927206755$1466112970$gmane$org@mellanox.com>
2016-06-16 21:42 ` Andreas Schwab
2016-06-17 20:46   ` Chris Metcalf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1466128365.12899.9.camel@ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=adhemerval.zanella@linaro.org \
    --cc=benh@kernel.crashing.org \
    --cc=cmetcalf@mellanox.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulus@samba.org \
    --cc=vapier@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).