From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Florian Weimer <fweimer@redhat.com>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH v4 3/3] csu: Implement and use _dl_early_allocate during static startup
Date: Thu, 5 May 2022 15:25:11 -0300 [thread overview]
Message-ID: <a3c7114d-9f52-80d2-b38a-0019ca0e395f@linaro.org> (raw)
In-Reply-To: <87fslnluvq.fsf@oldenburg.str.redhat.com>
On 05/05/2022 15:03, Florian Weimer wrote:
> * Adhemerval Zanella:
>
>> I still think there will be way simpler to just use mmap here, it will allow
>> to use a generic version without the need to fiddle with a Linux specific
>> (it will be required just a wrapper to MMAP_CALL_INTERNAL, instead of an
>> implementation that need to know both sbrk and mmap internals).
>
> We need to wrap the difference in error checking as well.
>
>> I think you even clean up all the dl-brk.c and similar files required to
>> make brk/sbrk work on the loader with an allocator that only uses mmap.
>
> At the cost of additional VMAs, sure. We won't be able to reuse the
> unused tail of the allocation easily because we do not know the page
> size yet. __minimal_malloc does not yet work at this point. We also
> lose some ASLR. I'm not convinced it's worth it.
It is another code that does something similar to __minimal_malloc to
a specific usage, so now we have another allocation scheme that is used
solely for static initialization. And it does something different than
__minimal_malloc, so has different semantic.
I am not really against it, but initialization code is already
quite complex with a lot of different paths for dynamic/static case,
so I think it would be good to have single loader/static allocation
code.
next prev parent reply other threads:[~2022-05-05 18:25 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-05 15:06 [PATCH v4 1/3] ia64: Always define IA64_USE_NEW_STUB as a flag macro Florian Weimer
2022-05-05 15:07 ` [PATCH v4 2/3] Linux: Implement a useful version of _startup_fatal Florian Weimer
2022-05-05 15:28 ` Andreas Schwab
2022-05-05 15:43 ` Florian Weimer
2022-05-05 17:29 ` Adhemerval Zanella
2022-05-05 15:08 ` [PATCH v4 3/3] csu: Implement and use _dl_early_allocate during static startup Florian Weimer
2022-05-05 17:48 ` Adhemerval Zanella
2022-05-05 18:03 ` Florian Weimer
2022-05-05 18:25 ` Adhemerval Zanella [this message]
2022-05-06 10:00 ` Florian Weimer
2022-05-06 13:04 ` Adhemerval Zanella
2022-05-06 13:19 ` Adhemerval Zanella
2022-05-09 16:10 ` Florian Weimer
2022-05-09 16:52 ` Adhemerval Zanella
2022-05-09 17:08 ` Florian Weimer
2022-05-09 17:37 ` Adhemerval Zanella
2022-05-05 17:28 ` [PATCH v4 1/3] ia64: Always define IA64_USE_NEW_STUB as a flag macro Adhemerval Zanella
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=a3c7114d-9f52-80d2-b38a-0019ca0e395f@linaro.org \
--to=adhemerval.zanella@linaro.org \
--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).