On Wed, 14 Dec 2005 00:22:36 +0000 Mike Frysinger <[EMAIL PROTECTED]>
wrote:
| > The big issue with
| > this is that the text segment is usually suppose to be read only for
| > security reasons.  But because the text segment needs a relocation,
| > it needs to be read-write since the relocation happens at runtime
| > dynamically.
| 
| this is correct, a very good reason to fix TEXTRELs.

This is only an issue if an application is already insecure. Thus,
TEXTRELs shouldn't be considered sufficient reason to avoid marking
something stable, any more than we avoid marking code that uses sprintf
stable.

|  another good reason is that since the segment cannot be mapped
| readonly, the memory cannot be shared across multiple processes ...
| each will need to have its own copy, thus wasting what could be
| significant memory resources.

Again, that's a big "could be". We don't avoid marking stable code
that, say, mallocs lots of space, then fills it with some calculated
numbers (for example, the first million prime numbers), even though a
better program would allow for that data to be shared.

So yes, TEXTRELs when used accidentally are rather sucky. On the other
hand, there are legitimate uses for them, and they aren't insecure, nor
are they necessarily any worse performance-wise than code that uses
other methods.

Banning TEXTRELs outright makes no more sense than banning code that
uses goto or sprintf -- if TEXTRELs are used accidentally and there's
an easy fix, take it, but don't let them stop you from providing the
most stable version of a package to your users.

Oh, and don't accept reasons like "but they don't work if we enable
$obscure_voodoo in the compiler" either. If $obscure_voodoo breaks on
legitimate TEXTRELs then $obscure_voodoo is broken, not the code using
TEXTRELs.

-- 
Ciaran McCreesh : Gentoo Developer (I can kill you with my brain)
Mail            : ciaranm at gentoo.org
Web             : http://dev.gentoo.org/~ciaranm

Attachment: signature.asc
Description: PGP signature

Reply via email to