public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: stsp <stsp2@yandex.ru>
To: Florian Weimer <fweimer@redhat.com>,
	Stas Sergeev via Libc-alpha <libc-alpha@sourceware.org>
Subject: Re: [PATCH 2/2] dlfcn,elf: implement dlmem() function [BZ #11767]
Date: Sat, 18 Mar 2023 21:58:17 +0500	[thread overview]
Message-ID: <593c02f1-5a20-07c4-9736-1f35705f154b@yandex.ru> (raw)
In-Reply-To: <87mt5ga82l.fsf@oldenburg.str.redhat.com>

Hi,

14.02.2023 14:51, Florian Weimer пишет:
> * Stas Sergeev via Libc-alpha:
>
>> This patch adds the following function:
>> void *dlmem(const unsigned char *buffer, size_t size, int flags);
>>
>> It is the same as dlopen() but allows to dynamic-link solibs from
>> the memory buffer, rather than from a file as dlopen() does.
>>
>> "buffer" arg is the pointer to the solib image in memory.
>> "size" is the solib image size. Must be smaller-or-equal to the
>> actual buffer size.
>> "flags" is the same flags argument used in dlopen().
>>
>> The idea behind the implementation is very simple: where the
>> dlopen() would mmap() the file, dlmem() does anonymous
>> mmap()+memcpy().
> With the mandatory copy, I'm not sure if this is a substantial
> improvement over the pedestrian implementation using memfd_create,

Hope the need/features of my dlmem()
impl was explained since then.
But now I posted v9 that uses memcpy()
only as an opt-in, not by default. Unfortunately
I haven't made it to work on kernels older
than 5.13, so on those it still falls back to
memcpy().
Are there any other things left to implement?


  parent reply	other threads:[~2023-03-18 16:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-14  8:41 [PATCH v4 0/2] implement dlmem() function Stas Sergeev
2023-02-14  8:41 ` [PATCH 1/2] elf: strdup() l_name if no realname [BZ #30100] Stas Sergeev
2023-02-14  8:41 ` [PATCH 2/2] dlfcn,elf: implement dlmem() function [BZ #11767] Stas Sergeev
2023-02-14  9:51   ` Florian Weimer
2023-02-14 13:13     ` stsp
2023-02-15 11:30     ` stsp
2023-03-18 16:58     ` stsp [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-02-15 11:21 [PATCH v5 0/2] implement dlmem() with audit extension Stas Sergeev
2023-02-15 11:21 ` [PATCH 2/2] dlfcn,elf: implement dlmem() function [BZ #11767] Stas Sergeev
2023-02-13 13:23 [PATCH v3 0/2] implement dlmem() function Stas Sergeev
2023-02-13 13:23 ` [PATCH 2/2] dlfcn,elf: implement dlmem() function [BZ #11767] Stas Sergeev
2023-02-13 13:45   ` Florian Weimer
2023-02-13 16:36     ` stsp
2023-02-14  8:43     ` stsp
2023-03-18 17:28     ` stsp
2023-02-10 14:07 [PATCH 1/2] elf: strdup() l_name if no realname [BZ #30100] Stas Sergeev
2023-02-10 14:07 ` [PATCH 2/2] dlfcn,elf: implement dlmem() function [BZ #11767] Stas Sergeev
2023-02-10 21:51   ` Joseph Myers
2023-02-11 20:10     ` stsp
2023-02-13 21:46       ` Joseph Myers
2023-02-14  8:42         ` stsp

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=593c02f1-5a20-07c4-9736-1f35705f154b@yandex.ru \
    --to=stsp2@yandex.ru \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@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).