From: Lee Duncan <lduncan@suse.com>
To: 杜敏杰 <duminjie@vivo.com>,
"Mike Christie" <michael.christie@oracle.com>,
"Chris Leech" <cleech@redhat.com>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
"open list:ISCSI" <open-iscsi@googlegroups.com>,
"open list:ISCSI" <linux-scsi@vger.kernel.org>,
"open list" <linux-kernel@vger.kernel.org>
Cc: "opensource.kernel" <opensource.kernel@vivo.com>
Subject: Re: 回复: [PATCH v1] scsi: iscsi: use kfree_sensitive() in iscsi_session_free()
Date: Wed, 19 Jul 2023 07:53:06 -0700 [thread overview]
Message-ID: <7483deb3-2b69-37fa-28ea-fb54aac58ff8@suse.com> (raw)
In-Reply-To: <SG2PR06MB5288D9E4D3124B5577ACA035AE39A@SG2PR06MB5288.apcprd06.prod.outlook.com>
On 7/18/23 19:28, 杜敏杰 wrote:
> Hi Mike!
>
> Thank you for your reply!
> Do I need to submit a new patch to kfree_sensitive for 'password_in' and 'usernames'?
>
Just submit a V2 version of your original patch, making the changes that
Mike suggested. You can continue to include my Reviewed-by tag.
>
> regards,
> Minjie
>
> -----邮件原件-----
> 发件人: Mike Christie <michael.christie@oracle.com>
> 发送时间: 2023年7月18日 2:26
> 收件人: 杜敏杰 <duminjie@vivo.com>; Lee Duncan <lduncan@suse.com>; Chris Leech <cleech@redhat.com>; James E.J. Bottomley <jejb@linux.ibm.com>; Martin K. Petersen <martin.petersen@oracle.com>; open list:ISCSI <open-iscsi@googlegroups.com>; open list:ISCSI <linux-scsi@vger.kernel.org>; open list <linux-kernel@vger.kernel.org>
> 抄送: opensource.kernel <opensource.kernel@vivo.com>
> 主题: Re: [PATCH v1] scsi: iscsi: use kfree_sensitive() in iscsi_session_free()
>
> On 7/17/23 4:26 AM, Minjie Du wrote:
>> session might contain private part of the password, so better use
>> kfree_sensitive() to free it.
>> In iscsi_session_free() use kfree_sensitive() to free session->password.
>>
>> Signed-off-by: Minjie Du <duminjie@vivo.com>
>> ---
>> drivers/scsi/libiscsi.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index
>> 0fda8905e..2f273229c 100644
>> --- a/drivers/scsi/libiscsi.c
>> +++ b/drivers/scsi/libiscsi.c
>> @@ -3132,7 +3132,7 @@ void iscsi_session_free(struct iscsi_cls_session *cls_session)
>> struct module *owner = cls_session->transport->owner;
>>
>> iscsi_pool_free(&session->cmdpool);
>> - kfree(session->password);
>> + kfree_sensitive(session->password);
>> kfree(session->password_in);
>
> You then also want kfree_sensitive for password_in.
>
> I would also use it for the usernames then too.
>
>> kfree(session->username);
>> kfree(session->username_in);
>
prev parent reply other threads:[~2023-07-19 14:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-17 9:26 Minjie Du
2023-07-17 17:31 ` Lee Duncan
2023-07-17 18:25 ` Mike Christie
[not found] ` <SG2PR06MB5288D9E4D3124B5577ACA035AE39A@SG2PR06MB5288.apcprd06.prod.outlook.com>
2023-07-19 14:53 ` Lee Duncan [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=7483deb3-2b69-37fa-28ea-fb54aac58ff8@suse.com \
--to=lduncan@suse.com \
--cc=cleech@redhat.com \
--cc=duminjie@vivo.com \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=michael.christie@oracle.com \
--cc=open-iscsi@googlegroups.com \
--cc=opensource.kernel@vivo.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
Powered by JetHome