lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190211171039.GA3574@avx2>
Date:   Mon, 11 Feb 2019 20:10:39 +0300
From:   Alexey Dobriyan <adobriyan@...il.com>
To:     Ingo Molnar <mingo@...nel.org>
Cc:     tglx@...utronix.de, mingo@...hat.com, bp@...en8.de, hpa@...or.com,
        x86@...nel.org, linux-kernel@...r.kernel.org,
        torvalds@...ux-foundation.org
Subject: Re: [PATCH v-1] x86_64: new and improved memset() + question

On Mon, Feb 11, 2019 at 01:47:16PM +0100, Ingo Molnar wrote:
> * Alexey Dobriyan <adobriyan@...il.com> wrote:

> > QUESTION: is it possible to tell gcc "this function is semantically
> > equivalent to memset(3) so make high level optimizations but call it
> > when it is necessary"? I suspect the answer is "no" :-\
> 
> No idea ...
> 
> > TODO:
> > 	CONFIG_FORTIFY_SOURCE is enabled by distros
> > 	benchmarks
> > 	testing
> > 	more comments
> > 	check with memset_io() so that no surprises pop up
> 
> I'd only like to make happy noises here to make sure you continue with 
> this work - it does look promising. :-)

Thanks, Ingo.

This is really the core of the problem: once memset() becomes something
other than

	static inline void *memset(void *p, int c, size_t len)
	{
		return __builtin_memset(p, c, len);
	}

GCC starts pretending that it doesn't know what memset() is and all those
advertised space savings go to hell.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