From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2534CC3279B for ; Fri, 6 Jul 2018 19:39:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CF84822551 for ; Fri, 6 Jul 2018 19:38:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b="AFGpkyP2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CF84822551 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=efficios.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934802AbeGFTiz (ORCPT ); Fri, 6 Jul 2018 15:38:55 -0400 Received: from mail.efficios.com ([167.114.142.138]:46688 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934758AbeGFTix (ORCPT ); Fri, 6 Jul 2018 15:38:53 -0400 Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id 509C71C14E2; Fri, 6 Jul 2018 15:38:52 -0400 (EDT) Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id EBsndnXotsnn; Fri, 6 Jul 2018 15:38:52 -0400 (EDT) Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id EA87C1C14DA; Fri, 6 Jul 2018 15:38:51 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com EA87C1C14DA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1530905932; bh=57y138CP/9JLqCWXF45Z3nNLYtGKyQSTY7eOfIVhQqA=; h=Date:From:To:Message-ID:MIME-Version; b=AFGpkyP2blLxM5XySzM+bl29x77Se0VNVNljNu5MiBGNcKTkEDCQMGyLNI/duH9/9 /VNbRqzvPBHxhudTRljm8KLJkuqb7rmS1dWyHkigDuPhPK425bLjf7++VIwuPwr0cF ClE9+yKG0d2UH1rnVf9tqQmlWmv1snr1MycNvM9PcuJPuNT7I20CMCvzRCqNJOuMH8 CPEaBRtPBPtHNpXu7jNzvc9F9sbU3z40kaP9oRpWVQ2+KkbQlJaX1zj5psOcgDY07E f5D5+bHCe4XZT9Plmo+IlfZyoe5q/8bN5rquPsURwa2ZrHa0decTn3DYx82uKqVcTZ 2bLK48THtSPwQ== X-Virus-Scanned: amavisd-new at efficios.com Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id aBg4vOPYlNJw; Fri, 6 Jul 2018 15:38:51 -0400 (EDT) Received: from mail02.efficios.com (mail02.efficios.com [167.114.142.138]) by mail.efficios.com (Postfix) with ESMTP id CF6891C14CC; Fri, 6 Jul 2018 15:38:51 -0400 (EDT) Date: Fri, 6 Jul 2018 15:38:51 -0400 (EDT) From: Mathieu Desnoyers 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 , Joel Fernandes Message-ID: <131696830.1369.1530905931822.JavaMail.zimbra@efficios.com> In-Reply-To: <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> <1913049637.1366.1530905741745.JavaMail.zimbra@efficios.com> Subject: Re: [RFC PATCH for 4.18 3/5] rseq: uapi: declare rseq_cs field as union, update includes MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [167.114.142.138] X-Mailer: Zimbra 8.8.8_GA_2096 (ZimbraWebClient - FF52 (Linux)/8.8.8_GA_1703) Thread-Topic: rseq: uapi: declare rseq_cs field as union, update includes Thread-Index: JrPvCxuCl8CoGjfD9J8mi9cMcDM8S30viHRk Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- On Jul 6, 2018, at 3:35 PM, Mathieu Desnoyers mathieu.desnoyers@efficios.com wrote: > ----- 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! Should I change all 4 bytes __get_user()/__put_user() in kernel/rseq.c for get_user()/put_user() to ensure consistency ? Thanks, Mathieu > > Mathieu > > > -- > Mathieu Desnoyers > EfficiOS Inc. > http://www.efficios.com -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com