From: Jiri Slaby <jirislaby@kernel.org>
To: Nathan Chancellor <nathan@kernel.org>,
James Smart <james.smart@broadcom.com>,
Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
Chaitanya Kulkarni <kch@nvidia.com>
Cc: Kees Cook <keescook@chromium.org>,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>,
Keith Busch <kbusch@kernel.org>,
linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-hardening@vger.kernel.org, llvm@lists.linux.dev,
patches@lists.linux.dev, stable@vger.kernel.org
Subject: Re: [PATCH] nvmet-fc: Remove __counted_by from nvmet_fc_tgt_queue.fod[]
Date: Thu, 30 May 2024 08:41:18 +0200 [thread overview]
Message-ID: <0b2b4a2a-83df-4b79-a295-4da91c841587@kernel.org> (raw)
In-Reply-To: <20240529-drop-counted-by-fod-nvmet-fc-tgt-queue-v1-1-286adbc25943@kernel.org>
On 29. 05. 24, 23:42, Nathan Chancellor wrote:
> drivers/nvme/target/fc.c:151:2: error: 'counted_by' should not be applied to an array with element of unknown size because 'struct nvmet_fc_fcp_iod' is a struct type with a flexible array member.
The same as for mxser_port:
struct nvmet_fc_fcp_iod {
struct nvmefc_tgt_fcp_req *fcpreq;
struct nvme_fc_cmd_iu cmdiubuf;
struct nvme_fc_ersp_iu rspiubuf;
dma_addr_t rspdma;
struct scatterlist *next_sg;
struct scatterlist *data_sg;
int data_sg_cnt;
u32 offset;
enum nvmet_fcp_datadir io_dir;
bool active;
bool abort;
bool aborted;
bool writedataactive;
spinlock_t flock;
struct nvmet_req req;
struct work_struct defer_work;
struct nvmet_fc_tgtport *tgtport;
struct nvmet_fc_tgt_queue *queue;
struct list_head fcp_list; /*
tgtport->fcp_list */
};
The error appears to be invalid.
> This will be an error in a future compiler version [-Werror,-Wbounds-safety-counted-by-elt-type-unknown-size]
> 151 | struct nvmet_fc_fcp_iod fod[] __counted_by(sqsize);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 1 error generated.
--
--
js
suse labs
next prev parent reply other threads:[~2024-05-30 6:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-29 21:42 [PATCH] nvmet-fc: Remove __counted_by from nvmet_fc_tgt_queue.fod[] Nathan Chancellor
2024-05-30 6:41 ` Jiri Slaby [this message]
2024-05-30 17:23 ` Nathan Chancellor
2024-06-26 17:06 ` Nathan Chancellor
2024-06-26 17:19 ` Keith Busch
2024-06-26 17:23 ` Nathan Chancellor
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=0b2b4a2a-83df-4b79-a295-4da91c841587@kernel.org \
--to=jirislaby@kernel.org \
--cc=gustavoars@kernel.org \
--cc=hch@lst.de \
--cc=james.smart@broadcom.com \
--cc=justinstitt@google.com \
--cc=kbusch@kernel.org \
--cc=kch@nvidia.com \
--cc=keescook@chromium.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=llvm@lists.linux.dev \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=patches@lists.linux.dev \
--cc=sagi@grimberg.me \
--cc=stable@vger.kernel.org \
/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