RE: [Scsirastools-developers] [PATCH] support more devices in sgd iag and check devlist array bo un
Brought to you by:
arcress
From: Dailey, N. <Nat...@st...> - 2005-05-11 17:05:10
|
That's a good point... I just picked 32k because that seemed to be the most sg devices that could ever exist. But certainly a much smaller number would be fine. I think 512 would be plenty... Nate -----Original Message----- From: Cress, Andrew R [mailto:and...@in...] Sent: Wednesday, May 11, 2005 11:33 AM To: Dailey, Nate; scs...@li... Subject: RE: [Scsirastools-developers] [PATCH] support more devices in sgdiag and check devlist array bo unds Nate, The size does need to be greater than 32. Thanks for the patch. However, as it is it adds 140 bytes * 32K devices = about 4.48MB to each utility. This is pretty big, but is doable for all but sgraidmon, since most of the utilities will run only occasionally and won't stay around in memory. Hmmm. Do we really need 32K scsi devices for an enclosure? Is there a real use case for more than say 512 or 1024? Andy -----Original Message----- From: scs...@li... [mailto:scs...@li...] On Behalf Of Dailey, Nate Sent: Tuesday, May 10, 2005 3:40 PM To: 'scs...@li...' Cc: Dailey, Nate Subject: [Scsirastools-developers] [PATCH] support more devices in sgdiag and check devlist array bo unds I hit a segmentation fault in sgdiag on a system with more than 32 devices. It turns out that there's no bounds checking on the devlist array, so additional devices trample on memory outside the devlist. The attached patch prevents writing outside the bounds of the array, and also ups the number of devices. It looks like the same problem exists in sgdefects, sgdskfl, and sgmode, but I haven't tested them to verify. This patch is against scsirastools 1.4.14. Nate Dailey Stratus Technologies |