This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Possible bug in sysdeps/unix/sysv/linux/powerpc/mmap64.c
- To: Jack Howarth <howarth at bromo dot med dot uc dot edu>
- Subject: Re: Possible bug in sysdeps/unix/sysv/linux/powerpc/mmap64.c
- From: "H . J . Lu" <hjl at lucon dot org>
- Date: Sat, 19 May 2001 15:30:07 -0700
- Cc: libc-alpha at sourceware dot cygnus dot com
- References: <200105192223.SAA33818@bromo.med.uc.edu>
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.