Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1735290
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | "Saldivar, Maurice A." <maurice.a.saldivar@hpe.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/2] libnvdimm, namespace: fix btt claim class crash |
| Date | Wed, 20 Sep 2017 00:10:01 +0200 |
| Message-ID | <urySl-2Ga-1@gated-at.bofh.it> (permalink) |
| References | <urwQy-1e6-13@gated-at.bofh.it> <urwQz-1e6-37@gated-at.bofh.it> |
| Thread-Topic | [PATCH 2/2] libnvdimm, namespace: fix btt claim class crash |
| Thread-Index | AQHTMYGmQZ7fW2ah00OBp3ATP++JYqK8wgUA |
| Accept-Language | en-US |
| Content-Language | en-US |
| Authentication-Results | spf=none (sender IP is ) smtp.mailfrom=maurice.a.saldivar@hpe.com; |
| X-Originating-IP | [15.203.233.79] |
| X-Ms-Publictraffictype | |
| X-Microsoft-Exchange-Diagnostics | 1;TU4PR84MB0191;6:CCFZILKRxZuF5cmQlZnuhIviiyWuXdM7dMGDgFkoTHV882wyoVHGPvNUeZyzokqLbZ1wRoYQ60BlyyOUNzzcgFoEy6vFtmSLX2MJbEYf33sUqMTaz6kjg3PGBfnxR9uYxKEKmwVO8f9MaRbaaewSVw2/D4pYY8Z12gbFXlc1hayk2CoxbXHC+jp9I/1peoiRZifEODl6tZxG0qd73+ZtItNlgUh2Pf58h7j73yTDtPUMqGleNB8xBITRqmVb7JV+2K7YtiJtXY5y2c1Uyj4GnNPo6ADgErNF0K6ymOVqP3ULgwXZz2+Zh8VG6Q4DJ6ugWYNAg2/1YCPKshP4btWFPQ==;5:FVfYGpLNqUDKniDu7Dg78sSoJGKocqmxfaxR3Xk/ZI0lUoRs1kmY0/sHoS/YTytZbWpWWcQ9HOb2ubgP+d+hy4b3/it1tVkv+QqxqigEZZi/rev4xIOYLHK6AX1FrjjiA8nFDvTNNjgl+IS/74Fgkw==;24:yNiHOXwZdsa2dfGM1A1HOAPP+eb5Re9cIvcDWxKqxmTKrP2ZR7qaTGoBh9sh7bNpF9B+CRj8h0taga99Vm7ODREla3QfwHqzwtcw38qF0DU=;7:sM4TeutKSd9X+duwrR9Aqw1j3aC6kzSd2CX9XripvZTKuQ56S7SXr2Ts6P5CJ+OOEyJqvbQA9ntvORjON8I9aon8bry9jGEb5ODgDP5d8Cte5VN2REFzXxEoxuDUNSDjjhEiLGc0Bk4Vb4soxFviLo5cMACDzul2z4u+PRPfFJRYUBCc1nsRn7rBT8+miGAm0yL5hq2LI0tb/FMgSv1mpNQAy2ivtjvy0xnB/fiBYYk= |
| X-Ms-Exchange-Antispam-Srfa-Diagnostics | SSOS; |
| X-Ms-Office365-Filtering-Correlation-ID | 7edf1797-a0c9-4315-ee5e-08d4ffaaa964 |
| X-Ms-Office365-Filtering-Ht | Tenant |
| X-Microsoft-Antispam | UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:TU4PR84MB0191; |
| X-Ms-Traffictypediagnostic | TU4PR84MB0191: |
| X-Exchange-Antispam-Report-Test | UriScan:(227479698468861)(20558992708506)(9452136761055)(228905959029699); |
| X-Microsoft-Antispam-Prvs | <TU4PR84MB0191C0D5D4A07BEE0575A599DB600@TU4PR84MB0191.NAMPRD84.PROD.OUTLOOK.COM> |
| X-Exchange-Antispam-Report-Cfa-Test | BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(3002001)(6055026)(6041248)(20161123564025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123555025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:TU4PR84MB0191;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:TU4PR84MB0191; |
| X-Forefront-Prvs | 04359FAD81 |
| X-Forefront-Antispam-Report | SFV:NSPM;SFS:(10019020)(6009001)(39860400002)(376002)(346002)(189002)(199003)(24454002)(377424004)(7736002)(3846002)(6116002)(14454004)(2900100001)(36756003)(6436002)(103116003)(6506006)(86362001)(101416001)(106356001)(229853002)(102836003)(54906003)(2501003)(53936002)(105586002)(189998001)(97736004)(478600001)(6512007)(25786009)(50986999)(76176999)(8676002)(316002)(54356999)(5660300001)(81166006)(81156014)(33646002)(6486002)(4326008)(305945005)(68736007)(6246003)(3660700001)(8936002)(77096006)(66066001)(3280700002)(2906002)(2950100002)(110136005);DIR:OUT;SFP:1102;SCL:1;SRVR:TU4PR84MB0191;H:TU4PR84MB0190.NAMPRD84.PROD.OUTLOOK.COM;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; |
| Received-Spf | None (protection.outlook.com: hpe.com does not designate permitted sender hosts) |
| Spamdiagnosticoutput | 1:99 |
| Spamdiagnosticmetadata | NSPM |
| Content-Type | text/plain; charset="utf-8" |
| Content-ID | <68F72D9660D1F94088366C698FD6E9E4@NAMPRD84.PROD.OUTLOOK.COM> |
| Content-Transfer-Encoding | base64 |
| MIME-Version | 1.0 |
| X-Ms-Exchange-Crosstenant-Originalarrivaltime | 19 Sep 2017 22:06:21.6007 (UTC) |
| X-Ms-Exchange-Crosstenant-Fromentityheader | Hosted |
| X-Ms-Exchange-Crosstenant-ID | 105b2061-b669-4b31-92ac-24d304d195dc |
| X-Ms-Exchange-Transport-Crosstenantheadersstamped | TU4PR84MB0191 |
| X-Originatororg | hpe.com |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 52 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "stable@vger.kernel.org" <stable@vger.kernel.org>, "vishal.l.verma@intel.com" <vishal.l.verma@intel.com> |
| X-Original-Date | Tue, 19 Sep 2017 22:06:21 +0000 |
| X-Original-Message-ID | <1505858348.3864.8.camel@hpe.com> |
| X-Original-References | <150585068899.18066.14107564726083870194.stgit@dwillia2-desk3.amr.corp.intel.com> <150585069444.18066.1329567407748978657.stgit@dwillia2-desk3.amr.corp.intel.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1735290 |
Show key headers only | View raw
I applied this and the kernel patch and was successfully able to
configure an NVDIMM-N into sector mode. I do have a question about
specific behavior I observed. Before I was able to configure an NVDIMM
into any mode from any mode. With these patchs if I go to sector mode
and try going to memory or dax mode it fails with:
# ndctl create-namespace -f -e namespace0.0 -m memory
Error: namespace0.0: sector_size: 4096 not supported
failed to reconfigure namespace: Invalid argument
but if I go sector->raw-><mode> I can get into other modes fine. Was
this the intended behavior?
Sincerely,
Maurice
On Tue, 2017-09-19 at 12:51 -0700, Dan Williams wrote:
> Maurice reports:
>
> BUG: unable to handle kernel NULL pointer dereference at
> 0000000000000028
> IP: holder_class_store+0x253/0x2b0 [libnvdimm]
>
> ...while trying to reconfigure an NVDIMM-N namespace into 'sector' /
> 'btt' mode. The crash points to this line:
>
> (gdb) li *(holder_class_store+0x253)
> 0x7773 is in holder_class_store
> (drivers/nvdimm/namespace_devs.c:1420).
> 1415 for (i = 0; i < nd_region->ndr_mappings; i++) {
> 1416 struct nd_mapping *nd_mapping =
> &nd_region->mapping[i];
> 1417 struct nvdimm_drvdata *ndd =
> to_ndd(nd_mapping);
> 1418 struct nd_namespace_index *nsindex;
> 1419
> 1420 nsindex = to_namespace_index(ndd, ndd-
> >ns_current);
>
> ...where we are failing because ndd is NULL due to NVDIMM-N dimms not
> supporting labels.
>
> Long story short, default to the BTTv1 format in the label-less /
> NVDIMM-N case.
>
> Fixes: 14e494542636 ("libnvdimm, btt: BTT updates for UEFI 2.7
> format")
> Cc: <stable@vger.kernel.org>
> Cc: Vishal Verma <vishal.l.verma@intel.com>
> Reported-by: Maurice A. Saldivar <maurice.a.saldivar@hpe.com>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> ---
> drivers/nvdimm/namespace_devs.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/nvdimm/namespace_devs.c
> b/drivers/nvdimm/namespace_devs.c
> index 1427a386a033..3e4d1e7998da 100644
> --- a/drivers/nvdimm/namespace_devs.c
> +++ b/drivers/nvdimm/namespace_devs.c
> @@ -1417,6 +1417,15 @@ static int btt_claim_class(struct device *dev)
> struct nvdimm_drvdata *ndd = to_ndd(nd_mapping);
> struct nd_namespace_index *nsindex;
>
> + /*
> + * If any of the DIMMs do not support labels the
> only
> + * possible BTT format is v1.
> + */
> + if (!ndd) {
> + loop_bitmask = 0;
> + break;
> + }
> +
> nsindex = to_namespace_index(ndd, ndd->ns_current);
> if (nsindex == NULL)
> loop_bitmask |= 1;
>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/2] tools/testing/nvdimm: disable labels for nfit_test.1 Dan Williams <dan.j.williams@intel.com> - 2017-09-19 22:00 +0200
[PATCH 2/2] libnvdimm, namespace: fix btt claim class crash Dan Williams <dan.j.williams@intel.com> - 2017-09-19 22:00 +0200
Re: [PATCH 2/2] libnvdimm, namespace: fix btt claim class crash "Saldivar, Maurice A." <maurice.a.saldivar@hpe.com> - 2017-09-20 00:10 +0200
Re: [PATCH 2/2] libnvdimm, namespace: fix btt claim class crash Dan Williams <dan.j.williams@intel.com> - 2017-09-20 00:20 +0200
csiph-web