public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Palmer Dabbelt <palmer@dabbelt.com>
To: szabolcs.nagy@arm.com
Cc: l.stelmach@samsung.com, fw@deneb.enyo.de,
	libc-alpha@sourceware.org, schwab@suse.de, maskray@google.com,
	fweimer@redhat.com, adhemerval.zanella@linaro.org,
	joseph@codesourcery.com, binutils@sourceware.org,
	m.pikula@partner.samsung.com, m.szyprowski@samsung.com,
	k.lewandowsk@samsung.com
Subject: Re: global pointer gets overwritten with dlopen(3) on RISC-V
Date: Tue, 16 May 2023 17:11:00 -0700 (PDT)	[thread overview]
Message-ID: <mhng-bd3917ba-4edf-42f4-910c-957797301206@palmer-ri-x1c9a> (raw)
In-Reply-To: <ZGM39+VpzLQAESZ0@arm.com>

On Tue, 16 May 2023 00:59:51 PDT (-0700), szabolcs.nagy@arm.com wrote:
> The 05/16/2023 08:53, Lukasz Stelmach via Binutils wrote:
>> No, the file we dlopen is an executable meant to work standalone. We
>> dlopen it for testing and this setup has worked for us on different
>> platforms (armv7l, aarch64, x86). We MAY have not encoutered an error
>
> it is guaranteed broken on all those targets if the exe has
> local exec TLS access. (initial exec TLS is broken too but
> you may get lucky with that)
>
> i think you can get into trouble with interposition, copy
> relocs or canonical plts too.
>
> but even if everything happens to work, it is just bad
> design: it relies on implementation internals instead of
> documented interfaces.

OK, so sounds like this just isn't a bug.  It's oddly similar to the 
other half of this thread: users are relying on carefully constructing 
binaries to work, but that relies on unspecified behavior and thus isn't 
supportable.

>> because our glibc has been patched. I have to investigate the details as
>> Florian brough it to our attention that an error should be reported.

  reply	other threads:[~2023-05-17  0:11 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20230512142114eucas1p112d969a89ad2480a0c10a532bd6d8440@eucas1p1.samsung.com>
2023-05-12 14:21 ` Lukasz Stelmach
2023-05-12 15:13   ` Florian Weimer
2023-05-15 13:47     ` Palmer Dabbelt
     [not found]       ` <CGME20230516065316eucas1p17bffcd25209bb441b9a9f4d263aa8b3c@eucas1p1.samsung.com>
2023-05-16  6:53         ` Lukasz Stelmach
2023-05-16  7:59           ` Szabolcs Nagy
2023-05-17  0:11             ` Palmer Dabbelt [this message]
2023-05-12 19:50   ` Fangrui Song
2023-05-12 20:11     ` Florian Weimer
2023-05-12 20:33       ` Palmer Dabbelt
2023-05-12 21:09         ` Fangrui Song
2023-05-12 21:57           ` Palmer Dabbelt
2023-05-12 22:34             ` Fangrui Song
2023-05-12 22:47               ` Palmer Dabbelt
2023-05-13  0:05                 ` Fangrui Song
2023-05-13  0:35                   ` Palmer Dabbelt
2023-05-16  3:56                     ` Fangrui Song
2023-05-16 22:51                       ` Palmer Dabbelt
2023-05-16 23:21                         ` Palmer Dabbelt
2023-05-12 20:35       ` Jeff Law

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=mhng-bd3917ba-4edf-42f4-910c-957797301206@palmer-ri-x1c9a \
    --to=palmer@dabbelt.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=binutils@sourceware.org \
    --cc=fw@deneb.enyo.de \
    --cc=fweimer@redhat.com \
    --cc=joseph@codesourcery.com \
    --cc=k.lewandowsk@samsung.com \
    --cc=l.stelmach@samsung.com \
    --cc=libc-alpha@sourceware.org \
    --cc=m.pikula@partner.samsung.com \
    --cc=m.szyprowski@samsung.com \
    --cc=maskray@google.com \
    --cc=schwab@suse.de \
    --cc=szabolcs.nagy@arm.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).