Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp1107508lqb; Wed, 29 May 2024 23:42:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU7PLgtMSBmHIoqWWM67qL8if4Ji2F29fe5gt77up4d2Kg2dd7rplZ62FaxtQ+CwJ7aQu8Lg9JHbP/W3aapKiCOrGso0xOf/18pV8c10Q== X-Google-Smtp-Source: AGHT+IHJWO32BF81i0KRgF8cPARGAhMCHIvlFspScG8m2SlCPyfjwwaukWYrg9tZJCf6P84suRKf X-Received: by 2002:a05:6358:9f84:b0:199:494b:9652 with SMTP id e5c5f4694b2df-199b0ae78cdmr94278655d.4.1717051343008; Wed, 29 May 2024 23:42:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717051342; cv=pass; d=google.com; s=arc-20160816; b=NWtXDlpxKzqGnIjGx+EoETe+v8HGWEVRq11fgeMTnwQm+7MllPMswSrxEz75ulPQd5 cf/xqlaU7+Z0nsJ960GU+uGFWGwSuPku00loWOGS9xb0lu2e/qrl5O4/0tTS5F3IBQVw sQ+xmWhYdg3w8CXBnhCjFps34uxMTOGUFHz4uTa0hHmkp8EqZsVs+pDcUS87khOCuw3A DIho670t/utzEP190qTpWO/oZ+M+wXeg2fvgLRgGuBv6oMvz8F2z6o5Gvng7dx0ydOQF bGwklleZukXAXlwSkgHXc6ndT/JsgzSArVYrOI9KobCvry2UalPyOdIGYlxCHoEVUke3 SJsg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id; bh=P2UinUncKMG3mfEDsS3Xt/JMMJoyLDA5LlKHUtD/VBs=; fh=MPME8SRVD19hmVVS4Bmhmujen2gGlIbBPuoIJQsXhno=; b=eN7gWcg2Yuoj+wmtrym9aVNQi3ob4vHucVirNyhrD0/5Ma0zpBwuvU02GA9n0GY9CO cSoX8FtdAGwnIvmcI2Ig1ZumEWn9yDQbrjJdUimCe4HKt2SgUSa7b5b60U/xu/PQQzNW vvfbsZJeIHyVRSGoI5Zy2BkWEM7vM82MpvTP/ooR81ldmaWj5fw+Ti0lFEenY5wUHTIv tmjnVIIrpvQ5md2s4Vsof3gvW+ESiodlicnY5duZB/lvAbYAU9SXemhZUzm3xoBYcHU0 OrUvC5up8Re8JRWgUkvjJEXuuCg1n5nVAUhvFK1VOVePgrAXpWIgAin2LOOIAwwtPMeE 2m9Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-194988-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194988-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-6be2c1a44e6si1540817a12.901.2024.05.29.23.42.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 23:42:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-194988-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-194988-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194988-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 50E66B22B8A for ; Thu, 30 May 2024 06:41:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 05CC53DABF3; Thu, 30 May 2024 06:41:24 +0000 (UTC) Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 085DB7F; Thu, 30 May 2024 06:41:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717051283; cv=none; b=CDXxF3kTAooLtbazO02DfLditp31NKTjGQFv7i+/wHrST+MK3aE6Lc6QABAJplxaXou/uzTdXUI6kuylEd9j4tDBwWcNa6ynHSqxzT0YPjlatZSjxQfkmV+BhzKnw+dNybpJkqCw9/IspS6ddSIt3K4EBXH6HTjbrU21LBrEV8U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717051283; c=relaxed/simple; bh=D4gXSqADnOk0iOGCbNIKB51H95GuHOPiUKdJBP+R1PI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=CFza2RUzLhjj7fUg1RRIC3FDcXBSrTS1uyLKuLFgOvABLt7lZQe/5T1sJQWPcQMcsI2W0ytuJjJTiM52mv/LX3T2Zcf7OUgi0Agauna+6dHkdFnnAWxY6ay+ePgwWPiiiDZLS2SgFvTjzQ/yJoFPs5Jeh29aaZox0751ttZOU1A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.128.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-4211e42e362so6549545e9.1; Wed, 29 May 2024 23:41:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717051280; x=1717656080; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=P2UinUncKMG3mfEDsS3Xt/JMMJoyLDA5LlKHUtD/VBs=; b=YA7c2LHMokdc84/oROLTIsuEPfJpyxYrdnFxG0AC23+k+Bek8mUqFsPy8sWM8vFRSc 4TXSec9ECL0yJjdK42cuBRvx2oIBXgYQh3FS/Ta85wtiGDl9mcAPWwCer6lHZ1KBsgxH wUUTkDk/oMcPVp0PjaT5UHpsLkmIT8mmgqQMd/q7YL9phJ1eZ9twVSxLRPW4WfwYnc/1 ck63T0X+1P8v6WM6WN8orA9e8/GBaZkcZwn3YuNjZ/WTNqmiTrwYhx5qupGwO8YXYqI/ 1DbwjH/Zzu8emjcRRabCxcV6Vw7kBjm1VHTOsdeCxL9SmU3i85TTFLRe6ztacmudBKPN IyGw== X-Forwarded-Encrypted: i=1; AJvYcCV+eZ8cCU7RGA89Kwz/PajPWHOlz/CzbNq1qaoSO24QMvruWvzL3gvAGgLkpCfYMbfTRzu8wlcb431bSpiv/vpSc+GN5Ekl6s8P6C0Ovnb0Ecy4oWGxAYIZumNlF9nGWOIo7CXvnIvO8qDJOvOeNIPNRP+tSSOCx5Ycn34AIq/2gmb3Npn7 X-Gm-Message-State: AOJu0Yw+gfy7JqK4Hl3UTM1C4KaGXDFheYIYD5FrhuloPPnUU8pnpfMn s7GPvkfVWEPJGszmAMA2k0LQN7I0LvYdfbKttorYourBLAloqCv4 X-Received: by 2002:a05:600c:1d05:b0:421:29b4:532a with SMTP id 5b1f17b1804b1-42129b45590mr1343955e9.16.1717051280198; Wed, 29 May 2024 23:41:20 -0700 (PDT) Received: from ?IPV6:2a0b:e7c0:0:107::aaaa:69? ([2a0b:e7c0:0:107::aaaa:69]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3557a1c9546sm16439884f8f.82.2024.05.29.23.41.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 May 2024 23:41:19 -0700 (PDT) Message-ID: <0b2b4a2a-83df-4b79-a295-4da91c841587@kernel.org> Date: Thu, 30 May 2024 08:41:18 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] nvmet-fc: Remove __counted_by from nvmet_fc_tgt_queue.fod[] To: Nathan Chancellor , James Smart , Christoph Hellwig , Sagi Grimberg , Chaitanya Kulkarni Cc: Kees Cook , "Gustavo A. R. Silva" , Bill Wendling , Justin Stitt , Keith Busch , 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 References: <20240529-drop-counted-by-fod-nvmet-fc-tgt-queue-v1-1-286adbc25943@kernel.org> Content-Language: en-US From: Jiri Slaby Autocrypt: addr=jirislaby@kernel.org; keydata= xsFNBE6S54YBEACzzjLwDUbU5elY4GTg/NdotjA0jyyJtYI86wdKraekbNE0bC4zV+ryvH4j rrcDwGs6tFVrAHvdHeIdI07s1iIx5R/ndcHwt4fvI8CL5PzPmn5J+h0WERR5rFprRh6axhOk rSD5CwQl19fm4AJCS6A9GJtOoiLpWn2/IbogPc71jQVrupZYYx51rAaHZ0D2KYK/uhfc6neJ i0WqPlbtIlIrpvWxckucNu6ZwXjFY0f3qIRg3Vqh5QxPkojGsq9tXVFVLEkSVz6FoqCHrUTx w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FNeTkTKtJ0P8jYd7P1gZb9Fwj9YLx jhn/sVIhNmEBLBoI7PL+9fbILqJPHgAwW35rpnq4f/EYTykbk1sa13Tav6btJ+4QOgbcezWI wZ5w/JVfEJW9JXp3BFAVzRQ5nVrrLDAJZ8Y5ioWcm99JtSIIxXxt9FJaGc1Bgsi5K/+dyTKL wLMJgiBzbVx8G+fCJJ9YtlNOPWhbKPlrQ8+AY52Aagi9WNhe6XfJdh5g6ptiOILm330mkR4g W6nEgZVyIyTq3ekOuruftWL99qpP5zi+eNrMmLRQx9iecDNgFr342R9bTDlb1TLuRb+/tJ98 f/bIWIr0cqQmqQ33FgRhrG1+Xml6UXyJ2jExmlO8JljuOGeXYh6ZkIEyzqzffzBLXZCujlYQ DFXpyMNVJ2ZwPmX2mWEoYuaBU0JN7wM+/zWgOf2zRwhEuD3A2cO2PxoiIfyUEfB9SSmffaK/ S4xXoB6wvGENZ85Hg37C7WDNdaAt6Xh2uQIly5grkgvWppkNy4ZHxE+jeNsU7tg= In-Reply-To: <20240529-drop-counted-by-fod-nvmet-fc-tgt-queue-v1-1-286adbc25943@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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