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: <20090213193444.GL28946@ZenIV.linux.org.uk>
Date:	Fri, 13 Feb 2009 19:34:44 +0000
From:	Al Viro <viro@...IV.linux.org.uk>
To:	Joe Eykholt <jeykholt@...co.com>
Cc:	Randy Dunlap <randy.dunlap@...cle.com>,
	"Sachin P. Sant" <sachinp@...ibm.com>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	linux-next@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
	linux-scsi <linux-scsi@...r.kernel.org>
Subject: Re: next Feb 13 drivers/scsi/aha1542.ko build break

On Fri, Feb 13, 2009 at 11:13:50AM -0800, Joe Eykholt wrote:

> > I'm seeing that also.  I think that it's this line in aha1542.c:
> > 
> > 495:		mbo = (scsi2int(mb[mbi].ccbptr) - (SCSI_BUF_PA(&ccb[0]))) / sizeof(struct ccb);
> > 
> > since I can comment out the "/ sizeof(struct ccb)" and the driver builds successfully.
> > 
> > This may need a patch to use one of the div() macros (?).
> 
> In the above case, this problem might not occur if sizeof(struct ccb) happened to
> be a power of 2, since the compiler generates a shift in that case.
> Then later someone could increase the size of the struct and introduce this problem.

The real problem, of course, is that we should _not_ be doing 64bit-division
here, be it by shifts or by __udiv...; if anything, we ought to store the
bus version of HOSTDATA(...)->ccb at the time we'd checked that allocation
got us a small enough address (i.e. after scsi_register()).  And store it
in u32.
--
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