Re: dynamically determining page offset

Sumanth Sukumar (sumanth@transarc.com)
Tue, 31 Aug 1999 16:24:27 -0400 (EDT)


On Tue, 31 Aug 1999, Alan Cox wrote:

> > Is there a way to determine the page offset (usually 0xC0000000)
> > from a loaded kernel module dynamically? This becomes a problem when
> > trying to insert modules into kernels that might have a different page
> > offset than the one the module was compiled with. For example, if the
> > PAGE_OFFSET macro in page.h has been changed to say 0x80000000 to
> > accomodate a 2g + 2g kernel/user space as opposed to the more usual 1g
> > + 3g kernel/user division
> > this will cause the module that uses the wrong PAGE_OFFSET value to do
> > extremely weird things. Is there a
> > consistent, relatively kernel-independent way of dealing with this?
> > I would appreciate if you would also copy me on any responses.
>
> 2.2.13 will generate different version data for 2G v 3G base kernels
>
Yes, while that'll let my module detect kernel incompatibilities,
it still doesn't solve the problem of building a module that can be
loaded into kernels that only differ in PAGE_OFFSET values. In other words
are there public symbols exported by the kernel, that I can use to derive
the value of PAGE_OFFSET for that kernel?

Thanks,
Sumanth

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/