Date: Tue, 28 Nov 2017 21:39:57 -0500 From: Steven Rostedt Message-ID: <20171128213957.2edf5069@gandalf.local.home> In-Reply-To: <1511921105-3647-3-git-send-email-me@tobin.cc> References: <1511921105-3647-1-git-send-email-me@tobin.cc> <1511921105-3647-3-git-send-email-me@tobin.cc> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [kernel-hardening] Re: [PATCH V11 2/5] vsprintf: refactor %pK code out of pointer() 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 List-ID: 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. -- Steve > + return string(buf, end, "pK-error", spec);