platform-driver-x86.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Darren Hart <dvhart@infradead.org>
To: Mario Limonciello <mario.limonciello@dell.com>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	platform-driver-x86@vger.kernel.org,
	Andy Lutomirski <luto@kernel.org>,
	quasisec@google.com, pali.rohar@gmail.com
Subject: Re: [PATCH v3 5/8] platform/x86: dell-wmi-smbios: introduce character device for userspace
Date: Fri, 29 Sep 2017 19:06:07 -0700	[thread overview]
Message-ID: <20170930020607.GD13307@fury> (raw)
In-Reply-To: <4a91eb76afa9cce7060bc30f5313d64bd51b66ca.1506571188.git.mario.limonciello@dell.com>

On Wed, Sep 27, 2017 at 11:02:17PM -0500, Mario Limonciello wrote:
> This userspace character device will be used to perform SMBIOS calls
> from any applications.
> 
> It provides an ioctl that will allow passing the 32k WMI calling
> interface buffer between userspace and kernel space.
> 
> This character device is intended to deprecate the dcdbas kernel module
> and the interface that it provides to userspace.
> 
> It's important for the driver to provide a R/W ioctl to ensure that
> two competing userspace processes don't race to provide or read each
> others data.
> 
> The character device will only be created if the WMI interface was
> found.
> 
> The API for interacting with this interface is defined in documentation
> as well as a uapi header provides the format of the structures.
> 
> Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
> ---
>  Documentation/ABI/testing/dell-wmi-smbios |  11 ++++
>  drivers/platform/x86/dell-smbios.c        | 100 ++++++++++++++++++++++++------
>  drivers/platform/x86/dell-smbios.h        |  19 +-----
>  include/uapi/linux/dell-wmi-smbios.h      |  30 +++++++++
>  4 files changed, 124 insertions(+), 36 deletions(-)
>  create mode 100644 Documentation/ABI/testing/dell-wmi-smbios
>  create mode 100644 include/uapi/linux/dell-wmi-smbios.h
> 
> diff --git a/Documentation/ABI/testing/dell-wmi-smbios b/Documentation/ABI/testing/dell-wmi-smbios
> new file mode 100644
> index 000000000000..0a4200688cb0
> --- /dev/null
> +++ b/Documentation/ABI/testing/dell-wmi-smbios
> @@ -0,0 +1,11 @@
> +What:		/dev/wmi-dell-wmi-smbios

/dev/wmi/dell-smbios

> +Date:		October 2017
> +KernelVersion:	4.15
> +Contact:	"Mario Limonciello" <mario.limonciello@dell.com>
> +Description:
> +		Perform SMBIOS calls on supported Dell machines.
> +		through the Dell ACPI-WMI interface.
> +
> +		IOCTL's and buffer formats are defined in:
> +		<uapi/linux/dell-wmi-smbios.h>
> +
> diff --git a/drivers/platform/x86/dell-smbios.c b/drivers/platform/x86/dell-smbios.c
> index 5d793b012e5e..4174afbade13 100644
> --- a/drivers/platform/x86/dell-smbios.c
> +++ b/drivers/platform/x86/dell-smbios.c
> @@ -24,6 +24,7 @@
>  #include <linux/slab.h>
>  #include <linux/io.h>
>  #include <linux/wmi.h>
> +#include <linux/uaccess.h>
>  #include "dell-smbios.h"
>  
>  #ifdef CONFIG_DCDBAS
> @@ -41,8 +42,9 @@ struct calling_interface_structure {
>  	struct calling_interface_token tokens[];
>  } __packed;
>  
> -static void *buffer;
> -static size_t bufferlen;
> +static void *internal_buffer;
> +static size_t internal_bufferlen;

A large portion of this changeset is dedicated to renaming these two variables,
but it isn't clear why, and not mentioned in the changelog. Seems like
unnecessary churn. Or if we really should rename it... can it be done earlier in
the series when we're working with those buffers for functional reasons?

