Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp299560imm; Thu, 5 Jul 2018 00:04:15 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcsbMSzWPNxuyo1fOM7PX4P1eCNsbVMcpke3sVuwmfH0w85MTh6Gs3CsNf7kOvEvpON2ok/ X-Received: by 2002:a17:902:5a4f:: with SMTP id f15-v6mr4952658plm.253.1530774255735; Thu, 05 Jul 2018 00:04:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530774255; cv=none; d=google.com; s=arc-20160816; b=ZZVzRuCRgGxEd4ZPBbHcdu19DwEpS7rSMK2izay7i1v6DDcQnnWGdMCnwOAfZiI37D r7Ry8ilV1KbSWbEnzNzox2sQus263wbONbL8kP0T0iYfS9MEq5fY6OyglfumFwbDxjOS DBi3CS13fw9IfaUwfdbXp8hdkjDergKBfMoK5FnF8H7fDrstcOFqDnC7OVM4e+KJgYIF GwRBvwifh/uq5qmGb7JvMrxI75wpP3MleVuxW7MkoH9j4NuHu309+uGqz0yk5Y4PHaaa guThpRaWtW6d8UaLKKgp+ymq1wyyG1NsNrVszUqV3r4XzprMqPHNKVcYCcY9Zea5Y6wV 8GPw== 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:dkim-signature:arc-authentication-results; bh=iKU9aZLNyvt1TodJW6RHLcxFYr9UzhUWijR0l1E3qas=; b=K/v88WSEmbVTpC1phrM55ZQgBr5jm5c+QGxGQrCPO28fMz1WJ3eabJL2ISw1ZslSod nYtq8uY5E4ZS3lRjZDBkJY3g1LvllA6MoE3Bod76gFKR/60ozEIHGkd78eepIVuLixy2 1PH3E8ii4iS24/UHllJEcBKAhePJD0U/taL7YxXU7pBXgCROYKnmtg2iaBE70Bg7rvOX 4dpVz9QmJasHH4ZgSzH8S4LxD8Qzm8YP6C+cIjZU9pGjyGFv5A/2cL+BS0clNMGfzQwk v7AAVoi0Jg5q7hqmb/MIJFwkhWP/nZIIbM3MjtnHfYuHUDAMV6IvGUBXMaYOl0s39Bcg fgZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=PFNBpkJ6; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 15-v6si1804173pgo.574.2018.07.05.00.04.01; Thu, 05 Jul 2018 00:04:15 -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=@gmail.com header.s=20161025 header.b=PFNBpkJ6; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753503AbeGEHDF (ORCPT + 99 others); Thu, 5 Jul 2018 03:03:05 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:56210 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753070AbeGEHDA (ORCPT ); Thu, 5 Jul 2018 03:03:00 -0400 Received: by mail-wm0-f65.google.com with SMTP id v16-v6so9153886wmv.5; Thu, 05 Jul 2018 00:03:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=iKU9aZLNyvt1TodJW6RHLcxFYr9UzhUWijR0l1E3qas=; b=PFNBpkJ6xQ8aOjEqStcnpKVh0G3tM8jITGppa/JI1tdILM6vAKtTMPMjAvOaMN4MU/ r/b1HKKpRAqh/8uSD5gfEzrgZHFR+X1KA5KQKHL25XA2GpnbEYbs+0YP8+LlGj8YETyP dZQjhQinrC+42nkc684Ly0UVfVB9QAeId3D2WlEgFAmTj7/BTJaxbYR1WivW23oDChCN Xk83o/h3ZT+LMn59/D8DoneF5s+RxNXIoOUDYjo0wD586v8iYxqQDTBWlRNV0k1jhiUz 0OeOjhEjqLlwnZ3k57jxUyto+hcxJ09P5tiy+w329mOPiwruUOFF/FneV/f6dhE5fjX6 krQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=iKU9aZLNyvt1TodJW6RHLcxFYr9UzhUWijR0l1E3qas=; b=UtaK/WzvEdppvmCIaBbeWRTaKWztcWwccWQfxDQj/h9hZo8tes0sySBqCT7yq4ycep Pg+Aw4EvVDSB+01MZw4krKuFSrp9auQaEP6CE4UIp8a4/tsa8yTZIa2dnTmfyx9ZKhau m5P5qKhvjsjS25dGWOhxYK/deWRmrx/lRPAQbrWMhHQDk4KT5EHIFHpaUybzrua/zD4P DXLuL9SnAj7GRMCJ3Pw4/C1LJruo2BMj57HzBXIp2l1kdBlgM28cB/UY50Only/brbeZ 3UmP8ngFKm/ca0jD3hQVMhcPkqGk7SFxE4kyNmo5coxD94s3BBOSmBbV2wfet93oG7HI yedw== X-Gm-Message-State: APt69E1xbzYYAQJME4TjeRIdvhWiy0MQxB1T0nZ1IF+7KRIUfpQ/NTwe QwvkhnagdD0TSfCCFMke1FA= X-Received: by 2002:a1c:854c:: with SMTP id h73-v6mr2441807wmd.56.1530774179355; Thu, 05 Jul 2018 00:02:59 -0700 (PDT) Received: from gmail.com (2E8B0CD5.catv.pool.telekom.hu. [46.139.12.213]) by smtp.gmail.com with ESMTPSA id 24-v6sm14418746wrz.94.2018.07.05.00.02.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Jul 2018 00:02:58 -0700 (PDT) Date: Thu, 5 Jul 2018 09:02:56 +0200 From: Ingo Molnar To: Dan Williams Cc: Al Viro , Andrew Morton , Andy Lutomirski , Borislav Petkov , Linus Torvalds , Peter Zijlstra , Thomas Gleixner , Tony Luck , Ross Zwisler , Linux Kernel Mailing List , linux-fsdevel , X86 ML Subject: Re: [PATCH] x86/asm/memcpy_mcsafe: Fix copy_to_user_mcsafe() exception handling Message-ID: <20180705070256.GA27603@gmail.com> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Dan Williams wrote: > 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. Could you please add the API documentation Al asked for, and update the changlog with the acks and tested-by's that people gave, and send out a v2 series? Thanks! Ingo