lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 10 Oct 2017 15:57:43 +0200
From:   Greg KH <greg@...ah.com>
To:     Mario.Limonciello@...l.com
Cc:     dvhart@...radead.org, andy.shevchenko@...il.com,
        linux-kernel@...r.kernel.org, platform-driver-x86@...r.kernel.org,
        luto@...nel.org, quasisec@...gle.com, pali.rohar@...il.com,
        rjw@...ysocki.net, mjg59@...gle.com, hch@....de
Subject: Re: [PATCH v6 13/14] platform/x86: wmi: create character devices
 when requested by drivers

On Tue, Oct 10, 2017 at 01:41:45PM +0000, Mario.Limonciello@...l.com wrote:
> > -----Original Message-----
> > From: Greg KH [mailto:greg@...ah.com]
> > Sent: Tuesday, October 10, 2017 6:07 AM
> > To: Limonciello, Mario <Mario_Limonciello@...l.com>
> > Cc: dvhart@...radead.org; Andy Shevchenko <andy.shevchenko@...il.com>;
> > LKML <linux-kernel@...r.kernel.org>; platform-driver-x86@...r.kernel.org;
> > Andy Lutomirski <luto@...nel.org>; quasisec@...gle.com;
> > pali.rohar@...il.com; rjw@...ysocki.net; mjg59@...gle.com; hch@....de
> > Subject: Re: [PATCH v6 13/14] platform/x86: wmi: create character devices when
> > requested by drivers
> > 
> > On Mon, Oct 09, 2017 at 05:51:51PM -0500, Mario Limonciello wrote:
> > > --- /dev/null
> > > +++ b/include/uapi/linux/wmi.h
> > > @@ -0,0 +1,19 @@
> > > +/*
> > > + *  User API methods for ACPI-WMI mapping driver
> > > + *
> > > + *  Copyright (C) 2017 Dell, Inc.
> > > + *
> > > + *  This program is free software; you can redistribute it and/or modify
> > > + *  it under the terms of the GNU General Public License version 2 as
> > > + *  published by the Free Software Foundation.
> > > + */
> > > +#ifndef _UAPI_LINUX_WMI_H
> > > +#define _UAPI_LINUX_WMI_H
> > > +
> > > +#define WMI_IOC 'W'
> > > +#define WMI_IO(instance)		_IO(WMI_IOC, instance)
> > > +#define WMI_IOR(instance, type)		_IOR(WMI_IOC, instance, type)
> > > +#define WMI_IOW(instance, type)		_IOW(WMI_IOC, instance, type)
> > > +#define WMI_IOWR(instance, type)	_IOWR(WMI_IOC, instance, type)
> > 
> > Are these really needed in a uapi .h file?  Who needs them?  And why not
> > just use a "normal" ioctl macro in your individual driver .h file?  Do
> > these really help?
> > 
> Since this is setting precedent that WMI drivers will use the IOC 'W' and the WMI
> bus driver will dispatch calls to the proper drivers, I think they make sense to include.

But who will use those macros?  Those drivers?

As the individual drivers have to define the correct "instance, type",
this seems like a header file that is wrapping things unnecessarily.
Why not just put all of the needed WMI ioctls in a single file, one for
all of the drivers?  No need to have special per-driver ioctl .h files,
right?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