All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: "Joseph S. Myers" <joseph@codesourcery.com>
Cc: linux-mips@linux-mips.org
Subject: Re: N32 fallocate syscall
Date: Thu, 18 Dec 2008 07:10:38 +0000	[thread overview]
Message-ID: <20081218071038.GA11823@linux-mips.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0812180009000.31179@digraph.polyomino.org.uk>

On Thu, Dec 18, 2008 at 12:14:12AM +0000, Joseph S. Myers wrote:

> The N32 syscall table uses sys_fallocate instead of sys32_fallocate.  
> However, glibc expects to be using the syscall version with 32-bit 
> arguments on N32, which should work with sys32_fallocate but not 
> sys_fallocate.
> 
> What should the N32 interface for this syscall be?  My inclination is that 
> glibc is right not to do anything special and different from other 32-bit 
> ABIs here, and so sys32_fallocate should be used.
> 
> (glibc is also expecting the 32-bit version for N64, but that's a clear 
> bug in glibc that I'll be fixing.)

There are exceptions such as pipe(2) or clone(2) but the calling convention
of most syscalls in all ABIs is following the C calling conventions for the
respective ABI, so N32 fallocate(2) receives it's syscalls like a N32
function call would.

o32-style arguments would require splitting the two 64-bit loff_t arguments
to be split into 2 32-bit halfs each in userspace and those pairs then to
be re-assembled into 64-bit arguments in kernel.  Bit messy, no?

  Ralf

      parent reply	other threads:[~2008-12-18  7:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-18  0:14 N32 fallocate syscall Joseph S. Myers
2008-12-18  1:43 ` David Daney
2008-12-18  7:10 ` Ralf Baechle [this message]

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=20081218071038.GA11823@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=joseph@codesourcery.com \
    --cc=linux-mips@linux-mips.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.