Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5416714imm; Tue, 18 Sep 2018 09:11:32 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbSQio7iqy0RF0E5VBDfdMhd4ht3XbJufV4fn+GjbDXz0h52V60rwy0JC2A5BqpzX1R6cvg X-Received: by 2002:a17:902:4401:: with SMTP id k1-v6mr29334620pld.97.1537287092580; Tue, 18 Sep 2018 09:11:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537287092; cv=none; d=google.com; s=arc-20160816; b=rxZzXZYrPBPbgIFJal5Z9Lb+gSrs/bWbAfDxT6iWlOaNLkECKmCINNG4BkviyPdFjD /gk3G3gyndD6qhbfJLPq9WsVfLapZvCW1VTWdPEXCl0crJfFJMoMTB6VdkRFQi3NmiwA mCaar4mGLTtr3g4tC1eS6PZ+MYmOcelqg0VsLqG/0wX6ZAtMCemUDBGcZG+92EFNo3EZ IJG3Q6h7/DJBEkchsr65X7z8kzWk3M7H52cfiJHa3duIiKAG8y0r+EAgJB36wMYeRlCC vNx7njr22MsmG7Bm+OLib/yTbikuWYmss3vQdqA8gVmaAxecl1QX7mvybJ7stxxP1N02 QeNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=8CdtKe6CPGok1KDwZyF4Iuu0sT4BsoRMIPRKDWfX8I8=; b=a2PafKtGbNn0MEIhRMgwSSkuF8HDO0/Is+zqwyTwgfjqgDV9P8TnGUAm2U3eSvezc0 z5bZndPPr5mtbnrEQCpO1lKTTX3CiAoAabwyn4B83f4CD10EFdPksk5sDRLXF/lxynSv IRXE0+jKo8TDdzGG1py95AMAN+adqvDCV+FoUf17aF9yajU12noT+hiWRDtjznq5iwD/ gp1cFDgH3qfgu3fE9M+f9OhJM/IrQ6/64S88c55T9oTqBzQnSrC/axdLSmggk9p8CY/w MkZldtdKQiQtwdDYGEDzJTSVKzHhu+TC6WMG5mnQfMa23qx3zuPmi1VhmSNcIDpPU7Kb z7Aw== 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 e7-v6si19704729plk.122.2018.09.18.09.10.46; Tue, 18 Sep 2018 09:11:32 -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 S1730096AbeIRVhh (ORCPT + 99 others); Tue, 18 Sep 2018 17:37:37 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:58197 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729447AbeIRVhh (ORCPT ); Tue, 18 Sep 2018 17:37:37 -0400 Received: from bigeasy by Galois.linutronix.de with local (Exim 4.80) (envelope-from ) id 1g2IU8-0005FO-6L; Tue, 18 Sep 2018 18:04:20 +0200 Date: Tue, 18 Sep 2018 18:04:20 +0200 From: Sebastian Andrzej Siewior To: Paolo Bonzini Cc: Rik van Riel , linux-kernel@vger.kernel.org, x86@kernel.org, Andy Lutomirski , Radim =?utf-8?B?S3LEjW3DocWZ?= , kvm@vger.kernel.org, "Jason A. Donenfeld" Subject: Re: [RFC PATCH 04/10 v2 ] x86/fpu: eager switch PKRU state Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <36e8493f-f994-e885-8fe6-2f0d4a9904a1@redhat.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > > What about copy_from/to_user? 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. > Paolo Sebastian