Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1595365

Re: out of range LBA using sg_raw

From Christoph Hellwig <hch@infradead.org>
Newsgroups linux.kernel
Subject Re: out of range LBA using sg_raw
Date 2017-03-08 17:40 +0100
Message-ID <tiMN4-GJ-25@gated-at.bofh.it> (permalink)
References <tiKLf-7L9-5@gated-at.bofh.it> <tiMam-bQ-21@gated-at.bofh.it> <tiMam-bQ-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Mar 08, 2017 at 09:29:28PM +0530, Kashyap Desai wrote:
> Thanks Chris. It is understood to have sanity in driver, but how critical
> such checks where SG_IO type interface send pass-through request. ?
> Are you suggesting as good to have sanity or very important as there may
> be a real-time exposure other than SG_IO interface ? I am confused over
> must or good to have check.
> Also one more fault I can generate using below sg_raw command -

SCSI _devices_ need to sanity check any input and fail commands instead
of crashing or causing other problems.  Normal SCSI HBA drivers don't
need to do that as they don't interpret CDBs.  Megaraid (and a few other
raid drivers) are special in that they take on part of the device
functionality and do interpret CDBs sometimes.  In that case you'll
need to do all that sanity checking and generate proper errors.

It would be nice to have come common helpers for this shared between
everyone interpreting SCSI CBD (e.g. the SCSI target code, the NVMe
SCSI emulation and the various RAID drivers).

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

out of range LBA using sg_raw Kashyap Desai <kashyap.desai@broadcom.com> - 2017-03-08 15:30 +0100
  RE: out of range LBA using sg_raw Kashyap Desai <kashyap.desai@broadcom.com> - 2017-03-08 17:00 +0100
    RE: out of range LBA using sg_raw Kashyap Desai <kashyap.desai@broadcom.com> - 2017-03-08 17:20 +0100
    Re: out of range LBA using sg_raw "Martin K. Petersen" <martin.petersen@oracle.com> - 2017-03-08 17:40 +0100
      RE: out of range LBA using sg_raw Kashyap Desai <kashyap.desai@broadcom.com> - 2017-03-08 18:00 +0100
        Re: out of range LBA using sg_raw "Martin K. Petersen" <martin.petersen@oracle.com> - 2017-03-09 01:50 +0100
    Re: out of range LBA using sg_raw Christoph Hellwig <hch@infradead.org> - 2017-03-08 17:40 +0100
      RE: out of range LBA using sg_raw Kashyap Desai <kashyap.desai@broadcom.com> - 2017-03-08 17:40 +0100
  Re: out of range LBA using sg_raw Christoph Hellwig <hch@infradead.org> - 2017-03-08 17:10 +0100

csiph-web