lkml.org 
[lkml]   [1998]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: page->offset & PAGE_MASK
Date
According to Linus Torvalds:
> On Sun, 1 Feb 1998 chip@atlantic.net wrote:
> > I'm working on extending Linux's VM mechanism beyond 2G.
> >
> > A comment in include/linux/mm.h says that page->offset need not be
> > a multiple of PAGE_SIZE. However, the code in mm/*.c _seems_ always
> > to set it so.
>
> Look at the exec() functions, especially for a.out. I think it's OMAGIC
> that is not guaranteed to be page-aligned (in fact, it is guaranteed to
> _not_ be page-aligned: the executable will start at offset 1024 in the
> file).

So I can't even count on sb_blocksize to be small enough, since an
a.out may be on a filesystem with a block size of (e.g.) 2048 or 4096.

I guess I'll have to invent a new constant, something like
PAGE_POS_UNIT (and the accompanying PAGE_POS_BITS).
--
Chip Salzenberg - a.k.a. - <chip@pobox.com>
"Boy, is it ever dark." "I hope they don't get a moonburn." // MST3K

\
 
 \ /
  Last update: 2005-03-22 13:41    [W:0.058 / U:0.952 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site