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, 15 Dec 2015 11:55:45 -0800
From:	'Greg Kroah-Hartman' <gregkh@...uxfoundation.org>
To:	"Simmons, James A." <simmonsja@...l.gov>
Cc:	'Dan Carpenter' <dan.carpenter@...cle.com>,
	James Simmons <jsimmons@...radead.org>,
	"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
	Andreas Dilger <andreas.dilger@...el.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Oleg Drokin <oleg.drokin@...el.com>,
	Amir Shehata <amir.shehata@...el.com>,
	"lustre-devel@...ts.lustre.org" <lustre-devel@...ts.lustre.org>
Subject: Re: [PATCH 13/40] staging: lustre: Dynamic LNet Configuration (DLC)
 show command

On Tue, Dec 15, 2015 at 07:48:22PM +0000, Simmons, James A. wrote:
> >On Tue, Dec 15, 2015 at 06:14:19PM +0000, Simmons, James A. wrote:
> >>   
> >> >>  struct libcfs_ioctl_hdr {
> >> >>  	__u32 ioc_len;
> >> >> @@ -87,6 +88,13 @@ do {						    \
> >> >>  	data.ioc_hdr.ioc_len = sizeof(data);			\
> >> >>  } while (0)
> >> >>  
> >> >> +#define LIBCFS_IOC_INIT_V2(data, hdr)			\
> >> >> +do {							\
> >> >> +	memset(&(data), 0, sizeof(data));		\
> >> >> +	(data).hdr.ioc_version = LIBCFS_IOCTL_VERSION2;	\
> >> >> +	(data).hdr.ioc_len = sizeof(data);		\
> >> >> +} while (0)
> >> >> +
> >> >
> >> >Do we really need this?
> >> 
> >> Would you be okay if this was a inline function? This is used by user
> >> land and kernel space code.
> >
> >Then your code is broken, please never do that.
> 
> This brings up a good point. This header doesn't contain structures for userland so it is a uapi
> type header.  Should such headers only contain data structures?

Yes, that would make more sense.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