Re: [PATCH] sysfs/bin: Fix size handling overflow for bin_attribute

2013-10-10 Thread Benjamin Herrenschmidt
On Thu, 2013-10-10 at 10:40 -0700, Greg KH wrote: > > This file (fs/sysfs/bin.c) is no longer in linux-next as Tejun merged it > > with the other file handling code in sysfs, to remove a bunch of > > duplicated logic. > > > > So, could you look at linux-next and see if this is still an issue there

Re: [PATCH] sysfs/bin: Fix size handling overflow for bin_attribute

2013-10-10 Thread Greg KH
On Thu, Oct 10, 2013 at 10:38:47AM -0700, Greg KH wrote: > On Thu, Oct 10, 2013 at 06:03:55PM +1100, Benjamin Herrenschmidt wrote: > > While looking at the code, I noticed that bin_attribute read() and write() > > ops copy the inode size into an int for futher comparisons. > > > > Some bin_attribu

Re: [PATCH] sysfs/bin: Fix size handling overflow for bin_attribute

2013-10-10 Thread Greg KH
On Thu, Oct 10, 2013 at 06:03:55PM +1100, Benjamin Herrenschmidt wrote: > While looking at the code, I noticed that bin_attribute read() and write() > ops copy the inode size into an int for futher comparisons. > > Some bin_attributes can be fairly large. For example, pci creates some for > BARs s

[PATCH] sysfs/bin: Fix size handling overflow for bin_attribute

2013-10-10 Thread Benjamin Herrenschmidt
While looking at the code, I noticed that bin_attribute read() and write() ops copy the inode size into an int for futher comparisons. Some bin_attributes can be fairly large. For example, pci creates some for BARs set to the BAR size and giant BARs are around the corner, so this is going to break