Subject: Re: kernel mappings of shared-library pages
To: None <Richard.Earnshaw@buzzard.freeserve.co.uk>
From: Bill Sommerfeld <email@example.com>
Date: 10/13/2001 12:18:11
> While working on a fix for pr/13998 I noticed that several (maybe many)
> shared library pages seem to be permanently mapped into the kernel. This
> is bad news on a VAC machine since such mappings tend to be always
> writable, so we must leave all such mappings of that page uncached (all
> user-space mappings are read-only).
> ... any idea where they may be being entered?
One guess: left-over UBC mappings; both a.out and ELF ld.so do a
read(2) of the file header to find out how much to mmap.
It might be more efficient overall for the run-time linker to mmap the
whole file read-only and then trim back based on the the header.