220 38232 <5B0BFB66.7080501@gmx.net> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Jens Maurer <Jens.Maurer@gmx.net>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: memcpy/memset/etc overloads for volatile memory
Date: Mon, 28 May 2018 14:51:50 +0200
Lines: 22
Approved: news@gmane.org
Message-ID: <5B0BFB66.7080501@gmx.net>
References: <CAFdMc-0NAvWrkwzpgEKq4DQj=0vL_0F2s17XyR9MSUNJk5R0sw@mail.gmail.com> <420b274b-fc4b-413e-8ce9-b78131c782f7@isocpp.org>
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 1527511787 30019 195.159.176.226 (28 May 2018 12:49:47 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Mon, 28 May 2018 12:49:47 +0000 (UTC)
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:6.0.1) Gecko/20110830 Thunderbird/6.0.1
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDPMTYGK64JRB2PWV7MAKGQEYZU7VYY@isocpp.org Mon May 28 14:49:43 2018
Return-path: <std-proposals+bncBDPMTYGK64JRB2PWV7MAKGQEYZU7VYY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wr0-f200.google.com ([209.85.128.200])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDPMTYGK64JRB2PWV7MAKGQEYZU7VYY@isocpp.org>)
	id 1fNHap-0007ip-3Z
	for gclcip-std-proposals@m.gmane.org; Mon, 28 May 2018 14:49:43 +0200
Original-Received: by mail-wr0-f200.google.com with SMTP id r23-v6sf10513317wrc.2
        for <gclcip-std-proposals@m.gmane.org>; Mon, 28 May 2018 05:51:54 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1527511914; cv=pass;
        d=google.com; s=arc-20160816;
        b=GnnkwIe35HmkK0PsPliT33VEA4SKPgctpR2k/rHQYsCRAZmgNQPCDyHN9D9TUYNN0X
         1KTXK+SX9JE3I3ZlL4OJRbHTwwH84NGG3kV+jMJvwqEaZbFSb2FIzrzi+X4m5/E/1+1G
         NwKRn3g/b8oDu/fnBIeyZ054MGvECNcs0vpOM2a4CQoUjP5vVgbjgfCzfl7RgbUByTGF
         RtMEgf71HUZGhNlRXWTHNR1TXqO5bEZiNV4O5dGKqr8znMbbjq8fx4MWHZO0FL/d++ZE
         Zrc7je2XTnW9YKyF9DrSFeM6XQ9/M3zoAqscKyWPlZ5CFSEB1ODycJT8FImj1aEZmbVi
         rAwA==
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:in-reply-to:references
         :subject:to:mime-version:user-agent:from:date:message-id
         :arc-authentication-results:arc-message-signature:dkim-signature
         :arc-authentication-results;
        bh=s6iBrMjnJ4bIBOv1Fkb3o6qs5KgeCVwY58DnHj2N7bA=;
        b=BtDQbAxgInOY9uWEl0eMwp/Cn23jGd6HPDzmw2gIEYyAMNEsXRkSyC1w2MyztxNZY5
         mWEu0ypinsAQKCZyQ1CgwQvmnzTWBZr43FtkTSCw34xZSue4vx9B67ox9ups8ckjr7uy
         9WXOVOCOigDgpRc2GpVNlHmTxFRjKt0Kk9/jmaJe1/H+U9C2NJk7aDyJZhHXxISQkA9q
         uDYiwU6OGkCF7bQq9sJXsZwvBXaB5cxQ5Ud+tjhwa2vqAyh6VKOZN2SIZvhmmMnrV9sv
         YBNmHU0DvLr01wovqeUzjK1Ddz2U6ACoGK47s1upa2rviK4kaHApRqeXvpb1thVnCSOR
         MjiA==
