From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mathieu Desnoyers Subject: Re: [RFC PATCH for 4.18 3/5] rseq: uapi: declare rseq_cs field as union, update includes Date: Fri, 6 Jul 2018 15:35:41 -0400 (EDT) Message-ID: <1913049637.1366.1530905741745.JavaMail.zimbra@efficios.com> References: <20180705180601.18423-1-mathieu.desnoyers@efficios.com> <20180705180601.18423-4-mathieu.desnoyers@efficios.com> <1846432971.1245.1530892973439.JavaMail.zimbra@efficios.com> <436937568.1359.1530905019620.JavaMail.zimbra@efficios.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Linus Torvalds Cc: Thomas Gleixner , linux-kernel , linux-api , Peter Zijlstra , "Paul E. McKenney" , Boqun Feng , Andy Lutomirski , Dave Watson , Paul Turner , Andrew Morton , Russell King , Ingo Molnar , "H. Peter Anvin" , Andi Kleen , Chris Lameter , Ben Maurer , rostedt , Josh Triplett , Catalin Marinas , Will Deacon , Michael Kerrisk List-Id: linux-api@vger.kernel.org ----- On Jul 6, 2018, at 3:31 PM, Linus Torvalds torvalds@linux-foundation.org wrote: > On Fri, Jul 6, 2018 at 12:23 PM Mathieu Desnoyers > wrote: >> >> For -rc, I would favor the following simpler approach. Or I could even >> just use get_user() instead. Thoughts ? > > Please just use "get_user()". > > In fact, we should be thinking seriosly about just removing > __get_user() entirely. It's wrong. It optimizes the wrong thing > entirely. It _used_ to be that the range check was noticeable, and it > really isn't any more. These days the expensive parts are the SMAP > costs, and both get_user() and __get_user() have those, except > get_user() is safer and doesn't waste I$ on inlining the code to > disable and re-enable SMAP. Will do, thanks! Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com