On Wed, Feb 01, 2017 at 02:32:13PM +0100, Olaf Weber wrote:
> On 31-01-17 03:25, James Simmons wrote:
>
> [...]
>
> > > Also I'm uncomfortable with:
> > >
> > > data = container_of(hdr, struct libcfs_ioctl_data, ioc_hdr);
> > >
> > > If hdr isn't the first member of the struct then the code i
On 31-01-17 03:25, James Simmons wrote:
[...]
Also I'm uncomfortable with:
data = container_of(hdr, struct libcfs_ioctl_data, ioc_hdr);
If hdr isn't the first member of the struct then the code is broken but
container_of() implies that that isn't a hard requirement. It should
just be
On Tue, Jan 31, 2017 at 02:25:22AM +, James Simmons wrote:
> This sounds like a separate patch. I will open a ticket about this and
> your comments below.
There are a some other places that need a size requirement like
LNetCtl().
It really feels like it should be a part of this patch because
> It looks like what happened is there were two patches applied out of
> sync. Let's add a fixes tag and CC the original author.
So the only problem here is the commit message. I will update it then.
> Fixes: ed2f549dc0f6 ("staging: lustre: libcfs: test if userland data is to
> small")
>
> T
> On Mon, Jan 30, 2017 at 01:51:56PM +0300, Dan Carpenter wrote:
> > The lstcon_ioctl_entry() function doesn't have enough size checking.
>
> Actually, the lstcon_ioctl_entry() would have been fine before we apply
> this [patch 60/60]... As near as I can tell, no in kernel code is
> negatively a
On Mon, Jan 30, 2017 at 01:51:56PM +0300, Dan Carpenter wrote:
> The lstcon_ioctl_entry() function doesn't have enough size checking.
Actually, the lstcon_ioctl_entry() would have been fine before we apply
this [patch 60/60]... As near as I can tell, no in kernel code is
negatively affected by th
It looks like what happened is there were two patches applied out of
sync. Let's add a fixes tag and CC the original author.
Fixes: ed2f549dc0f6 ("staging: lustre: libcfs: test if userland data is to
small")
This patch was probably correct when it was written but commit
1290932728e5 ("staging:
The check for the smallest ioctl data in libcfs_ioctl_getdata()
is incorrect. Instead of checking against struct libcfs_ioctl_data
compare the size to struct libcfs_ioctl_hdr.
Reported-by: Doug Oucharek
Signed-off-by: James Simmons
---
drivers/staging/lustre/lnet/libcfs/linux/linux-module.c | 2