public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] scsi: qla2xxx: flexible array / field-spanning write issue
@ 2025-07-25 21:27 Chris Leech
  2025-07-25 21:27 ` [PATCH 1/2] scsi: qla2xxx: replace non-standard flexible array purex_item.iocb Chris Leech
  2025-07-25 21:27 ` [PATCH 2/2] scsi: qla2xxx: unwrap purex_item.iocb.iocb so that __counted_by can be used Chris Leech
  0 siblings, 2 replies; 18+ messages in thread
From: Chris Leech @ 2025-07-25 21:27 UTC (permalink / raw)
  To: linux-scsi, Nilesh Javali
  Cc: Kees Cook, Gustavo A . R . Silva, Bryan Gurney, John Meneghini

Bryan Gurney was running into these field-spanning write warnings while
testing some in-progress NVMe FPIN work with qla2xxx.

https://lore.kernel.org/linux-nvme/20250709211919.49100-1-bgurney@redhat.com/
  >  kernel: memcpy: detected field-spanning write (size 60) of single field
  >  "((uint8_t *)fpin_pkt + buffer_copy_offset)"
  >  at drivers/scsi/qla2xxx/qla_isr.c:1221 (size 44)

I think these changes should fix up the non-standard flexible array
allocations, and fix he warning for Bryan's testing.

Chris Leech (2):
  scsi: qla2xxx: replace non-standard flexible array purex_item.iocb
  scsi: qla2xxx: unwrap purex_item.iocb.iocb so that __counted_by can be
    used

 drivers/scsi/qla2xxx/qla_def.h  |  5 ++---
 drivers/scsi/qla2xxx/qla_isr.c  | 15 +++++++--------
 drivers/scsi/qla2xxx/qla_nvme.c |  2 +-
 drivers/scsi/qla2xxx/qla_os.c   |  5 +++--
 4 files changed, 13 insertions(+), 14 deletions(-)

-- 
2.50.1


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2025-07-30 20:55 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-25 21:27 [PATCH 0/2] scsi: qla2xxx: flexible array / field-spanning write issue Chris Leech
2025-07-25 21:27 ` [PATCH 1/2] scsi: qla2xxx: replace non-standard flexible array purex_item.iocb Chris Leech
2025-07-25 21:54   ` Kees Cook
2025-07-28 18:57   ` [PATCH v2 1/1] " Chris Leech
2025-07-28 19:43     ` Gustavo A. R. Silva
2025-07-28 19:54       ` Gustavo A. R. Silva
2025-07-28 21:15       ` Chris Leech
2025-07-28 22:55         ` Gustavo A. R. Silva
2025-07-28 23:52           ` Chris Leech
2025-07-29  1:37             ` Gustavo A. R. Silva
2025-07-29  2:20               ` Gustavo A. R. Silva
2025-07-30  0:04                 ` Chris Leech
2025-07-30  1:33                   ` Gustavo A. R. Silva
2025-07-30  3:44                 ` Gustavo A. R. Silva
2025-07-30 15:43                   ` Bryan Gurney
2025-07-30 20:55                     ` Gustavo A. R. Silva
2025-07-25 21:27 ` [PATCH 2/2] scsi: qla2xxx: unwrap purex_item.iocb.iocb so that __counted_by can be used Chris Leech
2025-07-25 21:56   ` Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox