Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1193148ybl; Wed, 28 Aug 2019 10:59:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqwA0FJvb8OaOuR7R7Bcdi+Bv83+sAUL9rKZ9kHF6dWsBiu/7Yxk2Mw3P7Pk3Td8vIFy97J7 X-Received: by 2002:a63:5b23:: with SMTP id p35mr4451327pgb.366.1567015173113; Wed, 28 Aug 2019 10:59:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567015173; cv=none; d=google.com; s=arc-20160816; b=bdbQSppHVHkOjGm7FDho/Wb+Wim0CpB3t29AF7Pm2ipqrWdam3dpMSd5etmZyY6tBG BXSKvLd7Nyq1SoDCaUlpGdbmIoBRu48K4Bzcx2CEKMLZYoj5Pa3U1timkwPczDCZgrzF 3nGe0zszDbW0LU3Fq8rlLLRhKCuxMEZcyy4Jn6eXT6rPZnbtbWF0YvD/YKCO9ZrAlhy3 Wzo8WmSCXBCGcwTBFHLRmHqurrdKtUNosqecUWjoYZ6cD+nnjvasVm9IYWabmRzbu+LY RxV1zHzSUBNKRd9VRwjd1jNKSNB1D9D10bs1eQw4cflTi+IeyGvgwLJBj6obIzKxReG8 IBig== 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; bh=aRB4vbEfXvDkl29x5lKuMwKM6i8+YFMrLgvU4EU3o50=; b=Dc7DLyHM3GIAheimRBeVON/a5URFQ3mKOZYEURqREcUmq/2j4NnL7l+eeXQhh2Ticc NZ4I4Gp4IR2eRilJ9vsODv68eiSG2WiNbyGi+srSvxZxEPhDsSUax5AHT2e6JZwJc89U 2E2UlV7a0Zy5TxFfcH1zDr14tlKimIxMZNPVhHDiYKOUOB2h6qAkXtHq3ZbNH/TKz7NV D5/LOazPYLPrMVl5/YM0mpRtvZkPI0d7HBtLuSmKst3/dNw+JbWh7ZCXA7BSSeKd9rPr ZW5I+IhFJa1V9E2n4EM50AjWBJZvWGai0NSh6Z1x9CARQOIgjObgHK+9MpT4eXmfr1Jk LXlw== 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 d7si2394678pjx.68.2019.08.28.10.59.17; Wed, 28 Aug 2019 10:59:33 -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 S1726991AbfH1R5o (ORCPT + 99 others); Wed, 28 Aug 2019 13:57:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43638 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726515AbfH1R5o (ORCPT ); Wed, 28 Aug 2019 13:57:44 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 580EE3082E24; Wed, 28 Aug 2019 17:57:44 +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 CED2E5D9E2; Wed, 28 Aug 2019 17:57:43 +0000 (UTC) From: Jeff Moyer To: Dan Williams Cc: linux-nvdimm@lists.01.org, Dave Jiang , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 0/3] libnvdimm/security: Enumerate the frozen state and other cleanups References: <156686728950.184120.5188743631586996901.stgit@dwillia2-desk3.amr.corp.intel.com> X-PGP-KeyID: 1F78E1B4 X-PGP-CertKey: F6FE 280D 8293 F72C 65FD 5A58 1FF8 A7CA 1F78 E1B4 Date: Wed, 28 Aug 2019 13:57:43 -0400 In-Reply-To: <156686728950.184120.5188743631586996901.stgit@dwillia2-desk3.amr.corp.intel.com> (Dan Williams's message of "Mon, 26 Aug 2019 17:54:49 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Wed, 28 Aug 2019 17:57:44 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dan Williams writes: > Changes since v1 [1]: > - Cleanup patch1, simplify flags return in the overwrite case and > consolidate frozen-state cases (Jeff) > - Clarify the motivation for patch2 (Jeff) > - Collect Dave's Reviewed-by The series tests out fine for me. Thanks, Dan! -Jeff > > [1]: https://lists.01.org/pipermail/linux-nvdimm/2019-August/023133.html > > --- > > Jeff reported a scenario where ndctl was failing to unlock DIMMs [2]. > Through the course of debug it was discovered that the security > interface on the DIMMs was in the 'frozen' state disallowing unlock, or > any security operation. Unfortunately the kernel only showed that the > DIMMs were 'locked', not 'locked' and 'frozen'. > > Introduce a new sysfs 'frozen' attribute so that ndctl can reflect the > "security-operations-allowed" state independently of the lock status. > Then, followup with cleanups related to replacing a security-state-enum > with a set of flags. > > [2]: https://lists.01.org/pipermail/linux-nvdimm/2019-August/022856.html > > --- > > Dan Williams (3): > libnvdimm/security: Introduce a 'frozen' attribute > libnvdimm/security: Tighten scope of nvdimm->busy vs security operations > libnvdimm/security: Consolidate 'security' operations > > > drivers/acpi/nfit/intel.c | 59 ++++++----- > drivers/nvdimm/bus.c | 2 > drivers/nvdimm/dimm_devs.c | 134 ++++++-------------------- > drivers/nvdimm/nd-core.h | 51 ++++------ > drivers/nvdimm/security.c | 199 +++++++++++++++++++++++++------------- > include/linux/libnvdimm.h | 9 +- > tools/testing/nvdimm/dimm_devs.c | 19 +--- > 7 files changed, 226 insertions(+), 247 deletions(-)