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] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 2 Mar 2016 14:21:27 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:	Colin King <colin.king@...onical.com>,
	Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] perf tests: initialize sa.sa_flags

On Wed, Mar 02, 2016 at 10:03:50AM -0300, Arnaldo Carvalho de Melo wrote:
> > Would not something like:
> > 
> > 	sa = (struct sigaction){
> > 		.sa_sigaction = segfault_handler,
> > 	};
> > 	sigfillset(&sa.sa_mask);
> > 
> > Be better?
> 
> I thought about that, but isn't that set in stone? This would be a 4
> liner, while his is a one' :-)

Dunno, you're right that its rather unlikely struct sigaction is going
to grow another member, but I like the above pattern better in general,
makes it harder to end up with uninitalized bits.

When performance matters the above pattern isn't ideal, but that should
not be a concern here.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