[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/21448] References to constant data in shared libraries bloats 2.

From: michael at talosis dot ca
Subject: [Bug ld/21448] References to constant data in shared libraries bloats 2.28 executables compared to 2.27
Date: Fri, 05 May 2017 03:49:30 +0000


--- Comment #9 from Michael Deutschmann <michael at talosis dot ca> ---
My system is a hobby on old computers, so my pagesize is 4k.

> OK, it's still true that the fix for pr20995 is necessary for security.

You keep saying this, but I don't see how it's a problem that occasional
const-declared data objects might not segfault when the constness is violated. 
Const is more about giving the OS freedom to optimize, and for detecting some
API misuse bugs at compile time.

Seems to me the fact that ".rodata" shares a segment with ".text" is just as
much a flaw, since that means .rodata has an unnecessary execute permission.

What really benefits security is to have no page anywhere that is both writable
and executable.  I see no reason the ".data.rel.ro" stuff will ever need
execute permission, therefore leaving it writable at the machine level to save
some bloat seems harmless.

(Merging .rodata with .text instead of .data makes sense since both .rodata and
.text can be shared with other processes running the same executable. 
.data.rel.ro can't be shared since it is customized at run time.)

You are receiving this mail because:
You are on the CC list for the bug.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]