From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Tobin C. Harding" Subject: Re: [PATCH V11 2/5] vsprintf: refactor %pK code out of pointer() Date: Wed, 29 Nov 2017 15:27:46 +1100 Message-ID: <20171129042746.GF15500@eros> References: <1511921105-3647-1-git-send-email-me@tobin.cc> <1511921105-3647-3-git-send-email-me@tobin.cc> <20171128213957.2edf5069@gandalf.local.home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kernel-hardening@lists.openwall.com, Linus Torvalds , "Jason A. Donenfeld" , Theodore Ts'o , 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 Return-path: Content-Disposition: inline In-Reply-To: <20171128213957.2edf5069@gandalf.local.home> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Tue, Nov 28, 2017 at 09:39:57PM -0500, Steven Rostedt wrote: > On Wed, 29 Nov 2017 13:05:02 +1100 > "Tobin C. Harding" wrote: > > > + /* > > + * kptr_restrict==1 cannot be used in IRQ context > > + * because its test for CAP_SYSLOG would be meaningless. > > + */ > > + if (in_irq() || in_serving_softirq() || in_nmi()) > > This could be replaced with: > > if (!in_task()) > > Which is actually more efficient. thanks for the comment Steve. At this late stage in the game do you mind if I don't include this change in this set. The code line in question is only in the series because of refactoring. I'm comfortable arguing that improving efficiency is out of scope ;) thanks, Tobin.