Home
last modified time | relevance | path

Searched hist:"03 e4383c7ce36ac400489c8fe84724470a8251e9" (Results 1 – 2 of 2) sorted by relevance

/linux/include/scsi/
H A Dviosrp.hdiff 03e4383c7ce36ac400489c8fe84724470a8251e9 Tue Feb 08 07:12:31 CET 2022 Kees Cook <keescook@chromium.org> scsi: ibmvscsis: Silence -Warray-bounds warning

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.

Link: https://lore.kernel.org/lkml/20220125142430.75c3160e@canb.auug.org.au
Link: https://lore.kernel.org/r/20220208061231.3429486-1-keescook@chromium.org
Cc: Michael Cyr <mikecyr@linux.ibm.com>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Tyrel Datwyler <tyreld@linux.ibm.com>
Cc: linux-scsi@vger.kernel.org
Cc: target-devel@vger.kernel.org
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reviewed-by: Tyrel Datwyler <tyreld@linux.ibm.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
/linux/drivers/scsi/ibmvscsi_tgt/
H A Dibmvscsi_tgt.cdiff 03e4383c7ce36ac400489c8fe84724470a8251e9 Tue Feb 08 07:12:31 CET 2022 Kees Cook <keescook@chromium.org> scsi: ibmvscsis: Silence -Warray-bounds warning

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.

Link: https://lore.kernel.org/lkml/20220125142430.75c3160e@canb.auug.org.au
Link: https://lore.kernel.org/r/20220208061231.3429486-1-keescook@chromium.org
Cc: Michael Cyr <mikecyr@linux.ibm.com>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Tyrel Datwyler <tyreld@linux.ibm.com>
Cc: linux-scsi@vger.kernel.org
Cc: target-devel@vger.kernel.org
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reviewed-by: Tyrel Datwyler <tyreld@linux.ibm.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>