From: Avri Altman <Avri.Altman@wdc.com>
To: Jaegeuk Kim <jaegeuk@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"kernel-team@android.com" <kernel-team@android.com>
Cc: "cang@codeaurora.org" <cang@codeaurora.org>,
"alim.akhtar@samsung.com" <alim.akhtar@samsung.com>,
"bvanassche@acm.org" <bvanassche@acm.org>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
"stanley.chu@mediatek.com" <stanley.chu@mediatek.com>,
Jaegeuk Kim <jaegeuk@google.com>
Subject: RE: [PATCH v3] scsi: ufs: WB is only available on LUN #0 to #7
Date: Mon, 11 Jan 2021 10:07:50 +0000 [thread overview]
Message-ID: <DM6PR04MB6575AE5E44E55342A7A66F4AFCAB0@DM6PR04MB6575.namprd04.prod.outlook.com> (raw)
In-Reply-To: <20210111095927.1830311-1-jaegeuk@kernel.org>
>
>
> From: Jaegeuk Kim <jaegeuk@google.com>
>
> Kernel stack violation when getting unit_descriptor/wb_buf_alloc_units from
> rpmb lun. The reason is the unit descriptor length is different per LU.
>
> The lengh of Normal LU is 45, while the one of rpmb LU is 35.
>
> int ufshcd_read_desc_param(struct ufs_hba *hba, ...)
> {
> param_offset=41;
> param_size=4;
> buff_len=45;
> ...
> buff_len=35 by rpmb LU;
>
> if (is_kmalloc) {
> /* Make sure we don't copy more data than available */
> if (param_offset + param_size > buff_len)
> param_size = buff_len - param_offset;
> --> param_size = 250;
> memcpy(param_read_buf, &desc_buf[param_offset], param_size);
> --> memcpy(param_read_buf, desc_buf+41, 250);
>
> [ 141.868974][ T9174] Kernel panic - not syncing: stack-protector: Kernel
> stack is corrupted in: wb_buf_alloc_units_show+0x11c/0x11c
> }
> }
>
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
next prev parent reply other threads:[~2021-01-11 10:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-11 9:59 Jaegeuk Kim
2021-01-11 10:07 ` Avri Altman [this message]
2021-01-15 4:08 ` 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=DM6PR04MB6575AE5E44E55342A7A66F4AFCAB0@DM6PR04MB6575.namprd04.prod.outlook.com \
--to=avri.altman@wdc.com \
--cc=alim.akhtar@samsung.com \
--cc=bvanassche@acm.org \
--cc=cang@codeaurora.org \
--cc=jaegeuk@google.com \
--cc=jaegeuk@kernel.org \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=stanley.chu@mediatek.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®