From: Juergen Gross <jgross@suse.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>,
John Garry <john.g.garry@oracle.com>
Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
stable@vger.kernel.org
Subject: Re: [PATCH] scsi: Let scsi_execute_cmd() mark args->sshdr as invalid
Date: Sun, 21 May 2023 07:23:56 +0200 [thread overview]
Message-ID: <73fd2741-3730-ca1d-7e23-0bf9cf10f423@suse.com> (raw)
In-Reply-To: <yq1v8gmpkq4.fsf@ca-mkp.ca.oracle.com>
[-- Attachment #1.1.1: Type: text/plain, Size: 1159 bytes --]
On 21.05.23 03:19, Martin K. Petersen wrote:
>
> John,
>
>> @Martin, Do you have any preference for what we do now? This code
>> which does not check for error and does not pre-zero sshdr is
>> longstanding, so I am not sure if Juergen's change is required for for
>> v6.4. I'm thinking to fix callers for v6.5 and also maybe change the
>> API, as I described.
>
> As I alluded to in the tracing thread, I'd like to see SK/ASC/ASCQ being
> generally available in the scsi_cmnd results instead of all this sense
> buffer and sense header micromanagement in every caller. That's a pretty
> heavy lift, though.
>
> Short term we need all callers to be fixed up. I'm not a particularly
> big fan of scsi_execute_cmd() zeroing something being passed in. I
> wonder if it would be worth having a DECLARE_SENSE_HEADER()?
sshdr is output only data, so setting it before returning seems to be a
sensible thing to do.
Letting the callers do that is kind of a layering violation IMHO, as this
would spread the knowledge that scsi_execute_cmd() isn't setting its output
data always.
In the end its your decision, of course.
Juergen
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3149 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
next prev parent reply other threads:[~2023-05-21 5:24 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-11 12:34 [PATCH] scsi: Let scsi_execute_cmd() mark args->sshdr as invalid Juergen Gross
2023-05-11 12:49 ` Bart Van Assche
2023-05-11 12:54 ` Juergen Gross
2023-05-11 13:10 ` Martin Wilck
2023-05-11 13:17 ` Juergen Gross
2023-05-11 13:23 ` Martin Wilck
2023-05-11 13:32 ` Juergen Gross
2023-05-11 15:59 ` Martin Wilck
2023-05-11 16:00 ` Martin Wilck
2023-05-17 2:06 ` Martin K. Petersen
2023-05-17 4:54 ` Juergen Gross
2023-05-17 15:05 ` John Garry
2023-05-18 4:53 ` Juergen Gross
2023-05-18 10:57 ` John Garry
2023-05-18 19:54 ` Bart Van Assche
2023-05-19 16:06 ` John Garry
2023-05-19 16:54 ` Bart Van Assche
2023-05-19 17:12 ` John Garry
2023-05-19 17:39 ` Bart Van Assche
2023-05-22 9:55 ` John Garry
2023-05-22 13:31 ` Bart Van Assche
2023-05-22 15:54 ` John Garry
2023-05-22 22:48 ` michael.christie
2023-05-21 1:19 ` Martin K. Petersen
2023-05-21 5:23 ` Juergen Gross [this message]
2023-05-22 22:26 ` Martin K. Petersen
2023-05-23 15:04 ` Mike Christie
2023-05-21 0:46 ` Martin K. Petersen
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=73fd2741-3730-ca1d-7e23-0bf9cf10f423@suse.com \
--to=jgross@suse.com \
--cc=jejb@linux.ibm.com \
--cc=john.g.garry@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=stable@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