public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "Stefan O'Rear" <sorear@fastmail.com>
To: "Stefan O'Rear via Libc-alpha" <libc-alpha@sourceware.org>
Subject: Re: RFC: malloc and secure memory.
Date: Fri, 25 Sep 2020 19:39:41 -0400	[thread overview]
Message-ID: <e884d207-6180-48af-a5cf-e8469bcb9e1f@www.fastmail.com> (raw)
In-Reply-To: <58adb753-aecf-d367-6dbe-bb475c4c4d2c@redhat.com>

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.

-s

  parent reply	other threads:[~2020-09-25 23:40 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 [this message]
2020-09-27 12:39   ` Carlos O'Donell
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=e884d207-6180-48af-a5cf-e8469bcb9e1f@www.fastmail.com \
    --to=sorear@fastmail.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).