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



On 16/06/2016 12:36, 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.
> 
> Here's the email thread from libc-alpha:
> 
> https://sourceware.org/ml/libc-alpha/2016-06/msg00638.html
> 

I am not fully familiar with kernel policy regarding ABI so is this considered
an ABI breakage or a real defect?

  reply	other threads:[~2016-06-16 15:57 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 [this message]
2016-06-17  1:52 ` Michael Ellerman
     [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=5762CC49.6090400@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=benh@kernel.crashing.org \
    --cc=cmetcalf@mellanox.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --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).