This is the mail archive of the libc-alpha@sources.redhat.com 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]

Re: Possible bug in sysdeps/unix/sysv/linux/powerpc/mmap64.c


On Sat, May 19, 2001 at 06:23:05PM -0400, Jack Howarth wrote:
> HJ,
>   I can't say why it is set to 12 but the PAGE_SHIFT is present in
> sysdeps/unix/sysv/linux/powerpc/mmap64.c because the powerpc asm
> headers in Linux 2.4.x were tightened to not export PAGE_SHIFT
> (thus it had to be hardcoded into mmap64.c). I recall that the
> idea was that it should never change no matter what happened to
> PAGE_SHIFT in linux.      
> 
> Here is one message where the original idea was discussed.  
> 
> http://sources.redhat.com/ml/libc-alpha/2000-10/msg00255.html
> 

I believe the code and comment are wrong. From mmap (2):

       offset should ordinarily be a multiple of  the  page  size
       returned by getpagesize(2).

Unless both the man page and the testcase in glibc are wrong, the real
page size should be used here.


H.J.



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