Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4435159imm; Mon, 18 Jun 2018 15:07:56 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI9DvcEJCTGtGyM9txTbj1JlZkch1wN/zhVDq+fQHVQOGQ6lvMMfSGVPe+gbBZuu8BIGHFI X-Received: by 2002:a62:e816:: with SMTP id c22-v6mr15157665pfi.124.1529359676742; Mon, 18 Jun 2018 15:07:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529359676; cv=none; d=google.com; s=arc-20160816; b=VjTQ0g5bzzqU4+0IQTrOGuem0QG2UtyyeXB5PbCHxwRtv8GjqB+NO1fIzh6eI5su9V hTTTmazJdmuw0y8neYeDOfQyyfUTsrpa8xoTA/t+Q4hoSkLVWYYggOXpWU4KYDyo4yoF /Qk5OVUBQfvhiRz58GzcJh+KI7rlOqu3O9YkHeHrnmJQx8vnzK8Cj6Q6uA9yRPm4gd45 lWfltfdDFeCaZj0nuhDGEqVuDKcpZslf6d6FmU2BOz+DKDyYUgewsozR0rrbxtLXVYZy ljgFz6InEwPCgj9SX2Fm76UJ7vqgxQQDArrieGJXvHNSMNPQRovR06L5d81ayFW22JoS WOjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from :arc-authentication-results; bh=fyRRnrZFNiSR7qwCicY1O5+tHQUbC5kAuo1h/GMep6w=; b=qdZGa+m616j2OcRzxNsASmarvamoXXeahnX4QsUqtpa0DJx0GnZPUAt6N0GqKu77Ox fdmLo/841wEgMmWS9aCSyyKLwFhwqYWJHqkQel7wbdcZOT9j947JJJgG6IC7bnzVFODz LaOuoip+HN2CtPw+5OfIWTcwQvDL5b2EFQM6oPHDT86sVXYOWIhKrziDr4jPNqUUDt2j 1lmmluIQVyOGnFBsOCn5CDixooP8CEAWLpuaqgP9t0eDJYvAooJGS7lB3KlVB8MKvBU4 TiNgSkx+msK2ihA5TmYfTvqk5Q3gTtK27XcuQlH3Pkx3lT/N9BlL9U9Cf10EiU8Wv2Y4 GWmQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l9-v6si12966205pgr.287.2018.06.18.15.07.43; Mon, 18 Jun 2018 15:07:56 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935752AbeFRWGC (ORCPT + 99 others); Mon, 18 Jun 2018 18:06:02 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:36532 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755347AbeFRWFt (ORCPT ); Mon, 18 Jun 2018 18:05:49 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E53E240201A2; Mon, 18 Jun 2018 22:05:48 +0000 (UTC) Received: from segfault.boston.devel.redhat.com (segfault.boston.devel.redhat.com [10.19.60.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 69078111CB8C; Mon, 18 Jun 2018 22:05:48 +0000 (UTC) From: Jeff Moyer To: Dan Williams Cc: linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] libnvdimm, pmem: Fix memcpy_mcsafe() return code handling in nsio_rw_bytes() References: <152934432951.24427.11070204367866836632.stgit@dwillia2-desk3.amr.corp.intel.com> X-PGP-KeyID: 1F78E1B4 X-PGP-CertKey: F6FE 280D 8293 F72C 65FD 5A58 1FF8 A7CA 1F78 E1B4 X-PCLoadLetter: What the f**k does that mean? Date: Mon, 18 Jun 2018 18:05:48 -0400 In-Reply-To: <152934432951.24427.11070204367866836632.stgit@dwillia2-desk3.amr.corp.intel.com> (Dan Williams's message of "Mon, 18 Jun 2018 10:52:09 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Mon, 18 Jun 2018 22:05:48 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Mon, 18 Jun 2018 22:05:48 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jmoyer@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dan Williams writes: > Commit 60622d68227d "x86/asm/memcpy_mcsafe: Return bytes remaining" > converted callers of memcpy_mcsafe() to expect a positive 'bytes > remaining' value rather than a negative error code. The nsio_rw_bytes() > conversion failed to return success. The failure is benign in that > nsio_rw_bytes() will end up writing back what it just read. > > Fixes: 60622d68227d ("x86/asm/memcpy_mcsafe: Return bytes remaining") > Cc: Dan Williams > Cc: Vishal Verma > Signed-off-by: Dan Williams > --- > drivers/nvdimm/claim.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/nvdimm/claim.c b/drivers/nvdimm/claim.c > index 2e96b34bc936..fb667bf469c7 100644 > --- a/drivers/nvdimm/claim.c > +++ b/drivers/nvdimm/claim.c > @@ -278,6 +278,7 @@ static int nsio_rw_bytes(struct nd_namespace_common *ndns, > return -EIO; > if (memcpy_mcsafe(buf, nsio->addr + offset, size) != 0) > return -EIO; > + return 0; > } > > if (unlikely(is_bad_pmem(&nsio->bb, sector, sz_align))) { Reviewed-by: Jeff Moyer