From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756355Ab3JJRkO (ORCPT ); Thu, 10 Oct 2013 13:40:14 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:35551 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756014Ab3JJRkM (ORCPT ); Thu, 10 Oct 2013 13:40:12 -0400 Date: Thu, 10 Oct 2013 10:40:11 -0700 From: Greg KH To: Benjamin Herrenschmidt Cc: Tejun Heo , Linus Torvalds , Linux Kernel list , Bjorn Helgaas Subject: Re: [PATCH] sysfs/bin: Fix size handling overflow for bin_attribute Message-ID: <20131010174011.GA1376@kroah.com> References: <1381378788.4330.30.camel@pasglop> <1381388635.4330.37.camel@pasglop> <20131010173847.GD13759@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20131010173847.GD13759@kroah.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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_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 something somewhere eventually. > > > > Let's use the right type. > > > > Signed-off-by: Benjamin Herrenschmidt > > 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 > or not? Ah, nevermind, I just looked, and it still is an issue there, I'll hand-edit the patch to apply properly, thanks. greg k-h