From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932509AbdK2Lyd (ORCPT ); Wed, 29 Nov 2017 06:54:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:40004 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752920AbdK2Lyb (ORCPT ); Wed, 29 Nov 2017 06:54:31 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A432521986 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=rostedt@goodmis.org Date: Wed, 29 Nov 2017 06:54:25 -0500 From: Steven Rostedt To: "Tobin C. Harding" 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 , Djalal Harouni , Radim =?UTF-8?B?S3LEjW3DocWZ?= , linux-kernel@vger.kernel.org, Network Development , David Miller , Stephen Rothwell , Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Andrew Morton Subject: Re: [PATCH V11 2/5] vsprintf: refactor %pK code out of pointer() Message-ID: <20171129065425.361903fc@gandalf.local.home> In-Reply-To: <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> <20171129042746.GF15500@eros> X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 29 Nov 2017 15:27:46 +1100 "Tobin C. Harding" wrote: > 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 ;) No problem. In fact, I can send this as a separate patch myself, on top of your series. -- Steve