From: Ciaran McCreesh <ciaranm@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] Textrels in packages policy
Date: Wed, 14 Dec 2005 01:07:53 +0000 [thread overview]
Message-ID: <20051214010753.45ff1cc7@snowdrop.home> (raw)
In-Reply-To: <20051214002236.GA1863@toucan.gentoo.org>
[-- Attachment #1: Type: text/plain, Size: 2013 bytes --]
On Wed, 14 Dec 2005 00:22:36 +0000 Mike Frysinger <vapier@gentoo.org>
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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2005-12-14 1:12 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-13 20:59 [gentoo-dev] Textrels in packages policy Mark Loeser
2005-12-13 21:15 ` Mike Frysinger
2005-12-13 22:30 ` Saleem A.
2005-12-14 0:22 ` Mike Frysinger
2005-12-14 1:02 ` Mark Loeser
2005-12-14 1:16 ` Ciaran McCreesh
2005-12-14 1:20 ` Mike Frysinger
2005-12-14 1:37 ` Ciaran McCreesh
2005-12-14 1:43 ` Mike Frysinger
2005-12-14 1:39 ` Mark Loeser
2005-12-14 1:07 ` Ciaran McCreesh [this message]
2005-12-14 1:25 ` Mike Frysinger
2005-12-14 1:32 ` Mark Loeser
2005-12-13 23:59 ` Jory A. Pratt
2005-12-14 0:25 ` Mike Frysinger
2005-12-14 2:59 ` Jason Wever
2005-12-14 3:08 ` Mark Loeser
2005-12-14 3:50 ` Mike Frysinger
2005-12-14 6:59 ` Harald van Dijk
2005-12-14 7:51 ` Kevin F. Quinn
2005-12-14 8:19 ` Harald van Dijk
2005-12-14 13:43 ` Mike Frysinger
2005-12-14 14:27 ` Harald van Dijk
2005-12-14 14:38 ` Mike Frysinger
2005-12-14 15:04 ` Harald van Dijk
2005-12-15 7:14 ` Kevin F. Quinn
2005-12-14 15:25 ` Chris Gianelloni
2005-12-14 15:27 ` Chris Gianelloni
2005-12-14 15:42 ` Mike Frysinger
2005-12-14 7:44 ` Kevin F. Quinn
2005-12-14 9:33 ` Henrik Brix Andersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051214010753.45ff1cc7@snowdrop.home \
--to=ciaranm@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox