From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932952AbdJ3VYd (ORCPT ); Mon, 30 Oct 2017 17:24:33 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:46181 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932789AbdJ3VYc (ORCPT ); Mon, 30 Oct 2017 17:24:32 -0400 X-ME-Sender: Date: Tue, 31 Oct 2017 08:24:28 +1100 From: "Tobin C. Harding" To: Steven Rostedt Cc: "Jason A. Donenfeld" , kernel-hardening@lists.openwall.com, "Theodore Ts'o" , Linus Torvalds , Kees Cook , Paolo Bonzini , Tycho Andersen , "Roberts, William C" , Tejun Heo , Jordan Glover , Greg KH , Petr Mladek , Joe Perches , Ian Campbell , Sergey Senozhatsky , Catalin Marinas , Will Deacon , Chris Fries , Dave Weinstein , Daniel Micay , Djalal Harouni , LKML Subject: Re: [PATCH v7] printk: hash addresses printed with %p Message-ID: <20171030212428.GR12341@eros> References: <1508798008-1692-1-git-send-email-me@tobin.cc> <20171024003158.GB1429@eros> <20171025034934.GD15832@eros> <20171030162244.4f55e623@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171030162244.4f55e623@gandalf.local.home> X-Mailer: Mutt 1.5.24 (2015-08-30) User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 30, 2017 at 04:22:44PM -0400, Steven Rostedt wrote: > On Wed, 25 Oct 2017 14:49:34 +1100 > "Tobin C. Harding" wrote: > > > > First, the static_key stuff. > > > > DEFINE_STATIC_KEY_TRUE(no_ptr_secret) : Doesn't sleep, just a > > declaration. > > > > if (static_branch_unlikely(&no_ptr_secret)) {} : Doesn't sleep, just > > some assembler to jump to returning true or false. > > > > static_branch_disable(&no_ptr_secret) : Doesn't sleep, just atomic read > > and set and maybe a WARN_ONCE. > > How quickly do you need static_branch_disable() executed? You could > always pass the work off to a worker thread (that can schedule). > > random_ready_callback -> initiates worker thread -> enables the static branch > > -- Steve thanks Steve, v8 and onward does away with the static branch and uses a global boolean instead. thanks, Tobin.