mailing list of musl libc
 help / color / mirror / code / Atom feed
From: "Jₑₙₛ Gustedt" <jens.gustedt@inria.fr>
To: Joakim Sindholt <opensource@zhasha.com>
Cc: musl@lists.openwall.com
Subject: Re: [musl] [C23 string conversion 1/3] C23: add the new memset_explicit function
Date: Fri, 26 May 2023 12:18:29 +0200	[thread overview]
Message-ID: <20230526121829.4b9a9538@inria.fr> (raw)
In-Reply-To: <20230526115236.b15f8bf97a529da07fba514f@zhasha.com>

[-- Attachment #1: Type: text/plain, Size: 1532 bytes --]

Joakim,

on Fri, 26 May 2023 11:52:36 +0200 you (Joakim Sindholt
<opensource@zhasha.com>) wrote:

> I don't see how this is in any way useful. It's certainly not part of
> the standard, which only says:
> 
> > The intention is that the memory store is always performed (i.e.,
> > never elided), regardless of optimizations. This is in contrast to
> > calls to the memset function (7.26.6.1)  

There has been a long discussion in WG14 about this what is even
possible to say here. The clear intent in all discussions was to have
something that best inhibits all sorts of information leak.

What you are citing is just a footnote. The normative text says:

     The purpose of this function is to make sensitive information
     stored in the object inaccessible

So this is ist the expressed intent.

This is clearly a QoI issue. I think that indeed a sequential
reordering barrier is the minimal quality that implementations can
provide. But since this is not time critical, we might be able to
provide a bit more, with modest cost, such as synchronization with
other threads, and such as deleting the information where even the
object was located in the first place.


Thanks
Jₑₙₛ

-- 
:: ICube :::::::::::::::::::::::::::::: deputy director ::
:: Université de Strasbourg :::::::::::::::::::::: ICPS ::
:: INRIA Nancy Grand Est :::::::::::::::::::::::: Camus ::
:: :::::::::::::::::::::::::::::::::::: ☎ +33 368854536 ::
:: https://icube-icps.unistra.fr/index.php/Jens_Gustedt ::

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

  reply	other threads:[~2023-05-26 10:18 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 [this message]
2023-05-26 20:16       ` Rich Felker
2023-05-26 20:35         ` Jₑₙₛ Gustedt
2023-05-26 20:57           ` Rich Felker
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=20230526121829.4b9a9538@inria.fr \
    --to=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).