Received: by 2002:ac0:ada8:0:0:0:0:0 with SMTP id o37-v6csp1310902imb; Wed, 4 Jul 2018 16:03:35 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc5wMsaAXYll8W3CEtYc2n7Y6jaxZwpqTg3pMiID930+z6FA/9/TPaRYN5Rirc8dejErTbi X-Received: by 2002:a63:b705:: with SMTP id t5-v6mr3400394pgf.45.1530745415277; Wed, 04 Jul 2018 16:03:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530745415; cv=none; d=google.com; s=arc-20160816; b=pt9NhcNStLwH7ZCNKepU6efYHaIKHw+Xl3GdWy4L8T9/OrmeUmqrIJn7NcuFaBkcCD O8pUWCpYv7m8NjF8sCyAZ0P8ZL8peiERrzi3+bgXf6UsrRkmVE9MyGRAajbSeXk4xa7A 5xK3HMc5rI2cMWFIGj++kC3bwT3VTMKTmOhVMkTEMjIQF+fE9wcx3cghbIHX6IxYwRrv ajTzoABKrmogViNEY+TrV2X0YDo4TA1O2DwgiRaDD9FWvGEUn4g+ylxmnr23Nm1CdDzc /RI3hwRtLzB+Reqp3K5WMGJA7CCAdTlZNWaNPqaJnsgbmRYNlMpJzl8a+d9pvkjD4/Iw P5YA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=+SkDKqTap5vvRJkm8D70VIZe70E/Jnr34w6ASg8ouc8=; b=dW3Zk3RnJTZlIZuWFUbEYxM97TPjCCwoUBFQcM/t5drZ+p5v7mOeSWRCuCuahlecz2 6p7C1pfLPIMGKgZt44qYNdmN5s5G2xxg8Fn0OkwmDxf6WCq273P4g1vWGGEsRRmGI9dZ 4JO5KbDmscFx17jjmqUZa2QWrhIIQB0x0SxKR0BpcP0WjJ9ZjZEFgd7ChWNWXDIn3gKl TeSwWqpnUqtaMKF/8RE5Y8vphhm05pVt6s/emNoOJcbrJfthc6p4feCvnh9AgmClYGnc JQZA2cDbuD+aKB5gLPlHfo6uCe3RarJB800E/DSHgbCnooyuOnPw8VnEltI4HSGzSDyv OQ7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=10ITVFFy; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q1-v6si4569885plb.331.2018.07.04.16.03.17; Wed, 04 Jul 2018 16:03:35 -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=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=10ITVFFy; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752946AbeGDXCe (ORCPT + 99 others); Wed, 4 Jul 2018 19:02:34 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:36744 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752938AbeGDXCc (ORCPT ); Wed, 4 Jul 2018 19:02:32 -0400 Received: by mail-oi0-f68.google.com with SMTP id r16-v6so13303562oie.3 for ; Wed, 04 Jul 2018 16:02:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=+SkDKqTap5vvRJkm8D70VIZe70E/Jnr34w6ASg8ouc8=; b=10ITVFFyrc8UFGwwExxRpYZkvwmQArYWWNAtc5JBniPZIcFRLYGn8kZ7zfoSkemsTD W/1Kot5m9SrSb6fvS0jnpUSR2ZjQXPjg12Wcy/IM5QNoBe9dsUNy5ASczGI/Jx8oP8wQ LgGOHOJEyyBR0XHfEiOnM/2g2Gv/RYAxjnclMdgxeD8cuuWb4nrx8J6ijT48EuX4YZEC LJdREVUpWzEEmCaZyQfEFFpIRDw9SggjeOk8X97MD5cn43c5mXaG8U29V5lSyZowLpW1 qMAn4Uepz7CJr/JU56ZQ0Lvz1jfnFlq93PC+FdHXlIm8hP+k/mvzOZYxjmfL5uf7FPgx JzGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=+SkDKqTap5vvRJkm8D70VIZe70E/Jnr34w6ASg8ouc8=; b=I7C3oHkuFnH5d3+9KqzoNdShaGMeKhicr0Cs0lI8J9scxgST6lshfZpWVqKw7Nodo2 IM3dqar2BeNXFYFEWNCrHs2LcMt3/1Gevtp1ADQ2nmmtV5fciQ3gLUZ04rlo0V/EPpKb 3ONOKJ/JIzSSqBfB/uJ5a38FSuv1wIjvWUiAlYiQxwtEEpmUglVy8eDGIGoDCNMxrmND JEDhobkHV7NW1QXbdM49x7YRLLWQ10nXYCB7oheuPnwrvYW51mCv19csFBMgcDnp+sU3 FWemL1eP0RMEo/o3stZ4s9NcE0ecKGqD11+Eo8VSw8ZKE6o77ELsXV7dyr8yR1aZd63a JMFw== X-Gm-Message-State: APt69E1ARmp1x2Evzy4PGftRAciOJFTFIqNdP63QImfnW79nMCKDHGZa E36811boy7Sh4VrdJ2UrcXVCpkkqG5R8LIZLF+ypMQ== X-Received: by 2002:aca:3954:: with SMTP id g81-v6mr4454803oia.215.1530745352022; Wed, 04 Jul 2018 16:02:32 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:3495:0:0:0:0:0 with HTTP; Wed, 4 Jul 2018 16:02:31 -0700 (PDT) In-Reply-To: <20180704223825.GZ30522@ZenIV.linux.org.uk> References: <20180702165803.GB19488@linux.intel.com> <153056565378.3420.295180898468362039.stgit@dwillia2-desk3.amr.corp.intel.com> <20180703083040.GB971@gmail.com> <20180704223825.GZ30522@ZenIV.linux.org.uk> From: Dan Williams Date: Wed, 4 Jul 2018 16:02:31 -0700 Message-ID: Subject: Re: [PATCH] x86/asm/memcpy_mcsafe: Fix copy_to_user_mcsafe() exception handling To: Al Viro Cc: Ingo Molnar , Andrew Morton , Andy Lutomirski , Borislav Petkov , Linus Torvalds , Peter Zijlstra , Thomas Gleixner , Tony Luck , Ross Zwisler , Linux Kernel Mailing List , linux-fsdevel , X86 ML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 4, 2018 at 3:38 PM, Al Viro wrote: > On Tue, Jul 03, 2018 at 10:30:40AM +0200, Ingo Molnar wrote: >> >> * Dan Williams wrote: >> >> > Hi Ingo, >> > >> > Here is an additional copy_to_iter_mcsafe() fix to address the crash >> > reported by Ross. This now passes xfstests:generic/323 on my system. >> >> The lib/iov_iter fix would need an Acked-by from Al. > > I can live with that; I would really like to see some documentation on > the copy_to_iter_mcsafe(), but that's a separate story. Incidentally, > are there any expectations of other callers appearing, or is that > (and copy_from_iter_flushcache()) YASingleConsumerAPI? The current cpu architectural detail preventing conversion of the standard copy_to_iter() path to use the mcsafe flavor is that we can't use REP MOV for fast copies and instead need to use a software loop so that any exceptions are recoverable. When / if that is addressed, and there is no performance difference between the two, it might make sense to convert more users. The _flushcache flavor, however, will likely stay limited to a single consumer for the persistent memory use case.