220 40423 <CANiq72mnWuMGNT27jVueGTvnk4eGNKWsMbWPJnejC1tPxhT7WA@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: more security concerns
Date: Tue, 9 Oct 2018 14:26:04 +0200
Lines: 33
Approved: news@gmane.org
Message-ID: <CANiq72mnWuMGNT27jVueGTvnk4eGNKWsMbWPJnejC1tPxhT7WA@mail.gmail.com>
References: <CAFdMc-0NqfbqeOhhH1YiVGxDRVPv7COKNqge3mLu8UE8SgcXNw@mail.gmail.com>
 <CAO8_tC4kNZ6s-xMXo69n1D3dbOMkqt0fjLU44Uq5TfABp17hQQ@mail.gmail.com>
 <CAFdMc-1DpAUkYDVyNmP5H49XyNVDq5_T6UkEVaQGMGA0YEhNGw@mail.gmail.com>
 <CANiq72=4-NBXg28AVBbaY83jLgTNRowmKiMT8Sgk28jTUu2xfw@mail.gmail.com> <CAFdMc-2KfkjwOaiQCbqCnMOH0LfMUdVJouJ-uRSUFZzhqk37tg@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: blaine.gmane.org 1539087854 28311 195.159.176.226 (9 Oct 2018 12:24:14 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Tue, 9 Oct 2018 12:24:14 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDRZHGH43YJRB2N46LOQKGQELYSSA7Y@isocpp.org Tue Oct 09 14:24:10 2018
Return-path: <std-proposals+bncBDRZHGH43YJRB2N46LOQKGQELYSSA7Y@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lj1-f197.google.com ([209.85.208.197])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDRZHGH43YJRB2N46LOQKGQELYSSA7Y@isocpp.org>)
	id 1g9r3Y-0007HA-Sh
	for gclcip-std-proposals@m.gmane.org; Tue, 09 Oct 2018 14:24:08 +0200
