public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Florian Weimer <fweimer@redhat.com>, "Soni L." <fakedme+libc@gmail.com>
Cc: Libc-help <libc-help@sourceware.org>
Subject: Re: inode-based dlopen caching
Date: Tue, 8 Jun 2021 16:25:29 -0300	[thread overview]
Message-ID: <d140f911-20d0-34d5-7518-48517d41e51e@linaro.org> (raw)
In-Reply-To: <87czsw9q6o.fsf@oldenburg.str.redhat.com>



On 08/06/2021 15:17, Florian Weimer wrote:
> * Soni L.:
> 
>> The motivating use-case is hexchat plugins. Especially when they're
>> written in Rust. Rust is supposed to provide memory safety but some
>> edge-cases with dlopen break that, like truncating the shared library,
>> or closing a shared library that has spawned threads.
> 
> Truncating the shared object will always cause problems until the kernel
> implements MAP_COPY, or we stop mapping code in the dynamic loader.

Which I recall some discussion from Linus won't going to happen (unless
he changed his mind, the discussion it some years old already).

> 
> Another option (implemented by GHC and others) is to have a customer
> loader.  Except for initial-exec memory and symbol interposition, there
> is nothing magic at all about dlopen.  Applications certainly can
> implement their own object code loading mechanisms.

I think the main problem is implement all the ELF idiosyncrasies
correctly, assuming that ELF is used in first place.

      reply	other threads:[~2021-06-08 19:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-05 13:59 Soni L.
2021-06-07 21:53 ` Adhemerval Zanella
2021-06-07 22:50   ` Soni L.
2021-06-08 13:14     ` Adhemerval Zanella
2021-06-08 16:26       ` Soni L.
2021-06-08 16:51         ` Adhemerval Zanella
2021-06-08 16:56 ` Florian Weimer
2021-06-08 17:19   ` Adhemerval Zanella
2021-06-08 17:20     ` Florian Weimer
2021-06-08 18:10       ` Soni L.
2021-06-08 18:17         ` Florian Weimer
2021-06-08 19:25           ` Adhemerval Zanella [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=d140f911-20d0-34d5-7518-48517d41e51e@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=fakedme+libc@gmail.com \
    --cc=fweimer@redhat.com \
    --cc=libc-help@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).