ARC-Authentication-Results: i=2; mx.google.com;
       spf=pass (google.com: domain of jens.maurer@gmx.net designates 212.227.15.15 as permitted sender) smtp.mailfrom=Jens.Maurer@gmx.net
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=message-id:date:from:user-agent:mime-version:to:subject:references
         :in-reply-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=s6iBrMjnJ4bIBOv1Fkb3o6qs5KgeCVwY58DnHj2N7bA=;
        b=UWg/2sFxF5YZvLPIcWkuXOz7+pAfwmEsjeDXlF1MpLRb2Wu8m1ZTFppxSL38PHA2f4
         bDnHTz6KfHe290xt3IzVawBHrbW4E23sOS+pg8KOe1rnugsA5kF7l1Dz3XPIEw4r2o4o
         Nrr3ZXLwOKNY+ipIU/WV7ecmiter8qPwekDm1iD0I0dTfrWnLl6+VpVumRlcivYdnJMV
         hael2QF/j4VjpcWkEoQ0Wo37wEubITX9yOts3hgOc4Sv6X51zjbb451Twnzkh4ex4lVt
         w86X/uhKleF6QT+sSYl5MdDlRYvHAiK0uKlFCUh/Kf6Y4rIsgeAgZVWanf2XMGLO+5n6
         /d0A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to
         :subject:references:in-reply-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=s6iBrMjnJ4bIBOv1Fkb3o6qs5KgeCVwY58DnHj2N7bA=;
        b=XCwWHB6Xt4Xq0ISt1F8kltGy/vQ0Nnd+ogSqlOawBFwr50fCtTgY67y3FnLSodhvMf
         lKWRJes7y/porrXoIZ3qu1peAXj8pPDLhwOkNhlHCgjwCfvr3ls/W8N3TqZ+X9BqUFhI
         D4v/Goi8RyueFwYB4BqRbqIVm67QpjSV0LYkD+LeZtobGd4ItMHEW5uCsWeK30AM3Ad9
         vhTBx1D5NFhrBKMFX8UK0pAWyQvSFgm7u8Tyn9fYa3ukQnOG0tH8CWmu9+KbsTQpWRXL
         ENW1+Hlr7Kw4/mwv7hI/BpsyEyC13LnD3sK9eFIpOuSlRITKzsslwr6SPhKzrrlGlExk
         8vbA==
X-Gm-Message-State: ALKqPwdJfnC0rPd97nFumYEF+GJU9DTJ+ByGEIOkUPI8UFV1HroxniIY
	GZLd9eDv5Xkw+pT4vtf4ZO3ljw==
X-Google-Smtp-Source: AB8JxZrpAtXQHzK/fT8J1wZGfAXDEq/K1Nka9nX5UE0m4nuQH8C+1kjvShVbA+e2BJKEPAtqdnd/Lg==
X-Received: by 2002:adf:b646:: with SMTP id i6-v6mr933541wre.7.1527511914119;
        Mon, 28 May 2018 05:51:54 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:a1c:d10f:: with SMTP id i15-v6ls5415437wmg.2.canary-gmail;
 Mon, 28 May 2018 05:51:52 -0700 (PDT)
X-Received: by 2002:a1c:8312:: with SMTP id f18-v6mr3393768wmd.127.1527511912424;
        Mon, 28 May 2018 05:51:52 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1527511912; cv=none;
        d=google.com; s=arc-20160816;
        b=pV5/Ibq5XqQPM510z2b5aqGzSm2wgB91zZiYaNVgF/snfh73FCxAVTdVdc/MlbALBA
         /6+3PJo4gof4+oyqdQjK3Rru7x6xDLnPHnvYCmJ/8/RLZfi8axdZQvzhifZbHKOVJNkY
         87Zar1GOeEJqRmlewSiK4lTYgxCutYbBS1UhI3cS2B9VR9X4shw40ve9Xif849LBXgha
         DQsRmQUZDTRsZKyiKf0PihpI8ebGlKJaoRAPUjmCqObJQluTxc7rGWBgYG0vWPNkOvzL
         y9ANMbjPl0Hkp7Vy0RBcx8xHV9x8xuzc32566d8SOwXGqJ3sGg7InWwNUUY0avOV2lH7
         bpmA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=content-transfer-encoding:in-reply-to:references:subject:to
         :mime-version:user-agent:from:date:message-id
         :arc-authentication-results;
        bh=WiB89IB9Cq+ox5UBtpqwuxcpZH4IOV9ZOtj8975YSxk=;
        b=lTe2IY3sg9DCFhgt5yRpEXjZwis1T5sCIlryDnYaDOFVJO+pdn+lmvLzg42suZdcLt
         edeA6BvNhzRpNFG9uo4YyEw88r41zkc+tYryr64lCutbIZc+R6E0Jk3IcnB9tX00pbek
         IhAXrKPgK33/t1WxP7Krwaa9iSS007H4sPjA6ZlNTru/WZdVf0XLXeucZp0btpN6Bw4G
         axsTsXrsPGKFws0EwbCIHCXDoIKnPQjaP25UbzTDWDMP2mT3CPdiQuwkUIl3yFIPUoxE
         hQbGLSWSM8zSIq81pqzIVutTF0aFeR0lNGBM79+Pdte0BmeJj43L3qDiDhurZWdU+cgH
         7wog==
