sign extension for 32bit syscalls on ppc64
Stephen Rothwell
sfr at canb.auug.org.au
Sat Apr 29 13:16:40 EST 2006
On Sat, 29 Apr 2006 12:33:37 +1000 Paul Mackerras <paulus at samba.org> wrote:
>
> Stephen Rothwell writes:
>
> > They do need to be sign extended for the new *at syscalls where you can pass
> > a sepecial value AT_FDCWD (-10) to represent the current directory ...
>
> So, compat_sys_openat() in fs/compat.c looks wrong to me then, if
> AT_FDCWD is part of the ABI and not just an internal thing. And I'm
> now not sure whether some of the other *at syscalls do in fact need
> compat wrappers...
AT_FDCWD (actually -100, sorry) is not protected by __KERNEL__ in
include/linux/fcntl.h and sys_openat does not stop it being passed, so I
assume it is part of the user ABI.
The existence of AT_FDCWD is what stopped me from wiring up all the *at
syscalls earlier. It also sparked another discussion to try to formulate
some generic wrappers for the compat routines.
Has any testing been done on these interfaces that involves 32 bit
processes passing AT_FDCWD on 64 bit kernels (I realise that it will work
for some architectures but I suspect not ppc64).
--
Cheers,
Stephen Rothwell sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20060429/899796b4/attachment.pgp>
More information about the Linuxppc-dev
mailing list