From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8B5501396D9 for ; Wed, 15 Nov 2017 09:05:28 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4353FE0CAB; Wed, 15 Nov 2017 09:05:23 +0000 (UTC) Received: from mail-ot0-x234.google.com (mail-ot0-x234.google.com [IPv6:2607:f8b0:4003:c0f::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D1BACE0C31 for ; Wed, 15 Nov 2017 09:05:22 +0000 (UTC) Received: by mail-ot0-x234.google.com with SMTP id v15so9872937ote.6 for ; Wed, 15 Nov 2017 01:05:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=4qGhf2wYeIBpfOgdAImUbmxWONBn0JtkwxFODXXvFYA=; b=huazTd9Qpw+OgL9AhiKIcCsVQFHsLrYPObsT6Rz7cwHfn2KzdK1t5MoqpX0sRnIirp U9NYdGpCrL8wvx1FBH1HaMLOvifvEjamysjTLNTYo3ZyQZdnuVLZ8EYzlal875/VtHyx QTnOMsbb6pwQsejaXXoMWyFRkHS4jmtFmHOHS+dPh8RVdVISSkrukmJPSoJ9rLUp5bRK O/+xHeUQWxD0NnKdMzTmF6NQMh+V+N1aa4Jmbp+/RfxjXDj2WnFLCQ9eqRVVwjxzSQvs pZ5ccHn/7DBlvVc1rV5KGwwWEbgsnynC+hHpAyCGSuzalj8tcy1NQArx8mvncX7QSZG8 dhXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=4qGhf2wYeIBpfOgdAImUbmxWONBn0JtkwxFODXXvFYA=; b=drj8JKOtZomeLPLqGSEnQ+Sk9QSUcfav7mTsKgTJ8YmUuNZiB+M/p0Zo1i0rfOPSnp sx+4segcQrVe/KI+o7A/Pn0GigJZ7GPy7W9WEcr6MCRoAPhaarGcGSCmbchakT1pgK6g 7mIiO+q2nyOxXMHB8KSOxYaqX+UgS8t6ZsoCa9/sMG+y1xMvM7Ts253ecHPlnQOgvjDT qjekFoUgO1YpLVVA7OoxPuMOo3bLV4TWNnFfTLLCUjvZnLcfa+lw+QNjx+HPI+siV1Z7 mQD+aMDOjyub90nyOdfjDWp9czdkZmC6PL1GfEJ2jq9tLodDIrnylCbn8fXdPXC6HPxP 7sBQ== X-Gm-Message-State: AJaThX75YFbrB3Zm/t8Y9x76/KXgBciKZQmx+R4eduoJm0KQv82rB68m uhAmGe1pe/LfOqKsnH7kXHU0e5diJgg/gitNsI4= X-Google-Smtp-Source: AGs4zMaPr+XByYHeYct2/bvo6Is90jTTGNut4xgRxYynqdC37HXZp25jd0lsFDbyRjwOtkIbtVFfMupYlHqwTSZiOSY= X-Received: by 10.157.80.24 with SMTP id a24mr8515601oth.335.1510736721684; Wed, 15 Nov 2017 01:05:21 -0800 (PST) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.157.83.24 with HTTP; Wed, 15 Nov 2017 01:05:01 -0800 (PST) In-Reply-To: References: <26501197.ioODuGg76y@thetick> From: Jorge Almeida Date: Wed, 15 Nov 2017 01:05:01 -0800 Message-ID: Subject: Re: [gentoo-user] Re: memset_s To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset="UTF-8" X-Archives-Salt: 915550c6-7693-4cc2-87e1-aa16ab106f0d X-Archives-Hash: 86ad4989ae5a4f0cc0e15c983cccaadc On Wed, Nov 15, 2017 at 12:54 AM, Nikos Chantziaras wrote: > On 14/11/17 19:36, Jorge Almeida wrote: >> >> On Fri, Nov 10, 2017 at 12:09 PM, Jorge Almeida >> wrote: >> > > Unless you look at the assembly output, you can't be sure. Some optimization > is done even at -O0. > > I'd stick to using explicit_bzero() which is safe regardless of compiler > vendor *and* version. > But what about overwriting with random bytes? Having "explicit-*" versions of whatnot seems madness. BTW, I checked the assemby, memset() is there. But there should be way to tell the compiler "do what I say". Jorge