Re: [PATCH] serverworks should not take ahold of megaraid'd controllers

2005-07-22 Thread Darrick J. Wong
Arjan, Alan:

I didn't know that dmraid supports MegaIDE nowadays.  Thanks for the
tipoff, and I apologize for the unnecessary traffic.  I'll look into dmraid.

--D

Alan Cox wrote:
> On Iau, 2005-07-21 at 15:37 -0700, Darrick J. Wong wrote:
> 
>>I've noticed what might be a small bug with the serverworks driver in
>>2.6.12.3.  The IBM HS20 blade has a ServerWorks CSB6 IDE controller with
>>an optional LSI MegaIDE RAID BIOS (BIOS assisted software raid, iow).
> 
> 
> With a binary only proprietary driver.
> 
> 
>>(ServerWorks) to IBM.  However, the serverworks driver doesn't notice
>>this and will attach to the controller anyway, thus allowing raw access
>>to the disks in the RAID.  An unsuspecting user can then read and write
>>whatever they want to the drive, which could very well degrade or
>>destroy the array, which is clearly not desirable behavior.
> 
> 
> It may be appropriate for some vendor situations but it isn't
> appropriate for the base kernel to default to assuming the user wants to
> use binary only drivers instead of dmraid. Especially as the raid
> formats for this hardware are partially known despite no assistance I
> know of from the vendor.
> 
> Alan
> 
> 


signature.asc
Description: OpenPGP digital signature


Re: [PATCH] serverworks should not take ahold of megaraid'd controllers

2005-07-22 Thread Darrick J. Wong
Arjan, Alan:

I didn't know that dmraid supports MegaIDE nowadays.  Thanks for the
tipoff, and I apologize for the unnecessary traffic.  I'll look into dmraid.

--D

Alan Cox wrote:
 On Iau, 2005-07-21 at 15:37 -0700, Darrick J. Wong wrote:
 
I've noticed what might be a small bug with the serverworks driver in
2.6.12.3.  The IBM HS20 blade has a ServerWorks CSB6 IDE controller with
an optional LSI MegaIDE RAID BIOS (BIOS assisted software raid, iow).
 
 
 With a binary only proprietary driver.
 
 
(ServerWorks) to IBM.  However, the serverworks driver doesn't notice
this and will attach to the controller anyway, thus allowing raw access
to the disks in the RAID.  An unsuspecting user can then read and write
whatever they want to the drive, which could very well degrade or
destroy the array, which is clearly not desirable behavior.
 
 
 It may be appropriate for some vendor situations but it isn't
 appropriate for the base kernel to default to assuming the user wants to
 use binary only drivers instead of dmraid. Especially as the raid
 formats for this hardware are partially known despite no assistance I
 know of from the vendor.
 
 Alan
 
 


signature.asc
Description: OpenPGP digital signature


Re: [PATCH] serverworks should not take ahold of megaraid'd controllers

2005-07-21 Thread Alan Cox
On Iau, 2005-07-21 at 15:37 -0700, Darrick J. Wong wrote:
> I've noticed what might be a small bug with the serverworks driver in
> 2.6.12.3.  The IBM HS20 blade has a ServerWorks CSB6 IDE controller with
> an optional LSI MegaIDE RAID BIOS (BIOS assisted software raid, iow).

With a binary only proprietary driver.

> (ServerWorks) to IBM.  However, the serverworks driver doesn't notice
> this and will attach to the controller anyway, thus allowing raw access
> to the disks in the RAID.  An unsuspecting user can then read and write
> whatever they want to the drive, which could very well degrade or
> destroy the array, which is clearly not desirable behavior.

It may be appropriate for some vendor situations but it isn't
appropriate for the base kernel to default to assuming the user wants to
use binary only drivers instead of dmraid. Especially as the raid
formats for this hardware are partially known despite no assistance I
know of from the vendor.

Alan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] serverworks should not take ahold of megaraid'd controllers

2005-07-21 Thread Arjan van de Ven
On Thu, 2005-07-21 at 15:37 -0700, Darrick J. Wong wrote:
> Hi all,
> 
> I've noticed what might be a small bug with the serverworks driver in
> 2.6.12.3.  The IBM HS20 blade has a ServerWorks CSB6 IDE controller with
> an optional LSI MegaIDE RAID BIOS (BIOS assisted software raid, iow).
> When this megaide BIOS is enabled on the HS20, the PCI
> subvendor/subdevice IDs on the CSB6 are changed from the default
> (ServerWorks) to IBM.  However, the serverworks driver doesn't notice
> this and will attach to the controller anyway, thus allowing raw access
> to the disks in the RAID.  An unsuspecting user can then read and write
> whatever they want to the drive, which could very well degrade or
> destroy the array, which is clearly not desirable behavior.

actually this is the RIGHT behavior.
This way dmraid can address the raid format and make the thing work.
Your patch will break it. That is a very bad idea.

So this is a NAK on your patch.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] serverworks should not take ahold of megaraid'd controllers

2005-07-21 Thread Darrick J. Wong
Hi all,

I've noticed what might be a small bug with the serverworks driver in
2.6.12.3.  The IBM HS20 blade has a ServerWorks CSB6 IDE controller with
an optional LSI MegaIDE RAID BIOS (BIOS assisted software raid, iow).
When this megaide BIOS is enabled on the HS20, the PCI
subvendor/subdevice IDs on the CSB6 are changed from the default
(ServerWorks) to IBM.  However, the serverworks driver doesn't notice
this and will attach to the controller anyway, thus allowing raw access
to the disks in the RAID.  An unsuspecting user can then read and write
whatever they want to the drive, which could very well degrade or
destroy the array, which is clearly not desirable behavior.

