This is the mail archive of the libc-alpha@sourceware.org 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]
Other format: [Raw text]

Re: Encoding page size in the ELF header


On 09/25/2015 09:04 AM, Florian Weimer wrote:
> Not sure if this the right mailing list for this discussion.
> 
> I think we should record the expected page size in the ELF header in
> some way.  It affects the behavior of the static linker, the dynamic
> linker, and even some applications.  (For example, an application might
> want to make a part of .data read-only after initialization, as a
> hardening measure.)
> 
> What would be a good way to do that?

Can't the application just call getpagesize(), and then use that to
decide how to make .data read-only?

On RHEL we make sure the expected page size is plumbed through from the
static linker up to the application, which ensures that in ld on ppc64,
for example, you see 64K EXEC_PAGESIZE values, so getpagesize() DTRT.

What else is needed? Under what other configurations does this fail?

Cheers,
Carlos.


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