Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751835AbbKJTFA (ORCPT ); Tue, 10 Nov 2015 14:05:00 -0500 Received: from g9t5009.houston.hp.com ([15.240.92.67]:49137 "EHLO g9t5009.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750906AbbKJTE6 convert rfc822-to-8bit (ORCPT ); Tue, 10 Nov 2015 14:04:58 -0500 From: "Elliott, Robert (Persistent Memory)" To: "Hoemann, Jerry" , "ross.zwisler@linux.intel.com" , "rjw@rjwysocki.net" , "lenb@kernel.org" , "dan.j.williams@intel.com" CC: "linux-acpi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-nvdimm@lists.01.org" Subject: RE: [PATCH 1/4] nvdimm: Add wrapper for IOCTL pass thru. Thread-Topic: [PATCH 1/4] nvdimm: Add wrapper for IOCTL pass thru. Thread-Index: AQHRGOJsVQy336y9vUWWqpVc8wh7BZ6VoMEg Date: Tue, 10 Nov 2015 19:04:22 +0000 Message-ID: <94D0CD8314A33A4D9D801C0FE68B40295BE160C5@G4W3202.americas.hpqcorp.net> References: <5411049831df211c8280e3239aaf344af033fa25.1446684001.git.jerry.hoemann@hpe.com> In-Reply-To: <5411049831df211c8280e3239aaf344af033fa25.1446684001.git.jerry.hoemann@hpe.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [16.210.48.36] Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1561 Lines: 48 > -----Original Message----- > From: Linux-nvdimm [mailto:linux-nvdimm-bounces@lists.01.org] On Behalf Of > Hoemann, Jerry > Sent: Friday, November 6, 2015 4:27 PM > Subject: [PATCH 1/4] nvdimm: Add wrapper for IOCTL pass thru. ... > diff --git a/include/uapi/linux/ndctl.h b/include/uapi/linux/ndctl.h ... > +struct ndn_pkg { > + struct { > + __u8 dsm_uuid[16]; > + __u32 dsm_in; /* size of _DSM input */ > + __u32 dsm_out; /* size of user buffer */ > + __u32 dsm_rev; /* revision of dsm call */ > + __u32 res[8]; /* reserved must be zero */ > + __u32 dsm_size; /* size _DSM would write */ > + } h; > + unsigned char buf[]; > +} __packed; Given that the _DSM arguments are defined as: * Arg0 UUID: Buffer of 16 bytes * Arg1 Revision ID: Integer (8 bytes) * Arg2 Function Index: Integer (8 bytes) * Arg3 Package: function-specific 1. The __u32 for dsm_rev is not big enough to express all possible 8 byte Revision IDs. 2. The unsigned int cmd (carried outside this structure) is not big enough on all platforms (e.g., 32-bit) to express all possible Function Indexes. 3. The Revision ID and Function Index values passed to the _DSM are defined as little-endian. Are they intended to use native endianness or be little-endian in this structure? --- Robert Elliott, HPE Persistent Memory -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/