lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 9 Feb 2022 15:53:21 -0800 From: Tyrel Datwyler <tyreld@...ux.ibm.com> To: Kees Cook <keescook@...omium.org>, Michael Cyr <mikecyr@...ux.ibm.com> Cc: Stephen Rothwell <sfr@...b.auug.org.au>, "James E.J. Bottomley" <jejb@...ux.ibm.com>, "Martin K. Petersen" <martin.petersen@...cle.com>, linux-scsi@...r.kernel.org, target-devel@...r.kernel.org, linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org Subject: Re: [PATCH] scsi: ibmvscsis: Silence -Warray-bounds warning On 2/7/22 10:12 PM, Kees Cook wrote: > Instead of doing a cast to storage that is too small, add a union for > the high 64 bits. Silences the warnings under -Warray-bounds: > > drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c: In function 'ibmvscsis_send_messages': > drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c:1934:44: error: array subscript 'struct viosrp_crq[0]' is partly outside array bounds of 'u64[1]' {aka 'long long unsigned int[1]'} [-Werror=array-bounds] > 1934 | crq->valid = VALID_CMD_RESP_EL; > | ^~ > drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c:1875:13: note: while referencing 'msg_hi' > 1875 | u64 msg_hi = 0; > | ^~~~~~ > > There is no change to the resulting binary instructions. > > Reported-by: Stephen Rothwell <sfr@...b.auug.org.au> > Link: https://lore.kernel.org/lkml/20220125142430.75c3160e@canb.auug.org.au > Cc: Michael Cyr <mikecyr@...ux.ibm.com> > Cc: "James E.J. Bottomley" <jejb@...ux.ibm.com> > Cc: "Martin K. Petersen" <martin.petersen@...cle.com> > Cc: Tyrel Datwyler <tyreld@...ux.ibm.com> > Cc: linux-scsi@...r.kernel.org > Cc: target-devel@...r.kernel.org > Signed-off-by: Kees Cook <keescook@...omium.org> > --- > drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 9 +++------ Reviewed-by: Tyrel Datwyler <tyreld@...ux.ibm.com>
Powered by blists - more mailing lists