All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Strateman <patrick.strateman@gmail.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, "Kai Mäkisara" <Kai.Makisara@kolumbus.fi>
Subject: Re: [PATCH] st: reject MTIOCTOP mt_count values out of range for the SPACE(6) scsi command
Date: Tue, 26 Jan 2021 23:44:23 -0500	[thread overview]
Message-ID: <CA+-=UwYTKhvEDSq3pZgpoH1N-Tf8Smq1cRE+J7t3-A+SCeYaYg@mail.gmail.com> (raw)
In-Reply-To: <yq1czxrqai6.fsf@ca-mkp.ca.oracle.com>

I'm happy to implement SPACE(16) instead.

I believe the opcode for SPACE(16) is 0x91, but in
include/scsi/scsi_proto.h that value is listed as
SYNCHRONIZE_CACHE_16.

I couldn't figure out which was wrong, so I proposed this to at least
prevent the interface from doing the wrong thing.

On Tue, Jan 26, 2021 at 11:26 PM Martin K. Petersen
<martin.petersen@oracle.com> wrote:
>
>
> Patrick,
>
> > Values greater than 0x7FFFFF do not fit in the 24 bit big endian two's
> > complement integer for the underlying scsi SPACE(6) command.
>
> I was hoping Kai would chime in.
>
> However, since SPACE(6) has been deprecated for a while, I am not so
> keen on blindly enforcing this in the ioctl interface. I would rather
> see SPACE(16) support added and then have the supplied count value be
> validated based on whether the 6 or 16 byte command is being issued to
> the device.
>
> --
> Martin K. Petersen      Oracle Linux Engineering

  reply	other threads:[~2021-01-27  5:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-13  2:24 [PATCH] st: reject MTIOCTOP mt_count values out of range for the SPACE(6) scsi command Patrick Strateman
2021-01-27  4:24 ` Martin K. Petersen
2021-01-27  4:44   ` Patrick Strateman [this message]
2021-01-27  5:00     ` Martin K. Petersen
2021-03-11 19:04 ` "Kai Mäkisara (Kolumbus)"

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='CA+-=UwYTKhvEDSq3pZgpoH1N-Tf8Smq1cRE+J7t3-A+SCeYaYg@mail.gmail.com' \
    --to=patrick.strateman@gmail.com \
    --cc=Kai.Makisara@kolumbus.fi \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.