The attached patch against 2.6.12.3 makes the serverworks driver ignore
a megaraided CSB6.  If desired, I can respin this patch with a debugging
knob to force the serverworks driver to use the old behavior.  This
patch has been tested on the HS20 mentioned above, and I haven't seen
any problems with it.

Please let me know what you think of this patch; I'm not cc'd on lkml or
linux-ide.

--Darrick
diff -Naur linux-2.6.12.3_0/drivers/ide/pci/serverworks.c linux-2.6.12.3_1/drivers/ide/pci/serverworks.c
--- linux-2.6.12.3_0/drivers/ide/pci/serverworks.c	2005-07-15 14:18:57.0 -0700
+++ linux-2.6.12.3_1/drivers/ide/pci/serverworks.c	2005-07-21 13:02:54.469552989 -0700
@@ -645,6 +647,15 @@
 {
 	ide_pci_device_t *d = _chipsets[id->driver_data];
 
+	/* Refuse to acknowledge CSB6 in MegaRAID mode on IBM HS20/40 blade. */
+	if (	dev->subsystem_vendor == PCI_VENDOR_ID_IBM &&
+		dev->subsystem_device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE)
+	{
+		printk(KERN_INFO "svwks: MegaRAID detected; ignoring.\n");
+		return -ENODEV;
+	}
+
+
 	return d->init_setup(dev, d);
 }
 


signature.asc
Description: OpenPGP digital signature


[PATCH] serverworks should not take ahold of megaraid'd controllers

2005-07-21 Thread Darrick J. Wong
Hi all,

I've noticed what might be a small bug with the serverworks driver in
2.6.12.3.  The IBM HS20 blade has a ServerWorks CSB6 IDE controller with
an optional LSI MegaIDE RAID BIOS (BIOS assisted software raid, iow).
When this megaide BIOS is enabled on the HS20, the PCI
subvendor/subdevice IDs on the CSB6 are changed from the default
(ServerWorks) to IBM.  However, the serverworks driver doesn't notice
this and will attach to the controller anyway, thus allowing raw access
to the disks in the RAID.  An unsuspecting user can then read and write
whatever they want to the drive, which could very well degrade or
destroy the array, which is clearly not desirable behavior.

The attached patch against 2.6.12.3 makes the serverworks driver ignore
a megaraided CSB6.  If desired, I can respin this patch with a debugging
knob to force the serverworks driver to use the old behavior.  This
patch has been tested on the HS20 mentioned above, and I haven't seen
any problems with it.

Please let me know what you think of this patch; I'm not cc'd on lkml or
linux-ide.

--Darrick
diff -Naur linux-2.6.12.3_0/drivers/ide/pci/serverworks.c linux-2.6.12.3_1/drivers/ide/pci/serverworks.c
--- linux-2.6.12.3_0/drivers/ide/pci/serverworks.c	2005-07-15 14:18:57.0 -0700
+++ linux-2.6.12.3_1/drivers/ide/pci/serverworks.c	2005-07-21 13:02:54.469552989 -0700
@@ -645,6 +647,15 @@
 {
 	ide_pci_device_t *d = serverworks_chipsets[id-driver_data];
 
+	/* Refuse to acknowledge CSB6 in MegaRAID mode on IBM HS20/40 blade. */
+	if (	dev-subsystem_vendor == PCI_VENDOR_ID_IBM 
+		dev-subsystem_device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE)
+	{
+		printk(KERN_INFO svwks: MegaRAID detected; ignoring.\n);
+		return -ENODEV;
+	}
+
+
 	return d-init_setup(dev, d);
 }
 


signature.asc
Description: OpenPGP digital signature


Re: [PATCH] serverworks should not take ahold of megaraid'd controllers

2005-07-21 Thread Arjan van de Ven
On Thu, 2005-07-21 at 15:37 -0700, Darrick J. Wong wrote:
 Hi all,
 
 I've noticed what might be a small bug with the serverworks driver in
 2.6.12.3.  The IBM HS20 blade has a ServerWorks CSB6 IDE controller with
 an optional LSI MegaIDE RAID BIOS (BIOS assisted software raid, iow).
 When this megaide BIOS is enabled on the HS20, the PCI
 subvendor/subdevice IDs on the CSB6 are changed from the default
 (ServerWorks) to IBM.  However, the serverworks driver doesn't notice
 this and will attach to the controller anyway, thus allowing raw access
 to the disks in the RAID.  An unsuspecting user can then read and write
 whatever they want to the drive, which could very well degrade or
 destroy the array, which is clearly not desirable behavior.

actually this is the RIGHT behavior.
This way dmraid can address the raid format and make the thing work.
Your patch will break it. That is a very bad idea.

So this is a NAK on your patch.


-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] serverworks should not take ahold of megaraid'd controllers

2005-07-21 Thread Alan Cox
On Iau, 2005-07-21 at 15:37 -0700, Darrick J. Wong wrote:
 I've noticed what might be a small bug with the serverworks driver in
 2.6.12.3.  The IBM HS20 blade has a ServerWorks CSB6 IDE controller with
 an optional LSI MegaIDE RAID BIOS (BIOS assisted software raid, iow).

With a binary only proprietary driver.

 (ServerWorks) to IBM.  However, the serverworks driver doesn't notice
 this and will attach to the controller anyway, thus allowing raw access
 to the disks in the RAID.  An unsuspecting user can then read and write
 whatever they want to the drive, which could very well degrade or
 destroy the array, which is clearly not desirable behavior.

It may be appropriate for some vendor situations but it isn't
appropriate for the base kernel to default to assuming the user wants to
use binary only drivers instead of dmraid. Especially as the raid
formats for this hardware are partially known despite no assistance I
know of from the vendor.

Alan

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/