Original-Received: by mail-lj1-f197.google.com with SMTP id v62-v6sf418468lje.9
        for <gclcip-std-proposals@m.gmane.org>; Tue, 09 Oct 2018 05:26:19 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1539087978; cv=pass;
        d=google.com; s=arc-20160816;
        b=KS+frTHf4rmQheG+Q+uDWP7odazmDeurP8ylkzmR213r+FwC4pY7vgx4KOTXhZqf0V
         IOANnD2+NIeQ/pKsTvPqQAYzkdUgbbVs55yQsNkGkPI3PNDnhtnF2RtG+Qqg702B+a50
         mWu7r17jXnCK1QlLkeJOKFko13Is96I5yJkLtRjm4QawV6rLrrS4sOlvQ9EbLYZ2Cl7q
         UuCnC2Z4gkwMZbDesUN0BM8f1kTAu0TV/NSYs7hI2dsvjuMwTwXmoaizC7DPlJ7cz3d+
         hAxoGRgNSQhzvlSqAkPhVBVSNxJM8zY1mkZxKMRKr8bqb9KFeb94WWMkAcxiziJKds6T
         q/QQ==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:to:subject:message-id:date
         :from:in-reply-to:references:mime-version:dkim-signature;
        bh=0hrGHIiHNRRI1aCaPyqgGNbkaeKcpbIh2VRa05ROzUs=;
        b=srscdDxezRZThhqaTrhxzcJuR2Lh8y7J6AcwideexQqaMlAEz/w8sU7HoJU4fv6Ojc
         h5S4pYx14xTKVjWAemfS4tqqPzxBp0XHAmGj1o9JSmnC9bCpS2S+LAnSJvmWlmCy7G63
         WF4U9POi9SwzlOAa/5FUxPTstqj8tdU64zNUo6WVYKW4qUYSPtWFzPVmQrRkn04eZLXF
         OCUOE+orQxLZploz3h7o391urXXQj8IQguB8LoMtXs0fqrZci/PQVdRNU9wMUlmZO50K
         dihGBj3R2ywX5OvS7ZN+5cXzTrE8DQiv7qzPvPTU7iqUdZ6LTgS3EnBatkNxgbUAkl+n
         JUew==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b="es/JwfRE";
       spf=pass (google.com: domain of miguel.ojeda.sandonis@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=miguel.ojeda.sandonis@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:references:in-reply-to:from:date:message-id:subject:to
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=0hrGHIiHNRRI1aCaPyqgGNbkaeKcpbIh2VRa05ROzUs=;
        b=teYGhAjdDqX8X+L3i+A3/yyR9ocvsPNwxVSsubjXYzRofxSH9mH3nwYySvBqcaeSd6
         ErEogNwqyh/ANEn0kCUZxXRmZ/0uq37mBjeoaJkAydprcJ6vmnsVcPt57xURTz2AQVTc
         4FqF10e8uPdT+yotzn8ZJX0zugqOmZA7rgf5FM272nN2IcfcnqYZK8tRl6YgqEi3aqMV
         wNQCDMhx4b/HG7DOzgPUVhIh+8KPp34X3Mgpltr/+DU1Klvou7kUfVWX2gHy3B8wkyGR
         JFw9flnFvVtPNtFCz8h8TE/FLJ2Kj0K08whc2R9+m9XjcujIjaYp8qOkZGt0PsMi18u/
         ikGA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:references:in-reply-to:from:date
         :message-id:subject:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=0hrGHIiHNRRI1aCaPyqgGNbkaeKcpbIh2VRa05ROzUs=;
        b=XdUinanWl1vnhxOCCHodsTetRs3wbaf4qTQ2Zh8X1XgOseCIVXVVvJU457RRcusBQs
         MMJeAs5v4EAYzZ7lZpnfyRUqGQZGNaH2GTq+uFD/qsm29byInQM+b5jLuwckAuIVnPr2
         eMuS91l+oIM1LmxH/PBksTSkp8R8vvgiolxvIn6i7MoNruCeSRWP+t6JOtkdmuXdtvKj
         wtK7tYFSTmTlbQxAAiVxEK3QKczfVk/peaVsBAMfUtjSk6wtO3C86GTa6TUKPX0CrQ8h
         X7kH1bjdjHqiipLU+icniMLgU8efpntoX78ByI/oJ2zQwE1GXrfNCvG87isWQFm8pgsz
         nAcQ==
X-Gm-Message-State: ABuFfogv1MhGlhjzsihcxMyBTd3omgcTkCu8no/vhbry3+UvLrVq9WGs
	b0A0YFVHKJeYKLd9qvmYjdql2g==
X-Google-Smtp-Source: ACcGV63wr4ppoUugBJjKxWv9D6128iSBXyptxbCvsY1qD7fn9WM7BDPvGoMKWJ8cirMrnheHvR19Qg==
X-Received: by 2002:a19:7905:: with SMTP id u5-v6mr713402lfc.28.1539087977701;
        Tue, 09 Oct 2018 05:26:17 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:a19:d819:: with SMTP id p25-v6ls108005lfg.19.gmail; Tue, 09
 Oct 2018 05:26:16 -0700 (PDT)
X-Received: by 2002:a19:1588:: with SMTP id 8-v6mr15892211lfv.36.1539087976519;
        Tue, 09 Oct 2018 05:26:16 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1539087976; cv=none;
        d=google.com; s=arc-20160816;
        b=YsYwvvD9DmND/JWkcoVKNV3u6mCqtSwxjX/5bW5/08Oe86qFGc5GU6mvetJuNw1ySI
         kXjo+1JMj/FiAI3zpzX5BkSDMSaw4jBI+HgCcl5r0m8Uw6bCh9gvSoqQ0UykH80YPkx5
         zgjEzMJqKowxbV1E1mDfGYH9MHcAeNC4GWoUXEKLiv1TeVAwtSqHQM8C0nQXYrTF4WNp
         oCrWoPp1qUUHnhOSxU3167TSua8WEtKkXvhdboqhQXHTvOdSga2VH96uVRKqggOGM7aA
         ZJbqc6p3PhV6G8hfGeRbLTsgW+Jpsn/KXhrn4jDD3DnlqUUbu0pG7TGRHYvIstl/dE92
         E95w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=to:subject:message-id:date:from:in-reply-to:references:mime-version
         :dkim-signature;
        bh=D6H3meg9MyzpocklfsWZEJxKLroPZDOC9dkvCbSlrqo=;
        b=i9co4/WPLLrdO1kaIdd4NzGvHV/GZ2ALIFsyb0FyQMNVMAcrZK+ThbWOkK/NNPJiST
         sluB3PPYnQLGrx3Catzxd7eWaVC61UIn4NfZnoSBV/iXHlYCwnV9vGcEE55ftWSk+KWW
         8878pb8yIN5cyAWxkLbGHrh3JLpkQQqkxImPyc3PZxaRQMGjWuoAPn3+fJ3I/ibziCGh
         NyN16L7nTOIEyT6rLikY3Oo9wPJvqEjhAr3QCmSjfsNFcSSfxQybU2MfBtMcBGQz3Iem
         JlKC76/icfVjqIl/aRoGlZXXqmLXDjbWe2XhmY88Yy0fODMqK1ySPSOyJ2mEEZVPxrXl
         Qzuw==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b="es/JwfRE";
       spf=pass (google.com: domain of miguel.ojeda.sandonis@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=miguel.ojeda.sandonis@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Original-Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41])
        by mx.google.com with SMTPS id x17-v6sor3163081lji.37.2018.10.09.05.26.16
        for <std-proposals@isocpp.org>
        (Google Transport Security);
        Tue, 09 Oct 2018 05:26:16 -0700 (PDT)
