[klibc] Re: sys_mmap2 on different architectures

H. Peter Anvin hpa at zytor.com
Thu Feb 23 09:47:24 PST 2006

Benjamin LaHaise wrote:
> On Wed, Feb 22, 2006 at 04:43:47PM -0800, David S. Miller wrote:
>>Aha, that part I didn't catch.  Thanks for the clarification
>>I wonder why we did things that way with a fixed shift...
> Without that trick, we'd have needed an extra parameter for the syscall 
> on x86, which is already at the maximum number of registers with 6 
> arguments.  This was easier than changing the syscall ABI. =-)

Well, there is always the trick of making it a pointer.  It was needed 
for pselect() anyway.  A real sys_mmap64 would definitely have been 
cleaner, and will be needed to deal with the 16 TB barrier anyway :)

I personally think the S390 people had the right idea... once you run 
out of registers, just make it a defined part of the ABI that we pass in 
a single pointer to all the arguments.


More information about the klibc mailing list