* [PATCH 0/3] hpsa: A few more miscellaneous patches for Jan. 2011
@ 2011-01-07 16:55 Stephen M. Cameron
2011-01-07 16:55 ` [PATCH 1/3] hpsa: fix use of uninitialized variable in hpsa_add_msa2xxx_enclosure_device() Stephen M. Cameron
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Stephen M. Cameron @ 2011-01-07 16:55 UTC (permalink / raw)
To: james.bottomley
Cc: linux-scsi, mike.miller, linux-kernel, thenzl, akpm, smcameron
The following series contains a few old fixes that I somehow failed
to send along previously.
---
Stephen M. Cameron (2):
hpsa: fix use of uninitialized variable in hpsa_add_msa2xxx_enclosure_device()
hpsa: Fix problem that CMD_UNABORTABLE command status was treated as unknown
Vasiliy Kulikov (1):
hpsa: avoid leaking stack contents to userland
drivers/scsi/hpsa.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
--
-- steve
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/3] hpsa: fix use of uninitialized variable in hpsa_add_msa2xxx_enclosure_device()
2011-01-07 16:55 [PATCH 0/3] hpsa: A few more miscellaneous patches for Jan. 2011 Stephen M. Cameron
@ 2011-01-07 16:55 ` Stephen M. Cameron
2011-01-07 16:55 ` [PATCH 2/3] hpsa: Fix problem that CMD_UNABORTABLE command status was treated as unknown Stephen M. Cameron
2011-01-07 16:55 ` [PATCH 3/3] hpsa: avoid leaking stack contents to userland Stephen M. Cameron
2 siblings, 0 replies; 4+ messages in thread
From: Stephen M. Cameron @ 2011-01-07 16:55 UTC (permalink / raw)
To: james.bottomley
Cc: linux-scsi, mike.miller, linux-kernel, thenzl, akpm, smcameron
From: Stephen M. Cameron <scameron@beardog.cce.hp.com>
hpsa: fix use of uninitialized variable in hpsa_add_msa2xxx_enclosure_device()
Thanks to Scott Teel for noticing this.
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
---
drivers/scsi/hpsa.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index c255f46..c6c13b0 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -1617,6 +1617,8 @@ static int add_msa2xxx_enclosure_device(struct ctlr_info *h,
if (lun == 0) /* if lun is 0, then obviously we have a lun 0. */
return 0;
+ memset(scsi3addr, 0, 8);
+ scsi3addr[3] = target;
if (is_hba_lunid(scsi3addr))
return 0; /* Don't add the RAID controller here. */
@@ -1631,8 +1633,6 @@ static int add_msa2xxx_enclosure_device(struct ctlr_info *h,
return 0;
}
- memset(scsi3addr, 0, 8);
- scsi3addr[3] = target;
if (hpsa_update_device_info(h, scsi3addr, this_device))
return 0;
(*nmsa2xxx_enclosures)++;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] hpsa: Fix problem that CMD_UNABORTABLE command status was treated as unknown
2011-01-07 16:55 [PATCH 0/3] hpsa: A few more miscellaneous patches for Jan. 2011 Stephen M. Cameron
2011-01-07 16:55 ` [PATCH 1/3] hpsa: fix use of uninitialized variable in hpsa_add_msa2xxx_enclosure_device() Stephen M. Cameron
@ 2011-01-07 16:55 ` Stephen M. Cameron
2011-01-07 16:55 ` [PATCH 3/3] hpsa: avoid leaking stack contents to userland Stephen M. Cameron
2 siblings, 0 replies; 4+ messages in thread
From: Stephen M. Cameron @ 2011-01-07 16:55 UTC (permalink / raw)
To: james.bottomley
Cc: linux-scsi, mike.miller, linux-kernel, thenzl, akpm, smcameron
From: Stephen M. Cameron <StephenM.Cameron>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
---
drivers/scsi/hpsa.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index c6c13b0..5828bcb 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -1152,6 +1152,10 @@ static void complete_scsi_command(struct CommandList *cp,
cmd->result = DID_TIME_OUT << 16;
dev_warn(&h->pdev->dev, "cp %p timedout\n", cp);
break;
+ case CMD_UNABORTABLE:
+ cmd->result = DID_ERROR << 16;
+ dev_warn(&h->pdev->dev, "Command unabortable\n");
+ break;
default:
cmd->result = DID_ERROR << 16;
dev_warn(&h->pdev->dev, "cp %p returned unknown status %x\n",
@@ -1317,6 +1321,9 @@ static void hpsa_scsi_interpret_error(struct CommandList *cp)
case CMD_TIMEOUT:
dev_warn(d, "cp %p timed out\n", cp);
break;
+ case CMD_UNABORTABLE:
+ dev_warn(d, "Command unabortable\n");
+ break;
default:
dev_warn(d, "cp %p returned unknown status %x\n", cp,
ei->CommandStatus);
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] hpsa: avoid leaking stack contents to userland
2011-01-07 16:55 [PATCH 0/3] hpsa: A few more miscellaneous patches for Jan. 2011 Stephen M. Cameron
2011-01-07 16:55 ` [PATCH 1/3] hpsa: fix use of uninitialized variable in hpsa_add_msa2xxx_enclosure_device() Stephen M. Cameron
2011-01-07 16:55 ` [PATCH 2/3] hpsa: Fix problem that CMD_UNABORTABLE command status was treated as unknown Stephen M. Cameron
@ 2011-01-07 16:55 ` Stephen M. Cameron
2 siblings, 0 replies; 4+ messages in thread
From: Stephen M. Cameron @ 2011-01-07 16:55 UTC (permalink / raw)
To: james.bottomley
Cc: linux-scsi, mike.miller, linux-kernel, thenzl, akpm, smcameron
From: Vasiliy Kulikov <segooon@gmail.com>
memset arg64 to zero in the passthrough ioctls to avoid leaking contents
of kernel stack memory to userland via uninitialized padding fields
inserted by the compiler for alignment reasons.
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
---
drivers/scsi/hpsa.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 5828bcb..959eeb2 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -2310,6 +2310,7 @@ static int hpsa_ioctl32_passthru(struct scsi_device *dev, int cmd, void *arg)
int err;
u32 cp;
+ memset(&arg64, 0, sizeof(arg64));
err = 0;
err |= copy_from_user(&arg64.LUN_info, &arg32->LUN_info,
sizeof(arg64.LUN_info));
@@ -2346,6 +2347,7 @@ static int hpsa_ioctl32_big_passthru(struct scsi_device *dev,
int err;
u32 cp;
+ memset(&arg64, 0, sizeof(arg64));
err = 0;
err |= copy_from_user(&arg64.LUN_info, &arg32->LUN_info,
sizeof(arg64.LUN_info));
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-01-07 16:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-07 16:55 [PATCH 0/3] hpsa: A few more miscellaneous patches for Jan. 2011 Stephen M. Cameron
2011-01-07 16:55 ` [PATCH 1/3] hpsa: fix use of uninitialized variable in hpsa_add_msa2xxx_enclosure_device() Stephen M. Cameron
2011-01-07 16:55 ` [PATCH 2/3] hpsa: Fix problem that CMD_UNABORTABLE command status was treated as unknown Stephen M. Cameron
2011-01-07 16:55 ` [PATCH 3/3] hpsa: avoid leaking stack contents to userland Stephen M. Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).