Received-SPF: pass (google.com: domain of miguel.ojeda.sandonis@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Received: by 2002:a2e:9d7:: with SMTP id 206-v6mr18800975ljj.127.1539087976101;
 Tue, 09 Oct 2018 05:26:16 -0700 (PDT)
In-Reply-To: <CAFdMc-2KfkjwOaiQCbqCnMOH0LfMUdVJouJ-uRSUFZzhqk37tg@mail.gmail.com>
X-Original-Sender: miguel.ojeda.sandonis@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20161025 header.b="es/JwfRE";       spf=pass
 (google.com: domain of miguel.ojeda.sandonis@gmail.com designates
 209.85.220.41 as permitted sender) smtp.mailfrom=miguel.ojeda.sandonis@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: std-proposals@isocpp.org
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:40423
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/40423>

Hi Daniel,

On Tue, Oct 9, 2018 at 12:34 PM Daniel Gutson <danielgutson@gmail.com> wrote:
>
> I just read the proposal and I'm glad I'm not alone :)
> Please keep in mind that there are other cases. For example, doing stuff over IO mapped memory.
> This particularly may be a bug and a different thread, but a call to std::fill_n over a volatile-qualified buffer gets removed in the gcc, clang, icc and MSVC.
> OTOH does your secure_val allow the value placed in registers?
>

Sure, and actually a vendor may be encouraged to place such memory in
registers if at all possible, since that would directly remove any
concerns about leaks from the memory or the cache; as explained in the
proposal.

The proposal does not specify where the value should be stored -- that
is one of the keys: it could even be stored in some "special" kind of
memory. Basically, the implementer decides what is the best option for
the given T and their platform/OS/etc. What is important is that they
do as much effort as possible to protect the value for the users.

The goal, in the end, is that application users have an easy way to
mark what is supposed to be protected and when such value is accessed.

Cheers,
Miguel

-- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CANiq72mnWuMGNT27jVueGTvnk4eGNKWsMbWPJnejC1tPxhT7WA%40mail.gmail.com.

.
