public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: libc-hacker@sources.redhat.com
Subject: Re: check-textrel
Date: Thu, 02 Mar 2006 07:41:00 -0000	[thread overview]
Message-ID: <20060302074103.GM30252@sunsite.mff.cuni.cz> (raw)
In-Reply-To: <20060301.201200.62138935.davem@davemloft.net>

On Wed, Mar 01, 2006 at 08:12:00PM -0800, David S. Miller wrote:
> 
> I just noticed the elf/check-textrel test is failing on
> sparc.  It complains because the third segment of all the
> shared objects are writable and executable.
> 
> This turns out to be the .tdata section.
> 
>     LOAD off    0x0014e478 vaddr 0x0015e478 paddr 0x0015e478 align 2**16
>          filesz 0x00004984 memsz 0x00007268 flags rwx
>  ...
>  17 .tdata        00000008  0015e478  0015e478  0014e478  2**2
>                   CONTENTS, ALLOC, LOAD, DATA, THREAD_LOCAL
> 
> Probably some binutils issue?

Actually, SPARC ABI issue.  On i?86/x86_64/etc., there is
a separate .got.plt section (writable, non-executable) and .plt
section (non-writable, executable), on ppc32 there used to be
the same thing as on SPARC, i.e. .plt is both writable and executable,
ld.so changes instructions in .plt rather than some pointer that
.plt insns use, but now we have -msecure-plt alternative
which is also W^X.
Ulrich added the W^X test to elf/check-textrel for security reasons,
but I guess we just should have a whitelist of architectures that
are known with their ABI to be !(W^X).  sparc/sparc64/(ppc32 if not
using -msecure-plt)/alpha/ at least.
i?86/x86_64/ppc64/s390/s390x/arm/cris/sh are ok.

	Jakub

      parent reply	other threads:[~2006-03-02  7:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-02  4:11 check-textrel David S. Miller
2006-03-02  4:42 ` check-textrel Roland McGrath
2006-03-02  5:16   ` check-textrel David S. Miller
2006-03-02  6:12   ` check-textrel David S. Miller
2006-03-02  7:41 ` Jakub Jelinek [this message]

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=20060302074103.GM30252@sunsite.mff.cuni.cz \
    --to=jakub@redhat.com \
    --cc=davem@davemloft.net \
    --cc=libc-hacker@sources.redhat.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).