[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230901133852.5990-A-hca@linux.ibm.com>
Date: Fri, 1 Sep 2023 15:38:52 +0200
From: Heiko Carstens <hca@...ux.ibm.com>
To: Jens Axboe <axboe@...nel.dk>
Cc: Stefan Haberland <sth@...ux.ibm.com>,
Jan Höppner <hoeppner@...ux.ibm.com>,
Peter Oberparleiter <oberpar@...ux.ibm.com>,
linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-block@...r.kernel.org
Subject: Re: [PATCH 1/1] s390/dasd: fix string length handling
Hi Jens,
On Mon, Aug 28, 2023 at 05:31:42PM +0200, Heiko Carstens wrote:
> Building dasd_eckd.o with latest clang reveals this bug:
>
> CC drivers/s390/block/dasd_eckd.o
> drivers/s390/block/dasd_eckd.c:1082:3: warning: 'snprintf' will always be truncated;
> specified size is 1, but format string expands to at least 11 [-Wfortify-source]
> 1082 | snprintf(print_uid, sizeof(*print_uid),
> | ^
> drivers/s390/block/dasd_eckd.c:1087:3: warning: 'snprintf' will always be truncated;
> specified size is 1, but format string expands to at least 10 [-Wfortify-source]
> 1087 | snprintf(print_uid, sizeof(*print_uid),
> | ^
>
> Fix this by moving and using the existing UID_STRLEN for the arrays
> that are being written to. Also rename UID_STRLEN to DASD_UID_STRLEN
> to clarify its scope.
>
> Fixes: 23596961b437 ("s390/dasd: split up dasd_eckd_read_conf")
> Reviewed-by: Peter Oberparleiter <oberpar@...ux.ibm.com>
> Signed-off-by: Heiko Carstens <hca@...ux.ibm.com>
> ---
> drivers/s390/block/dasd_devmap.c | 6 +-----
> drivers/s390/block/dasd_eckd.c | 10 +++++-----
> drivers/s390/block/dasd_int.h | 4 ++++
> 3 files changed, 10 insertions(+), 10 deletions(-)
Just wondering, will you pick this one up, or should I route this via
the s390 tree?
Powered by blists - more mailing lists