From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6A8DE1A1E56 for ; Tue, 13 Sep 2016 18:31:51 -0700 (PDT) Subject: [PATCH 0/2] nfit: fail DSMs that return an unknown status value From: Dan Williams Date: Tue, 13 Sep 2016 18:28:47 -0700 Message-ID: <147381652762.13555.2547727388390513900.stgit@dwillia2-desk3.amr.corp.intel.com> MIME-Version: 1.0 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" To: linux-nvdimm@lists.01.org Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org List-ID: When the kernel knows the format of a DSM and is consuming the data internal to the kernel, it needs to be careful to fail DSMs that return an error. Recall that DSMs, ACPI Device Specific Methods, are used by the kernel to manipulate namespace label data, and scan for media errors. For example, if a namespace label read command fails the returned data is undefined and should not be consumed by the libnvdimm core to make namespace provisioning decisions. Also, add new unit test capability to allow dynamic failure injection for DSMs sent to nfit_test devices. --- Dan Williams (2): nfit: fail DSMs that return non-zero status by default tools/testing/nvdimm: test get_config_size DSM failures drivers/acpi/nfit/core.c | 48 +++++++++++++---------- tools/testing/nvdimm/test/nfit.c | 79 +++++++++++++++++++++++++++++++++++++- 2 files changed, 105 insertions(+), 22 deletions(-) _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Williams Subject: [PATCH 0/2] nfit: fail DSMs that return an unknown status value Date: Tue, 13 Sep 2016 18:28:47 -0700 Message-ID: <147381652762.13555.2547727388390513900.stgit@dwillia2-desk3.amr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org Sender: "Linux-nvdimm" To: linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org Cc: linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-acpi@vger.kernel.org When the kernel knows the format of a DSM and is consuming the data internal to the kernel, it needs to be careful to fail DSMs that return an error. Recall that DSMs, ACPI Device Specific Methods, are used by the kernel to manipulate namespace label data, and scan for media errors. For example, if a namespace label read command fails the returned data is undefined and should not be consumed by the libnvdimm core to make namespace provisioning decisions. Also, add new unit test capability to allow dynamic failure injection for DSMs sent to nfit_test devices. --- Dan Williams (2): nfit: fail DSMs that return non-zero status by default tools/testing/nvdimm: test get_config_size DSM failures drivers/acpi/nfit/core.c | 48 +++++++++++++---------- tools/testing/nvdimm/test/nfit.c | 79 +++++++++++++++++++++++++++++++++++++- 2 files changed, 105 insertions(+), 22 deletions(-) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752917AbcINBby (ORCPT ); Tue, 13 Sep 2016 21:31:54 -0400 Received: from mga02.intel.com ([134.134.136.20]:9930 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751091AbcINBbw (ORCPT ); Tue, 13 Sep 2016 21:31:52 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,331,1470726000"; d="scan'208";a="167887505" Subject: [PATCH 0/2] nfit: fail DSMs that return an unknown status value From: Dan Williams To: linux-nvdimm@ml01.01.org Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 13 Sep 2016 18:28:47 -0700 Message-ID: <147381652762.13555.2547727388390513900.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.17.1-9-g687f MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When the kernel knows the format of a DSM and is consuming the data internal to the kernel, it needs to be careful to fail DSMs that return an error. Recall that DSMs, ACPI Device Specific Methods, are used by the kernel to manipulate namespace label data, and scan for media errors. For example, if a namespace label read command fails the returned data is undefined and should not be consumed by the libnvdimm core to make namespace provisioning decisions. Also, add new unit test capability to allow dynamic failure injection for DSMs sent to nfit_test devices. --- Dan Williams (2): nfit: fail DSMs that return non-zero status by default tools/testing/nvdimm: test get_config_size DSM failures drivers/acpi/nfit/core.c | 48 +++++++++++++---------- tools/testing/nvdimm/test/nfit.c | 79 +++++++++++++++++++++++++++++++++++++- 2 files changed, 105 insertions(+), 22 deletions(-)