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
| ||
|
Date: Sat, 24 Mar 2007 02:02:13 +0100 From: Petr Vandrovec <petr@...drovec.name> To: bunk@...sta.de Cc: linux-kernel@...r.kernel.org, jengelh@...ux01.gwdg.de Subject: Re: 2.6.21-rc regression in mptbase > On Fri, Mar 23, 2007 at 11:39:12PM +0100, Jan Engelhardt wrote: > > Hello world, > > > > > > in at least 2.6.21-rc4, one or more of the mptscsi scsi modules is > > broken with respect to not detecting any harddisk (VMware provides that > > virtual LSI MPT controller), which means no working system. > > No problems in 2.6.20.2. > >... > > Could be a bug in the driver or a bug in the emulation exposed by a > change in the driver. > > Can you bisect which change to the driver broke it? Hello, it is bug in the emulation. It should be fixed in Workstation 6.0 RC1. If you want to use VMware's LSILogic emulation with older products, you need fix below until new releases come out (or unless I'll put out binary patch to fix binaries to return 16 instead of previous value). Petr If port reports that no devices are connected to it, assume that 16 devices are there. Hopefully nobody will ever build device with port but no devices, and even for them it should be safe as before code always probed 16 devices regardless of MaxDevices reported by port facts. Signed-off-by: Petr Vandrovec <petr@...drovec.name> --- linux/drivers/message/fusion/mptbase.c.orig 2007-03-20 13:47:28.000000000 -0700 +++ linux/drivers/message/fusion/mptbase.c 2007-03-23 17:45:51.000000000 -0700 @@ -2564,6 +2564,16 @@ pfacts->IOCStatus = le16_to_cpu(pfacts->IOCStatus); pfacts->IOCLogInfo = le32_to_cpu(pfacts->IOCLogInfo); pfacts->MaxDevices = le16_to_cpu(pfacts->MaxDevices); + /* + * VMware emulation is broken, its PortFact's MaxDevices reports value + * programmed by IOC Init, so if you program IOC Init to 256 (which is 0, + * as that field is only 8 bit), it reports back 0 in port facts, instead + * of 256... And unfortunately using 256 triggers another bug in the + * code (parallel SCSI can have only 16 devices). + */ + if (pfacts->MaxDevices == 0) { + pfacts->MaxDevices = 16; + } pfacts->PortSCSIID = le16_to_cpu(pfacts->PortSCSIID); pfacts->ProtocolFlags = le16_to_cpu(pfacts->ProtocolFlags); pfacts->MaxPostedCmdBuffers = le16_to_cpu(pfacts->MaxPostedCmdBuffers); - 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