Gentoo Archives: gentoo-user

From: Jorge Almeida <jjalmeida@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: memset_s
Date: Wed, 15 Nov 2017 09:05:28
Message-Id: CAKpSnpKrD8O6+zQ0azFxiJFrB6xGFMe5--h-NcXR9Am_PceSyw@mail.gmail.com
In Reply to: [gentoo-user] Re: memset_s by Nikos Chantziaras
1 On Wed, Nov 15, 2017 at 12:54 AM, Nikos Chantziaras <realnc@×××××.com> wrote:
2 > On 14/11/17 19:36, Jorge Almeida wrote:
3 >>
4 >> On Fri, Nov 10, 2017 at 12:09 PM, Jorge Almeida <jjalmeida@×××××.com>
5 >> wrote:
6 >>
7
8 >
9 > Unless you look at the assembly output, you can't be sure. Some optimization
10 > is done even at -O0.
11 >
12 > I'd stick to using explicit_bzero() which is safe regardless of compiler
13 > vendor *and* version.
14 >
15 But what about overwriting with random bytes? Having "explicit-*"
16 versions of whatnot seems madness. BTW, I checked the assemby,
17 memset() is there. But there should be way to tell the compiler "do
18 what I say".
19
20 Jorge

Replies

Subject Author
[gentoo-user] Re: memset_s Nikos Chantziaras <realnc@×××××.com>