[PATCH v3] scsi: core: fix uninit-value access of variable sshdr

2019-10-11 Thread zhengbin
kmsan report a warning in 5.1-rc4: BUG: KMSAN: uninit-value in sr_get_events drivers/scsi/sr.c:207 [inline] BUG: KMSAN: uninit-value in sr_check_events+0x2cf/0x1090 drivers/scsi/sr.c:243 CPU: 1 PID: 13858 Comm: syz-executor.0 Tainted: GB 5.1.0-rc4+ #8 Hardware name: QEMU Standard P

Re: [PATCH v2] scsi: core: fix uninit-value access of variable sshdr

2019-10-11 Thread zhengbin (A)
On 2019/10/12 10:06, James Bottomley wrote: > On Sat, 2019-10-12 at 10:03 +0800, zhengbin (A) wrote: >> On 2019/10/12 9:58, James Bottomley wrote: >>> On Sat, 2019-10-12 at 09:26 +0800, zhengbin wrote: BTW: we can't just init sshdr->response_code, sr_do_ioctl use sshdr->sense_key >>> Th

Re: [PATCH v2] scsi: core: fix uninit-value access of variable sshdr

2019-10-11 Thread James Bottomley
On Sat, 2019-10-12 at 10:03 +0800, zhengbin (A) wrote: > On 2019/10/12 9:58, James Bottomley wrote: > > On Sat, 2019-10-12 at 09:26 +0800, zhengbin wrote: > > > BTW: we can't just init sshdr->response_code, sr_do_ioctl use > > > sshdr->sense_key > > > > That's an actual bug, isn't it? > > If we i

Re: [PATCH v2] scsi: core: fix uninit-value access of variable sshdr

2019-10-11 Thread zhengbin (A)
On 2019/10/12 9:58, James Bottomley wrote: > On Sat, 2019-10-12 at 09:26 +0800, zhengbin wrote: >> BTW: we can't just init sshdr->response_code, sr_do_ioctl use >> sshdr->sense_key > That's an actual bug, isn't it? If we init sshdr in __scsi_execute, this will be ok > > James > > > . >

Re: [PATCH v2] scsi: core: fix uninit-value access of variable sshdr

2019-10-11 Thread James Bottomley
On Sat, 2019-10-12 at 09:26 +0800, zhengbin wrote: > BTW: we can't just init sshdr->response_code, sr_do_ioctl use > sshdr->sense_key That's an actual bug, isn't it? James

[PATCH v2] scsi: core: fix uninit-value access of variable sshdr

2019-10-11 Thread zhengbin
kmsan report a warning in 5.1-rc4: BUG: KMSAN: uninit-value in sr_get_events drivers/scsi/sr.c:207 [inline] BUG: KMSAN: uninit-value in sr_check_events+0x2cf/0x1090 drivers/scsi/sr.c:243 CPU: 1 PID: 13858 Comm: syz-executor.0 Tainted: GB 5.1.0-rc4+ #8 Hardware name: QEMU Standard P

Re: [PATCH] scsi: core: fix uninit-value access of variable sshdr

2019-10-11 Thread Bart Van Assche
On 10/10/19 5:05 AM, zhengbin wrote: + /* +* need to initial sshdr to avoid uninit-value access +*/ + if (sshdr) + memset(sshdr, 0, sizeof(struct scsi_sense_hdr)); + I think the above comment is slightly confusing because it is correct for some callers

Re: [PATCH] scsi: core: fix uninit-value access of variable sshdr

2019-10-11 Thread Bart Van Assche
On 10/10/19 8:07 PM, zhengbin (A) wrote: Besides, scsi_sense_hdr is just 8 bytes, memset it to 0 will not affect performance That's true ... Bart.

good day

2019-10-11 Thread Ofuonye Estha
Attention dear email owner welcome to MoneyGram International Inc. we are contacting you regarding your winning fund $550,000.00 USD, your e-mail won $550,000.00 dollars through Internet contest, lottery bonus under the MoneyGram International Inc. Worldwide. The lottery bonus was contesting onc