Re: [Linux-ia64] mremap and "negative" addresses

From: Matthew Wilcox <willy_at_debian.org>
Date: 2002-11-01 23:21:28
On Fri, Nov 01, 2002 at 07:08:10PM +1100, Matt Chapman wrote:
> mremap, like mmap, can return addresses in region 4 which
> are "negative" (when interpreted as signed values) and thus
> interpreted as syscall failure.  The following patch
> implements the same workaround as for mmap and other such
> syscalls.

hmm.. x86 handles this kind of thing by comparing against (unsigned
long)-125 instead.  any reason we can't do the same?

i also notice that sys_fcntl has no workaround:

                case F_GETOWN:
                        /*
                         * XXX If f_owner is a process group, the
                         * negative return value will get converted
                         * into an error.  Oops.  If we keep the
                         * current syscall conventions, the only way
                         * to fix this will be in libc.
                         */
                        err = filp->f_owner.pid;
                        break;

or is the workaround for this in libc?

-- 
Revolutions do not require corporate support.
Received on Fri Nov 01 04:21:34 2002

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:10 EST