mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bean Huo <beanhuo@iokpp.de>
To: nayeoni.kim@samsung.com, linux-scsi@vger.kernel.org,
	"Martin K. Petersen" <mkp@kernel.org>
Cc: Alim Akhtar <alim.akhtar@samsung.com>,
	Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>,
	"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
	Bean Huo <beanhuo@micron.com>,
	Bart Van Assche <bvanassche@acm.org>,
	linux-kernel@vger.kernel.org, Stanley Jhu <stanleyjhu@google.com>
Subject: Re: [PATCH] scsi: ufs: rpmb: Return -EIO instead of SCSI result on failure
Date: Thu, 26 Nov 2026 19:48:06 +0100	[thread overview]
Message-ID: <1c0167ce6f039db3453e77b1fa6f8efa193ff4f4.camel@iokpp.de> (raw)
In-Reply-To: <20261124-b4-ufs-3-rpmb-errno-v1-1-65b54643ca21@samsung.com>

On Tue, 2026-11-24 at 13:52 +0900, Nayeon Kim via B4 Relay wrote:
> From: Nayeon Kim <nayeoni.kim@samsung.com>
> 
> rpmb_route_frames() is documented to return a negative errno on
> failure, but ufs_sec_submit() returns the value of scsi_execute_cmd()
> as is. When a SECURITY PROTOCOL IN/OUT command fails, that value is a
> positive SCSI result such as SAM_STAT_CHECK_CONDITION or
> DID_ERROR << 16. ufs_rpmb_route_frames() passes it up and logs it as
> "ret=%d". Since scsi_execute_cmd() sets RQF_QUIET, the sense data is
> not logged anywhere.
> 
> handle_rpc_func_rpmb_frames(), the only caller of rpmb_route_frames(),
> checks for a non-zero return, so OP-TEE still sees the failure.
> 
> Log the SCSI result and sense data in ufs_sec_submit() and convert
> positive results to -EIO, as ufshcd_set_dev_pwr_mode() does.
> 
> Signed-off-by: Nayeon Kim <nayeoni.kim@samsung.com>
> ---
> Based on 7.4/scsi-fixes because it depends on commit 7bc9b854cd68
> ("scsi: ufs: rpmb: Decouple device lifecycle from devres to avoid UAF").
> Not urgent; fine for 7.5. Compile-tested (W=1) only.
> ---


this time sashiko is right, you need to add a fixes tag. 

Fixes: b06b8c421485 ("scsi: ufs: core: Add OP-TEE based RPMB driver for UFS
devices")

Reviewed-by: Bean Huo <beanhuo@micron.com>

Kind regards,
Bean



      reply	other threads:[~2026-11-26 18:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24  4:52 Nayeon Kim via B4 Relay
2026-11-26 18:48 ` Bean Huo [this message]

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=1c0167ce6f039db3453e77b1fa6f8efa193ff4f4.camel@iokpp.de \
    --to=beanhuo@iokpp.de \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=alim.akhtar@samsung.com \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --cc=jorge.ramirez@oss.qualcomm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mkp@kernel.org \
    --cc=nayeoni.kim@samsung.com \
    --cc=stanleyjhu@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®