From: Rich Felker <dalias@libc.org>
To: "Jₑₙₛ Gustedt" <jens.gustedt@inria.fr>
Cc: Joakim Sindholt <opensource@zhasha.com>, musl@lists.openwall.com
Subject: Re: [musl] [C23 string conversion 1/3] C23: add the new memset_explicit function
Date: Fri, 26 May 2023 16:57:21 -0400 [thread overview]
Message-ID: <20230526205720.GP4163@brightrain.aerifal.cx> (raw)
In-Reply-To: <20230526223552.7878f5f0@inria.fr>
On Fri, May 26, 2023 at 10:35:52PM +0200, Jₑₙₛ Gustedt wrote:
> Rich,
>
> on Fri, 26 May 2023 16:16:03 -0400 you (Rich Felker <dalias@libc.org>)
> wrote:
>
> > We had all of these discussions back when explicit_bzero was added,
> > and it was done the way it was done because it's portable (within the
> > framework of what musl already requires) and non-arch-specific, has
> > zero overhead, avoids any code duplication or bad performance
> > open-coding another memset variant,
>
> My impression is that such information is quite difficult to find, but
> maybe I didn't search enough. Sometimes code comments would help ;-)
It was discussed in the "thoughts on reallocarray, explicit_bzero?"
thread in 2014, starting here:
https://www.openwall.com/lists/musl/2014/05/19/3
> Bad performance really isn't a valid argument in this case. This is
> not supposed to be efficient. Any user that uses this has to know that
> they are trading it for something.
I'm not sure whether performance here is a good criterion or not, but
making it ~gratuitously~ slow with an extra implementation of memcpy
open-coded here does not make sense.
> > and avoids taking part in any security theater (pretending we can
> > clear things we can't).
>
> It is not about taking part. For me it is just about offering to our
> users the best service for this tricky question that we may, and not
> less.
Do you have something in mind about how the explcit_bzero
implementation we have doesn't do that?
Rich
next prev parent reply other threads:[~2023-05-26 20:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-26 9:25 [musl] [C23 string conversion 0/3] Jens Gustedt
2023-05-26 9:25 ` [musl] [C23 string conversion 1/3] C23: add the new memset_explicit function Jens Gustedt
2023-05-26 9:52 ` Joakim Sindholt
2023-05-26 10:18 ` Jₑₙₛ Gustedt
2023-05-26 20:16 ` Rich Felker
2023-05-26 20:35 ` Jₑₙₛ Gustedt
2023-05-26 20:57 ` Rich Felker [this message]
2023-05-27 6:49 ` Jₑₙₛ Gustedt
2023-05-27 13:52 ` Rich Felker
2023-05-28 10:13 ` NRK
2023-05-29 7:48 ` Jₑₙₛ Gustedt
2023-05-26 9:25 ` [musl] [C23 string conversion 2/3] C23: implement the c8rtomb and mbrtoc8 functions Jens Gustedt
2023-05-26 9:25 ` [musl] [C23 string conversion 3/3] C23: add the new include guards for string.h and wchar.h Jens Gustedt
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=20230526205720.GP4163@brightrain.aerifal.cx \
--to=dalias@libc.org \
--cc=jens.gustedt@inria.fr \
--cc=musl@lists.openwall.com \
--cc=opensource@zhasha.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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
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 NNTP newsgroup(s).