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:	Tue, 7 Apr 2015 12:19:42 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Daniel Thompson <daniel.thompson@...aro.org>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	Jason Cooper <jason@...edaemon.net>,
	Russell King <linux@....linux.org.uk>,
	Will Deacon <will.deacon@....com>,
	Catalin Marinas <catalin.marinas@....com>,
	Marc Zyngier <marc.zyngier@....com>,
	Stephen Boyd <sboyd@...eaurora.org>,
	John Stultz <john.stultz@...aro.org>,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	patches@...aro.org, linaro-kernel@...ts.linaro.org,
	Sumit Semwal <sumit.semwal@...aro.org>,
	Dirk Behme <dirk.behme@...bosch.com>,
	Daniel Drake <drake@...lessm.com>,
	Dmitry Pervushin <dpervushin@...il.com>,
	Tim Sander <tim@...eglstein.org>,
	"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org
Subject: Re: [RESEND PATCH 4.0-rc5 v19 5/6] x86/nmi: Use common printk
 functions

On Tue,  7 Apr 2015 16:38:02 +0100
Daniel Thompson <daniel.thompson@...aro.org> wrote:

  
>  void arch_trigger_all_cpu_backtrace(bool include_self)
>  {
> -	struct nmi_seq_buf *s;
> -	int len;
> -	int cpu;
>  	int i;
>  	int this_cpu = get_cpu();
>  
> -	if (test_and_set_bit(0, &backtrace_flag)) {
> +	if (0 != printk_nmi_backtrace_prepare()) {

Not sure what the others think, but I hate this polish notation for
compares. One does not say "if zero does not equal
printk_nmi_backtrace_prepare()", they say "if
printk_nmi_backtrace_prepare() does not return zero".

And the reason for polish notation is to prevent the:

	if (x = 0)

mistake. Which gcc warns about anyway. Also, this doesn't even pertain
to this code because:

	if (printk_nmi_backtrace_prepare() = 0)

would fail to compile.

-- Steve

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