This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix wordsize-32 mmap offset for negative value (BZ#18877)



On 28-01-2016 15:45, Joseph Myers wrote:
> Does anyone else have comments on my question 
> <https://sourceware.org/ml/libc-alpha/2016-01/msg00534.html> of what the 
> desired architecture-independent mmap semantics should be for negative 
> offsets?
> 

I recheck Linux handling of mmap syscall and I would say we should handle
it an unsigned integer since it is what general mmap implementation is
being based current (mmap_pgoff - mm/mmap.c).

The problem is some architecture implements mmap (either default or
for compatibility) as signed and others as unsigned.  As far I could
check mmap2 is handled as unsigned for all the ports.

Now from GLIBC side I see we need to start use mmap2 where is possible
for the ports that already are not using it (mips for instance). The
problem is ports that only provides mmap with signed offset and for
such cases I am not sure how we will enforce architecture-independent
semantics for negative offset.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]