Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4952604ybb; Tue, 24 Mar 2020 08:16:55 -0700 (PDT) X-Google-Smtp-Source: ADFU+vs4AYZiLi02CvpwWtQVlCwSYx+EcMoYcZccbbYDW0Bu1KrPgQMJyjhvw2kl0OqF8iG3qxvH X-Received: by 2002:a05:6830:1251:: with SMTP id s17mr23300289otp.75.1585063015341; Tue, 24 Mar 2020 08:16:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585063015; cv=none; d=google.com; s=arc-20160816; b=cnsTjOW9dlVCBzJzorrA/tRS8sdpDuNRhSg5Jvq77ZBlSYAJHIwql9RwKr5g8veEiK DFz/49Ny6kQsUO61LxNMjXoM+puPerq7MpECxGvvLwyAfD8zZ900RkfTa7LgcSSVzO0N 2NkFPhlV1kKGHGlTe4hslb4oLJsWmugqrKCW1gUumySxY9XLvhN4B3WfX4bParWuiLde mg5cBuVJcgrnqP3PUPI3TpeoUvg6dOqSDlFN5Pp7iHRgcqCDhhh73gqbwH/UNUAzg+pP vGTkw5Oy9JfnZMkq6ezUn/ZcXNJXXbkLxTWdRfZ936+FpdF98juemhWOdmNCAX265Poc JPeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=8TXwLdoUDxOFHArMszYS+qpN9z46iZMtciU0e+inYj0=; b=DzVXawP/M25Z6s848dg4mUZKTKstda1Tp6DucpwDdWMdKdL/PuLilhydA8L6pw1KWm 9nszU1O32KUdaEzr3GJ0vcOET1s/PieaDV74eWRXHvMsHZLyL4vlrOXJPsvJx/uSVdTN bzxvTgf7nGXN1oc6DFxgGW81C0XaKd2SGEITOTUAYLms2PReJB80bCzxY4X9qtWW3vu+ VbcVGynuMquA+tpXtHpuNKRSKTo0ZRSGV0L1y0XP2UJFKCfI6G4Wm7MEhzNIyRAGK6xQ cwlUV3DUvbC7YWIySrVJulqlUXOvncr/BcxOwlVa1QWlPmiCqQnOgXnJBhNj1qJ4l2g6 EGnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=3dUmx8nt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c67si4328765oif.5.2020.03.24.08.16.40; Tue, 24 Mar 2020 08:16:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=3dUmx8nt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728123AbgCXPPF (ORCPT + 99 others); Tue, 24 Mar 2020 11:15:05 -0400 Received: from merlin.infradead.org ([205.233.59.134]:58418 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727999AbgCXPPF (ORCPT ); Tue, 24 Mar 2020 11:15:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=8TXwLdoUDxOFHArMszYS+qpN9z46iZMtciU0e+inYj0=; b=3dUmx8ntr/oFgCmMcBnnANMTip 21oGu0KzDc0Yd4MPZHFTTRzmuma8nxyj0/WHXe5fU8WqxJTKHCnKGjBZpOiY+EojAfNnxsg1IKuKj kSKVslo7wUy77OdEkkt+aw3rnLT7cH0gsSE82Ijs81BVgx4EYFJBLxLfoI8iiQPm0MPFLLnk5Y9Ly XGe9VWA5Y62NThk1OLH9bYisCLNtpucatBQ/0c9O+z2MWH9/02Wc/SbPcbkYb1hoyaTVLBt/Mj9Up NFtY11fW51lvEeCM+cMUMNitrPSvFOBWWpUKL/zcTVREDkhgvZ/gP95Wq4ilQtqPoV7balMMqxsMB fhzWWfgA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jGlGg-0004yl-4h; Tue, 24 Mar 2020 15:15:02 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id AA687300096; Tue, 24 Mar 2020 16:15:00 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 9549F29B3DAFF; Tue, 24 Mar 2020 16:15:00 +0100 (CET) Date: Tue, 24 Mar 2020 16:15:00 +0100 From: Peter Zijlstra To: Al Viro Cc: Linus Torvalds , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC][PATCH 01/22] x86 user stack frame reads: switch to explicit __get_user() Message-ID: <20200324151500.GQ20696@hirez.programming.kicks-ass.net> References: <20200323183620.GD23230@ZenIV.linux.org.uk> <20200323183819.250124-1-viro@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200323183819.250124-1-viro@ZenIV.linux.org.uk> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 23, 2020 at 06:37:58PM +0000, Al Viro wrote: > From: Al Viro > > rather than relying upon the magic in raw_copy_from_user() > > Signed-off-by: Al Viro > diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h > index 61d93f062a36..ab8eab43a8a2 100644 > --- a/arch/x86/include/asm/uaccess.h > +++ b/arch/x86/include/asm/uaccess.h > @@ -695,15 +695,6 @@ extern struct movsl_mask { > #endif > > /* > - * We rely on the nested NMI work to allow atomic faults from the NMI path; the > - * nested NMI paths are careful to preserve CR2. > - * > - * Caller must use pagefault_enable/disable, or run in interrupt context, > - * and also do a uaccess_ok() check > - */ > -#define __copy_from_user_nmi __copy_from_user_inatomic > - > -/* > * The "unsafe" user accesses aren't really "unsafe", but the naming > * is a big fat warning: you have to not only do the access_ok() > * checking before using them, but you have to surround them with the Thanks for killing that remnant! Acked-by: Peter Zijlstra (Intel)