Skip to content

scsi: bsg: Pass reply_len to bsg_setup_queue() to fit UFS ARPMB replies - #1467

Open
blktests-ci-kpd[bot] wants to merge 1 commit into
for-next_basefrom
series/1184774=>for-next
Open

blktests-ci-kpd[bot] wants to merge 1 commit into
for-next_basefrom
series/1184774=>for-next

Conversation

@blktests-ci-kpd

Copy link
Copy Markdown

Pull request for series with
subject: scsi: bsg: Pass reply_len to bsg_setup_queue() to fit UFS ARPMB replies
version: 1
url: https://patchwork.kernel.org/series/1184774/

@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: 34fbfb9
series: https://patchwork.kernel.org/series/1184774/
version: 1

bsg-lib allocates a 96-byte (SCSI_SENSE_BUFFERSIZE) reply buffer per
job, but struct ufs_rpmb_reply is 104 bytes: a 40-byte struct
ufs_bsg_reply followed by a 64-byte EHS. When an Advanced RPMB command
returns an EHS, ufshcd_advanced_rpmb_req_handler() copies it right
after the 40-byte header and writes 8 bytes past the end of the buffer.

Let each BSG transport pass its reply buffer size to bsg_setup_queue()
and have ufs_bsg request sizeof(struct ufs_rpmb_reply), so the full
reply reaches user space. Other transports keep SCSI_SENSE_BUFFERSIZE.

Fixes: 6ff265f ("scsi: ufs: core: bsg: Add advanced RPMB support in ufs_bsg")
Cc: stable@vger.kernel.org
Signed-off-by: Stanley Jhu <stanleyjhu@google.com>
@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: f9d56ee
series: https://patchwork.kernel.org/series/1184774/
version: 1

@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the series/1184774=>for-next branch from 81425c8 to bd5e7c3 Compare October 19, 2026 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant