Re: [PATCH v3 3/3] nvdimm: Add IOCTL pass thru functions
From: Jerry Hoemann
Date: Fri Dec 11 2015 - 13:09:59 EST
On Wed, Dec 09, 2015 at 04:48:55PM -0800, Dan Williams wrote:
>
> Yes, still very much interested in this path. But the code will need
> to be around for quite awhile now that it has appeared in a released
> kernel and a released version of ndctl. So anything that makes the
> code more maintainable in the interim is beneficial.
>
> > If yes, the work we need to do to integrate these two different approaches
> > will just need to be undone. Further if we deprecate the current IOCTLs,
> > then the nd_cmd_desc tables and related nd_cmd_in_size and nd_cmd_out_size
> > could then be removed.
>
> I'm not seeing this as a large amount of work. Do you want to hand
> off this task to me?
I have implemented this and will send as part of next version.
>
> > ACPI defines arguments to a _DSM as 64 bit quantities. We want the interface
> > exported to the user to follow the ACPI spec. The variables above collect
> > the value of rev or func from the two different sources (wrapper or legacy)
> > and then passes to acpi_evaluate_dsm which defines the parameters as simple
> > ints.
> >
> > So, going from user interface to call of acpi_evaluate_dsm there will be
> > a truncation somewhere.
> >
> > Looking at acpi_evaluate_dsm(), it uses union acpi_object and fills in
> > .integer.value for both rev and func. These are defined as u64.
> >
> > So patching acpi_evaluate_dsm to make the rev and func parameters u64 might
> > be do'able, but we'd still have potential sign issues with other callers
> > to acpi_evaluate_dsm which look to be using simple ints in the call.
> >
> > Do you want me to look at patching acpi_evaluate_dsm (and possibly
> > its callers) as part of this patch set?
>
> Yes, updating the acpi_evaluate_dsm() definition seems the best choice.
>
I have a patch for this. While not big (6 files), these files are
outside of nvdimm and will have a two line of over a dozen reviewers/lists
not previously reviewing this series.
Do you want me to send this patch as one of this series (w/ the
extra reviewers?)
Or as separate stand alone to just those reviewers (and yourself.)
(and if this option, before or after this series.)
-----------------------------------------------------------------------------
Jerry Hoemann Software Engineer Hewlett Packard Enterprise
-----------------------------------------------------------------------------
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/