public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Bogdanov <d.bogdanov@yadro.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Mike Christie <michael.christie@oracle.com>,
	Martin Petersen <martin.petersen@oracle.com>,
	<target-devel@vger.kernel.org>, <linux-scsi@vger.kernel.org>,
	<linux@yadro.com>, Roman Bolshakov <r.bolshakov@yadro.com>
Subject: Re: [PATCH 2/6] scsi: target: core: add list of opcodes for RSOC
Date: Mon, 15 Aug 2022 13:59:11 +0300	[thread overview]
Message-ID: <20220815105911.GB17595@yadro.com> (raw)
In-Reply-To: <YvdXl/H1etXxeTqN@infradead.org>

On Sat, Aug 13, 2022 at 12:49:43AM -0700, Christoph Hellwig wrote:
> 
> On Fri, Aug 12, 2022 at 11:03:07AM +0300, Dmitry Bogdanov wrote:
> > > > +     .support = SCSI_SUPPORT_FULL,
> > > > +     .opcode = XDWRITEREAD_10,
> > > > +     .cdb_size = 10,
> > > > +     .usage_bits = {XDWRITEREAD_10, 0x18, 0xff, 0xff,
> > > > +                    0xff, 0xff, SCSI_GROUP_NUMBER_MASK, 0xff,
> > > > +                    0xff, SCSI_CONTROL_MASK},
> > > > +};
> 
> > > one of Martin's tree after you made this patch.
> > Yes, I saw,  Iwill remove XDWRITEREAD_* in the next revision.
> 
> What this does point out is that the way the patches are done,
> we have a fundamental issue with these descriptors being potentially
> out of sync with the actually supported commands. Once way to fix
> this would be to add a parse callback to these dscriptors to unwind
> sbc_parse_cdb.  The big downside would be an extra expensive indirect
> call per command, though.
Yes, there is such a risk. I was raising it in our company 2 years ago
when I did this patchset. We agreed that, until there is somebody who
can notice about it, it's OK :). It's happened not so often. There was
just one case when we changed RSOC structs - when I was adding support
of ACA condition.

Recently someone wants to have some defence against fuzzy-logic attacks,
may be he (or someone else) will intergate RSOC descriptors into
sbc_parse_cmd within his task.


  reply	other threads:[~2022-08-15 10:59 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-18 12:01 [PATCH 0/6] add support of RSOC command Dmitry Bogdanov
2022-07-18 12:01 ` [PATCH 1/6] scsi: target: core: " Dmitry Bogdanov
2022-07-19 10:08   ` kernel test robot
2022-07-18 12:01 ` [PATCH 2/6] scsi: target: core: add list of opcodes for RSOC Dmitry Bogdanov
2022-08-12  3:38   ` Mike Christie
2022-08-12  8:03     ` Dmitry Bogdanov
2022-08-13  7:49       ` Christoph Hellwig
2022-08-15 10:59         ` Dmitry Bogdanov [this message]
2022-07-18 12:01 ` [PATCH 3/6] scsi: target: core: dynamic opcode support in RSOC Dmitry Bogdanov
2022-07-19 12:40   ` kernel test robot
2022-08-12  3:43   ` Mike Christie
2022-08-12 11:30     ` Dmitry Bogdanov
2022-07-18 12:01 ` [PATCH 4/6] scsi: target: core: add emulate_rsoc attribute Dmitry Bogdanov
2022-08-12  3:43   ` Mike Christie
2022-08-12 11:34     ` Dmitry Bogdanov
2022-08-12 18:12       ` michael.christie
2022-08-15  6:35         ` Dmitry Bogdanov
2022-08-29 18:13           ` Mike Christie
2022-07-18 12:01 ` [PATCH 5/6] scsi: target: core: dynamicaly set dpofua in usage_bits Dmitry Bogdanov
2022-07-18 12:01 ` [PATCH 6/6] scsi: target: check emulate_3pc for RECEIVE COPY Dmitry Bogdanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220815105911.GB17595@yadro.com \
    --to=d.bogdanov@yadro.com \
    --cc=hch@infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux@yadro.com \
    --cc=martin.petersen@oracle.com \
    --cc=michael.christie@oracle.com \
    --cc=r.bolshakov@yadro.com \
    --cc=target-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox