linux-mips
[Top] [All Lists]

Re: N32 fallocate syscall

To: "Joseph S. Myers" <joseph@codesourcery.com>
Subject: Re: N32 fallocate syscall
From: David Daney <ddaney@caviumnetworks.com>
Date: Wed, 17 Dec 2008 17:43:24 -0800
Cc: linux-mips@linux-mips.org
In-reply-to: <Pine.LNX.4.64.0812180009000.31179@digraph.polyomino.org.uk>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <Pine.LNX.4.64.0812180009000.31179@digraph.polyomino.org.uk>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Thunderbird 2.0.0.18 (X11/20081119)
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.


The prototype for that would be something like:

sys_fallocate(int32_t, int32_t, int64_t, int64_t);

The N32 and N64 ABIs treat this identically, the parameters are passed
in a0, a1, a2, and a3.  As you noted, the current (2.6.28-rc8) kernel
sources follow the ABI for N32 and N64.  I think the kernel is
correct.

If glibc is not using the ABI calling convention for both N32 and N64 (I
haven't checked), it should probably be fixed.

(glibc is also expecting the 32-bit version for N64, but that's a clear bug in glibc that I'll be fixing.)


David Daney

<Prev in Thread] Current Thread [Next in Thread>