Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5500859imm; Tue, 18 Sep 2018 10:29:26 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZd3vdIUqpYryIZEyR9wOngaQJyZzO/hSzR+P3jvjHPwQK3isa+Ew3geKSl7TwoQ01O+s9f X-Received: by 2002:a63:3741:: with SMTP id g1-v6mr28980209pgn.59.1537291766886; Tue, 18 Sep 2018 10:29:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537291766; cv=none; d=google.com; s=arc-20160816; b=lw3/v1wO535QTlE++gb/rsztsX94eFLm0nBV7is2zVmQyMnYND4MH7wg0wO8wR69KQ FOnzeAVTDJ658HKJVvtf8gCv0L+vB+4cBGEVUQB1UIHZhIHIdQC33ZYEK0mQwfnoX0K3 nrrv8GLnWLhCHIyy/kr9iX1sWV83xR2gNYBVq53983JXMRnKL6w68r8jmldsSPv4quJ2 Ill2NQ4dmurXgZRMYSHCaD92YP1pywX87ZRbT6/MT51Wd1h1XMk4kturFhNcG0F5ZmB/ Dc7SZ+es1I6FQylhh9DlH8mWE9NIMPjs2NAe9vmZOg+aWqc2MkMEnMt5iLs1URTmUGuk ASRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to:date :cc:to:from:subject:message-id; bh=orFIJdSFs0a9yasLkv9P+NLZZ3ieGVcPLH7ltUX+s6I=; b=wsdR0O54Th8MAiK1YZa1xlBEg2tGSirX5JDOBcGl4EYNbRVxVdN7/VhEIt/w55FcHR MlPuD8rE7a7DPuwKHwuaP8sBTiDFIYyhkN8oZ0YXcJTjEmaMiim7RVaurgvYzZRIXyV/ hhMu+qmEJPR7+FlgGAWHrzNNu+6FUlBSYxoqkm12LQrGa1J6fKBtS4LCkjW53uihczBm RpOUjgNAmFmsTAecqLhwkPYmL4rgyPG0fXRJp2FQaSjbOfn00DVZVh7ITw9JGoHAdRFw dqJGF8Li+N8q8Xwl8LQK54fTkGba5pFIAVVzPiNMcGSRCxHlXvwF1IUX8D2/1wEhq5Qv z1Dg== ARC-Authentication-Results: i=1; mx.google.com; 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 az6-v6si18319509plb.3.2018.09.18.10.29.09; Tue, 18 Sep 2018 10:29:26 -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; 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 S1730290AbeIRXCk (ORCPT + 99 others); Tue, 18 Sep 2018 19:02:40 -0400 Received: from shelob.surriel.com ([96.67.55.147]:44724 "EHLO shelob.surriel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730089AbeIRXCk (ORCPT ); Tue, 18 Sep 2018 19:02:40 -0400 Received: from imladris.surriel.com ([96.67.55.152]) by shelob.surriel.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1g2Jo5-0003mi-Gd; Tue, 18 Sep 2018 13:29:01 -0400 Message-ID: <11aa7d0f4ba36eff8b61a5dc1bd35ee5195fd576.camel@surriel.com> Subject: Re: [RFC PATCH 04/10 v2 ] x86/fpu: eager switch PKRU state From: Rik van Riel To: Sebastian Andrzej Siewior , Paolo Bonzini Cc: linux-kernel@vger.kernel.org, x86@kernel.org, Andy Lutomirski , Radim =?UTF-8?Q?Kr=C4=8Dm=C3=A1=C5=99?= , kvm@vger.kernel.org, "Jason A. Donenfeld" Date: Tue, 18 Sep 2018 13:29:01 -0400 In-Reply-To: <20180918160419.2zeru6xnufxixcax@linutronix.de> References: <20180912133353.20595-1-bigeasy@linutronix.de> <20180912133353.20595-5-bigeasy@linutronix.de> <8e5b64e4-b3e6-f884-beb6-b7b69ab2d8c1@redhat.com> <20180914203501.qibhpmueosvkr74w@linutronix.de> <20180918142701.atfb4ul45k7tl6ew@linutronix.de> <7e9a13f3-93f5-fe4a-20d2-f4f9407bd43b@redhat.com> <83e271e1298d603c1105dd0dbea32d67da9cf1fa.camel@surriel.com> <36e8493f-f994-e885-8fe6-2f0d4a9904a1@redhat.com> <20180918160419.2zeru6xnufxixcax@linutronix.de> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-qeo8C7RCdou6hmINJRZf" X-Mailer: Evolution 3.28.5 (3.28.5-1.fc28) Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-qeo8C7RCdou6hmINJRZf Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2018-09-18 at 18:04 +0200, Sebastian Andrzej Siewior wrote: > On 2018-09-18 17:29:52 [+0200], Paolo Bonzini wrote: > > > I don't think it matters what the PKRU state is > > > for kernel threads, since kernel PTEs should not > > > be using protection keys anyway. > >=20 > > What about copy_from/to_user? >=20 > This doesn't work for a kernel thread, does it? I mean they share the > init's MM and never do copy_{from|to}_user. Indeed, copy_from/to_user only works if current->mm points at an mm_struct with userspace memory. --=20 All Rights Reversed. --=-qeo8C7RCdou6hmINJRZf Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEKR73pCCtJ5Xj3yADznnekoTE3oMFAluhNd0ACgkQznnekoTE 3oN7+Af9GJYyy55zxm7fhdOa+X8DIovy7Le9zNpPgqRaoQLhctM69+uvP1wF7oQY V3wf3MrXD9eXq+DJHKqKFpfGcTAlIgl8YclJaEVE1vQjoKeYvfRmaXvMd+7Wguhv +3PeKQ9H5KD8w266Z/tUXJOh/Nxbtkd3Qvvx86bv6uiSkd4rqhYihi7x9n6biU2R UgxsbfPh/rmPN0RpNtAbPaWdq6XQ3SU/Z364+bMNFpW7kBVhMMw53D/ldpwusfo9 q9uvmSrA+DUtZloPpGaEMopMfpnnyby3EZ5Q+scfwC6YO0x9BoxKk0fOS2ImE++z 6tiOxmI1os93JUV7NLCOOL7Bpd7WGQ== =HdUP -----END PGP SIGNATURE----- --=-qeo8C7RCdou6hmINJRZf--