ARC-Authentication-Results: i=1; mx.google.com;
       spf=pass (google.com: domain of jens.maurer@gmx.net designates 212.227.15.15 as permitted sender) smtp.mailfrom=Jens.Maurer@gmx.net
Original-Received: from mout.gmx.net (mout.gmx.net. [212.227.15.15])
        by mx.google.com with ESMTPS id j143-v6si10608944wmf.72.2018.05.28.05.51.52
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Mon, 28 May 2018 05:51:52 -0700 (PDT)
Received-SPF: pass (google.com: domain of jens.maurer@gmx.net designates 212.227.15.15 as permitted sender) client-ip=212.227.15.15;
Original-Received: from [192.168.2.101] ([188.101.152.160]) by mail.gmx.com (mrgmx002
 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LwJFG-1gPMhV3KRy-0183Ft for
 <std-proposals@isocpp.org>; Mon, 28 May 2018 14:51:51 +0200
In-Reply-To: <420b274b-fc4b-413e-8ce9-b78131c782f7@isocpp.org>
X-Provags-ID: V03:K1:CrRnOh6TJplHKOst7/iYnljzFYut9pWquqtQgrM8gM36b/99TLa
 iIQBLiKah+4qkpMwUyUKoJQ45d0Q9vtEJ8kne8ZEL4CKkITfMpO46+nooM5Fj3f22dCl45G
 fXd9nZsCh9HAKmwUJ7AMPfI3KC9H6Gsudc571RM5kExW0prJpNvVNrxBYr6fHrc0eFjal8e
 RQmQ6wI8qolGcb1elEERQ==
X-UI-Out-Filterresults: notjunk:1;V01:K0:OFa8T034FsE=:ANqgyz1/g0kn1Yuf3MBhXz
 nwyEoiaVEADjl+sG7wYlqyJ7/+3lH44TjUIH6h3n+RgGhZl+lFqmTGJuC6e7iL1z4W/9H3GeP
 GUz4J6+WaOPHPz7c4hd1KtR9IkVhXFvfgyktlApUTek8ptdAoZYm7Zhg3Ktp57F2lonmSdGnb
 BaL3jZEoFOsDECwmRiSq/U2tc967bmvQA5WFMlRLf8usTFb7z4TP+JEWOicAwUYKoA7xu7Bjv
 GMGsj6sAZ62xsmzJ3gopeEMx80Bb8ITUCZVhlGz9e4DzAAKbQobHZrc1sGqWVbI0WqPR25Zlv
 gGfYtTmi45MryEjezYTRGbFHY7Y0nDW5hjN0LxY+YgSAnCtz1XamdIuvmdHELFa/tylZPe0S0
 j9SrD6jAi2q6o/yTlM1hSPL/uqotcA3FG5hZsjo2siflQf8F6szN+/CwQ6KZ4sOEyFeV3rSdk
 /1vaTLis2FjBTGPU0bicQN+XsUD4x3eSSMDOWDS7w3pnoFkCoABCcAXKFIPAQpNJIYdX0Pphe
 o0XTJhFi52z2/zqR60RRt0Q/MYPRlLalbReig+1CWfdsv1g5gp/efC6gt9d9a66JCoORnULHc
 fMA8s9G/lHWjoev5YV9/WkjBk20G9faCvZCh15oHYljqC2LzSl5XfIQBoFLP/VuVNDnpwkAay
 SmqfqveLCcGuFeHx0zyW5kXQMKJ1ddmneu9uiavrHUaudxAu/i+SczYRoBl48AptEPFgmh9rt
 HOkZjb4PneN4zv0SosjiRrdGeWv+h1YJWMjbsT21ZXCa42J2kozYBwRMPHJ9UpFIRxS+GsbA 
X-Original-Sender: Jens.Maurer@gmx.net
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of jens.maurer@gmx.net designates 212.227.15.15 as permitted sender) smtp.mailfrom=Jens.Maurer@gmx.net
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:38232
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/38232>

On 05/28/2018 01:09 AM, Niall Douglas wrote:
> Just there this weekend I, yet again, had to write a custom memcpy()
> implementation because the built-in one can be elided by the compiler
> during optimisation. I'd like to stop having to write memcpy()
> personally.
> 
> I think your idea has two variants:
> 
> 1. Cannot be optimised out memcpy/memset/memmove etc. I'd suggest
> secure_memset(), secure_memcpy(), secure_memmove() and so on rather
> than editions taking a volatile pointer.

ISO C11 has memset_s in K.3.7.4.1.

Jens

-- 
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/5B0BFB66.7080501%40gmx.net.

.
