From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [PATCH v3 04/22] x86/doublefault: Make memmove() notrace/NOKPROBE Date: Wed, 19 Feb 2020 16:40:31 +0100 Message-ID: <20200219154031.GE18400@hirez.programming.kicks-ass.net> References: <20200219144724.800607165@infradead.org> <20200219150744.604459293@infradead.org> <20200219103614.2299ff61@gandalf.local.home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from bombadil.infradead.org ([198.137.202.133]:35848 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726523AbgBSPlA (ORCPT ); Wed, 19 Feb 2020 10:41:00 -0500 Content-Disposition: inline In-Reply-To: <20200219103614.2299ff61@gandalf.local.home> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Steven Rostedt Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, mingo@kernel.org, joel@joelfernandes.org, gregkh@linuxfoundation.org, gustavo@embeddedor.com, tglx@linutronix.de, paulmck@kernel.org, josh@joshtriplett.org, mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com, luto@kernel.org, tony.luck@intel.com, frederic@kernel.org, dan.carpenter@oracle.com, mhiramat@kernel.org On Wed, Feb 19, 2020 at 10:36:14AM -0500, Steven Rostedt wrote: > On Wed, 19 Feb 2020 15:47:28 +0100 > Peter Zijlstra wrote: > > > --- a/arch/x86/lib/memcpy_32.c > > +++ b/arch/x86/lib/memcpy_32.c > > @@ -21,7 +21,7 @@ __visible void *memset(void *s, int c, s > > } > > EXPORT_SYMBOL(memset); > > > > -__visible void *memmove(void *dest, const void *src, size_t n) > > +__visible notrace void *memmove(void *dest, const void *src, size_t n) > > { > > int d0,d1,d2,d3,d4,d5; > > char *ret = dest; > > @@ -207,3 +207,8 @@ __visible void *memmove(void *dest, cons > > > > } > > EXPORT_SYMBOL(memmove); > > Hmm, for things like this, which is adding notrace because of a single > instance of it (although it is fine to trace in any other instance), it > would be nice to have a gcc helper that could call "memmove+5" which > would skip the tracing portion. Or just open-code the memmove() in do_double_fault() I suppose. I don't think we care about super optimized code there. It's the bloody ESPFIX trainwreck.