-- 
Darren Hart
VMware Open Source Technology Center

  reply	other threads:[~2017-09-30  2:06 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-28  4:02 [PATCH v3 0/8] Introduce support for Dell SMBIOS over WMI Mario Limonciello
2017-09-28  4:02 ` [PATCH v3 1/8] platform/x86: wmi: Add new method wmidev_evaluate_method Mario Limonciello
2017-09-28  4:02 ` [PATCH v3 2/8] platform/x86: dell-smbios: Introduce a WMI-ACPI interface Mario Limonciello
2017-09-28  6:53   ` Pali Rohár
2017-09-28 22:43     ` Mario.Limonciello
2017-09-29  7:35       ` Pali Rohár
2017-09-30 20:01         ` Mario.Limonciello
2017-09-30 21:06           ` Pali Rohár
2017-09-30  0:51   ` Darren Hart
2017-09-30  7:15     ` Pali Rohár
2017-09-30 19:56       ` Mario.Limonciello
2017-09-28  4:02 ` [PATCH v3 3/8] platform/x86: dell-wmi-smbios: Use Dell WMI descriptor check Mario Limonciello
2017-09-30  1:29   ` Darren Hart
2017-09-30 19:48     ` Mario.Limonciello
2017-09-30 20:01       ` Pali Rohár
2017-10-02 14:15         ` Mario.Limonciello
2017-10-02 14:37           ` Pali Rohár
2017-10-01  8:43     ` Andy Shevchenko
2017-09-28  4:02 ` [PATCH v3 4/8] platform/x86: wmi: create character devices when requested by drivers Mario Limonciello
2017-09-30  1:52   ` Darren Hart
2017-09-30  8:12     ` Greg Kroah-Hartman
2017-09-30 19:26       ` Mario.Limonciello
2017-10-01 13:23         ` Greg KH
2017-10-01 14:25           ` Mario.Limonciello
2017-10-01 18:03             ` Greg KH
2017-10-02  0:57       ` Darren Hart
2017-10-02  9:24         ` Greg Kroah-Hartman
2017-10-02 14:33           ` Darren Hart
2017-10-03  9:23   ` Greg KH
2017-10-03 15:09     ` Mario.Limonciello
2017-10-03 15:10     ` Darren Hart
2017-10-03 16:48       ` Andy Lutomirski
2017-10-03 17:46         ` Greg KH
2017-10-03 18:38         ` Mario.Limonciello
2017-10-03 19:31           ` Andy Lutomirski
2017-10-03  9:23   ` Greg KH
2017-10-03 15:13     ` Mario.Limonciello
2017-09-28  4:02 ` [PATCH v3 5/8] platform/x86: dell-wmi-smbios: introduce character device for userspace Mario Limonciello
2017-09-30  2:06   ` Darren Hart [this message]
2017-09-30 19:45     ` Mario.Limonciello
2017-10-03  9:26   ` Greg KH
2017-10-03 15:09     ` Mario.Limonciello
2017-10-03 15:20     ` Darren Hart
2017-10-03 15:49       ` Mario.Limonciello
2017-10-05  0:02         ` Darren Hart
2017-10-05 15:10           ` Mario.Limonciello
2017-09-28  4:02 ` [PATCH v3 6/8] platform/x86: dell-wmi-smbios: Add a sysfs interface for SMBIOS tokens Mario Limonciello
2017-09-30  2:10   ` Darren Hart
2017-10-01  8:51     ` Andy Shevchenko
2017-09-28  4:02 ` [PATCH v3 7/8] platform/x86: Kconfig: Change the default settings for dell-wmi-smbios Mario Limonciello
2017-09-28  4:02 ` [PATCH v3 8/8] platform/x86: dell-wmi-smbios: clean up wmi descriptor check Mario Limonciello
2017-10-02 13:15   ` Andy Shevchenko
2017-10-02 13:26     ` Mario.Limonciello
2017-09-30  2:16 ` [PATCH v3 0/8] Introduce support for Dell SMBIOS over WMI Darren Hart
2017-09-30 19:56   ` Mario.Limonciello
2017-10-05  2:44     ` Darren Hart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170930020607.GD13307@fury \
    --to=dvhart@infradead.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mario.limonciello@dell.com \
    --cc=pali.rohar@gmail.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=quasisec@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).