From: Carlos O'Donell <carlos@redhat.com>
To: Stefan O'Rear <sorear@fastmail.com>,
Stefan O'Rear via Libc-alpha <libc-alpha@sourceware.org>
Subject: Re: RFC: malloc and secure memory.
Date: Sun, 27 Sep 2020 08:39:16 -0400 [thread overview]
Message-ID: <56fc4679-0cd6-be49-8735-60fdea8da0d4@redhat.com> (raw)
In-Reply-To: <e884d207-6180-48af-a5cf-e8469bcb9e1f@www.fastmail.com>
On 9/25/20 7:39 PM, Stefan O'Rear via Libc-alpha wrote:
> On Thu, Sep 24, 2020, at 4:56 PM, Carlos O'Donell via Libc-alpha wrote:
>> In reviewing this discussion:
>> https://github.com/systemd/systemd/pull/14213
>>
>> The request is for a way to mark some allocations as "secure"
>> and to give them special properties.
>>
>> I wonder if we can't do this in some generic way:
>>
>> - Make arenas a first class construct.
>>
>> /* Get arena with special properties. */
>> malloc_arena *secure_arena = NULL;
>> /* Get a handle to an arena that has secure heaps. If glibc can make this
>> kind of arena and heap then it does, otherwise it returns NULL. */
>> secure_arena = malloc_arena_get (HEAP_SECURE);
>> /* Does this glibc support his kind of arena? */
>> if (secure_arena == NULL)
>> abort();
>
> This is a bit late and I apologize, but is there any possibility of choosing
> a more descriptive name than SECURE for this? It's extremely vague, will mean
> something different for everybody, and because security is a situational and
> global property of systems, I would generally consider it incorrect to use
> "secure" to describe local and binary properties of subsystems.
Sure. This is an RFC and largely a proposal to simply spark some conversation
and elucidate opinions.
I like Florian's suggestion that this is largely something that could be handled
with a new API to avoid problematic use cases. And if you have a new API it need
not be a part of glibc.
--
Cheers,
Carlos.
next prev parent reply other threads:[~2020-09-27 12:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-24 20:56 Carlos O'Donell
2020-09-25 6:39 ` Florian Weimer
2020-09-25 16:10 ` Carlos O'Donell
2020-09-25 23:39 ` Stefan O'Rear
2020-09-27 12:39 ` Carlos O'Donell [this message]
2020-09-26 17:07 ` Rich Felker
2020-09-27 14:04 ` Carlos O'Donell
2020-09-27 20:29 ` Florian Weimer
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=56fc4679-0cd6-be49-8735-60fdea8da0d4@redhat.com \
--to=carlos@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=sorear@fastmail.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).