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]
Message-ID: <f889aa55ce204843be4bb32f4ae2ee2f@ausx13mpc120.AMER.DELL.COM>
Date:   Fri, 20 Oct 2017 13:54:54 +0000
From:   <Mario.Limonciello@...l.com>
To:     <greg@...ah.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>, <gnomes@...rguk.ukuu.org.uk>
Subject: RE: [PATCH v10 13/15] platform/x86: wmi: create userspace interface
 for drivers

> -----Original Message-----
> From: Greg KH [mailto:greg@...ah.com]
> Sent: Friday, October 20, 2017 8:23 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; Alan Cox
> <gnomes@...rguk.ukuu.org.uk>
> Subject: Re: [PATCH v10 13/15] platform/x86: wmi: create userspace interface for
> drivers
> 
> On Thu, Oct 19, 2017 at 12:50:16PM -0500, Mario Limonciello wrote:
> > +static ssize_t wmi_char_read(struct file *filp, char __user *buffer,
> > +	size_t length, loff_t *offset)
> > +{
> > +	struct wmi_block *wblock = filp->private_data;
> > +	size_t count;
> > +
> > +	if (*offset != 0)
> > +		return 0;
> > +
> > +	count = sizeof(wblock->req_buf_size);
> > +	count = length < count ? length : count;
> > +
> > +	if (copy_to_user(buffer, &wblock->req_buf_size, count))
> > +		return -EFAULT;
> > +
> > +	*offset = count;
> > +	return count;
> 
> simple_read_from_buffer()?  Library functions are your friend :)
> 
Thanks, wasn't aware of it.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