From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751712AbdJZG7z (ORCPT ); Thu, 26 Oct 2017 02:59:55 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:33344 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750997AbdJZG7y (ORCPT ); Thu, 26 Oct 2017 02:59:54 -0400 Date: Thu, 26 Oct 2017 09:00:03 +0200 From: Greg KH To: "Jason A. Donenfeld" Cc: "Tobin C. Harding" , kernel-hardening@lists.openwall.com, "Theodore Ts'o" , Linus Torvalds , Kees Cook , Paolo Bonzini , Tycho Andersen , "Roberts, William C" , Tejun Heo , Jordan Glover , Petr Mladek , Joe Perches , Ian Campbell , Sergey Senozhatsky , Catalin Marinas , Will Deacon , Steven Rostedt , Chris Fries , Dave Weinstein , Daniel Micay , Djalal Harouni , LKML Subject: Re: [PATCH v7] printk: hash addresses printed with %p Message-ID: <20171026070003.GA25583@kroah.com> References: <20171025222727.GB12341@eros> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 26, 2017 at 12:59:08AM +0200, Jason A. Donenfeld wrote: > On Thu, Oct 26, 2017 at 12:27 AM, Tobin C. Harding wrote: > > How good is unlikely()? > > It places that branch way at the bottom of the function so that it's > less likely to pollute the icache. But always measure it. Lots of times (old numbers were 90% or so), we get the marking wrong, so please, always benchmark the thing to verify it actually is doing what you think it should be doing, otherwise it could make the code worse. thanks, greg k-h