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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 5 Oct 2015 10:49:19 +0300
From:	Leon Romanovsky <leon@...n.nu>
To:	Geliang Tang <geliangtang@....com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
	Hugh Dickins <hughd@...gle.com>,
	"Peter Zijlstra (Intel)" <peterz@...radead.org>,
	Andrea Arcangeli <aarcange@...hat.com>,
	Joonsoo Kim <js1304@...il.com>, Arnd Bergmann <arnd@...db.de>,
	Paul Gortmaker <paul.gortmaker@...driver.com>,
	Oleg Nesterov <oleg@...hat.com>, Linux-MM <linux-mm@...ck.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/3] mm/nommu: drop unlikely behind BUG_ON()

On Sun, Oct 04, 2015 at 07:04:06PM -0700, Davidlohr Bueso wrote:
> On Sun, 04 Oct 2015, Leon Romanovsky wrote:
> 
> >On Sun, Oct 4, 2015 at 9:18 AM, Geliang Tang <geliangtang@....com> wrote:
> >>BUG_ON() already contain an unlikely compiler flag. Drop it.
> >It is not the case if CONFIG_BUG and HAVE_ARCH_BUG_ON are not set.
> 
> Yeah, but that's like the 1% of the cases -- and those probably don't even care
> about the branch prediction (I could be wrong). So overall I like getting rid of
> explicit BUG_ON(unlikely(... calls. In fact there's a _reason_ why there are so
> few of them in the kernel.
I agree with you that this change is welcomed and I would like to see it
is accepted.

My main concern that I would expect to see it's coming after the change
of BUG_ON definition to be similar in all places, with "unlikely" in all
definitions, and not instead.

> 
> Thanks,
> Davidlohr
--
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