From: Keith Busch <kbusch@kernel.org>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
Chaitanya Kulkarni <kch@nvidia.com>,
Arnd Bergmann <arnd@arndb.de>,
linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] nvme: trace: avoid memcpy overflow warning
Date: Fri, 5 Jan 2024 13:25:12 -0700 [thread overview]
Message-ID: <ZZhlqHLfB3o1Pzuc@kbusch-mbp> (raw)
In-Reply-To: <20240103155702.4045835-2-arnd@kernel.org>
On Wed, Jan 03, 2024 at 04:56:56PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> A previous patch introduced a struct_group() in nvme_common_command to help
> stringop fortification figure out the length of the fields, but one function
> is not currently using them:
>
> In file included from drivers/nvme/target/core.c:7:
> In file included from include/linux/string.h:254:
> include/linux/fortify-string.h:592:4: error: call to '__read_overflow2_field' declared with 'warning' attribute: detected read beyond size of field (2nd parameter); maybe use struct_group()? [-Werror,-Wattribute-warning]
> __read_overflow2_field(q_size_field, size);
> ^
>
> Change this one to use the correct field name to avoid the warning.
>
> Fixes: 5c629dc9609dc ("nvme: use struct group for generic command dwords")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Thanks, applied to nvme-6.8 with Christoph's line-wrap suggestion.
next prev parent reply other threads:[~2024-01-05 20:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-03 15:56 [PATCH 1/2] nvmet: re-fix tracing strncpy() warning Arnd Bergmann
2024-01-03 15:56 ` [PATCH 2/2] nvme: trace: avoid memcpy overflow warning Arnd Bergmann
2024-01-05 4:31 ` Christoph Hellwig
2024-01-05 20:25 ` Keith Busch [this message]
2024-01-05 20:24 ` [PATCH 1/2] nvmet: re-fix tracing strncpy() warning Keith Busch
2024-01-05 20:36 ` Arnd Bergmann
2024-01-05 20:57 ` Keith Busch
2024-01-05 21:40 ` Arnd Bergmann
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=ZZhlqHLfB3o1Pzuc@kbusch-mbp \
--to=kbusch@kernel.org \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=hch@lst.de \
--cc=kch@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/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