Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp1767026rdf; Sun, 5 Nov 2023 13:28:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IFUk4z+CC4ZOSMs0Ew0iL+2HrWENNwlHotfStJ9TJRSetqbu47MwNvQSjcVQXL7rrlvbMDX X-Received: by 2002:a05:6358:8a9:b0:168:e6df:4e7a with SMTP id m41-20020a05635808a900b00168e6df4e7amr37961295rwj.4.1699219684949; Sun, 05 Nov 2023 13:28:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699219684; cv=none; d=google.com; s=arc-20160816; b=xPiJftdmLYUN7fB+VTG02fHtpdfpJJzwevAAwa7sSW7OFpsbCtvF2GYKsWdh8L7oei NJg6IaHgRTfpju61rvNJmRcdvaPd9GSiWPWaJAcPa+VCmjqQHK2CEPHno0pQGg16u/2L 8HYPtSxh8nha5gbvDN0ox3Twtn73ZnqxDqXMYXwVkIXq28J2YD+Zhp7bwMRAAcr1Rgp/ JygV4Z/oCver0EcTpfsxAkMEQ2lCQ4EnqfUbvHN3xyI/NlX0VK8MDPKd7be5aTZEciaW xyftk6BvJpCXDg/Tv0+E0TF1Sydzextnhczeu6+4draHHExCKfsCH3jFKiVJw3kiSGC3 wazg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=ZBxI7c/ZChbSFF3scIbmQ8sKou5OuuJXp2+47TLI3rs=; fh=uKpJW0bZ4YZa7pdFcjOTteEdCYh15fmblQkk7X4fTW4=; b=FJg305gabWaIK/+WV6PlAC18kA+FGCISlKH8KROv+4mmIZCxutz6G+YF6T7Cn6fCTM F6QyAYS2lp0Pz8jIWSGymtTGv2oYR+zAUGxOK+4pjyv/GxsfPCD0Cj1dClULlIDW7ZGb dKYmwHch8O8q2lTcW+2yMP4XzJjDfGq0RjTEXSlJT8q9E2gw9FJDvAr/zDKEzpSUqyZi LfryO5WL82VVZ4mlXCAFNVIh7m4IayOM8jnxYR3U/O+BI/NoPGVle9IZBPtnslNnSsow pkgOfRhZecnOhcPV2gvHTneHRcaO0QLkxBs1qmTNWa3pRFXkyYyjyTxvTy0i15OQ9pxj Za3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=J6v+fcTe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id a18-20020a17090ad81200b0027d33155aefsi6519832pjv.99.2023.11.05.13.28.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 13:28:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=J6v+fcTe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id C0FCC80C5917; Sun, 5 Nov 2023 13:28:03 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229463AbjKEV2C (ORCPT + 99 others); Sun, 5 Nov 2023 16:28:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbjKEV2B (ORCPT ); Sun, 5 Nov 2023 16:28:01 -0500 Received: from smtp.smtpout.orange.fr (smtp-18.smtpout.orange.fr [80.12.242.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 773E6CC for ; Sun, 5 Nov 2023 13:27:58 -0800 (PST) Received: from [192.168.1.18] ([86.243.2.178]) by smtp.orange.fr with ESMTPA id zkesqAuzormQMzketqBHoe; Sun, 05 Nov 2023 22:27:55 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1699219676; bh=ZBxI7c/ZChbSFF3scIbmQ8sKou5OuuJXp2+47TLI3rs=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=J6v+fcTecyDpqZOwya2BFcaG7NTjcE8SMRq2En1aoYFEWFQTUxdmoR3OjwMQki+sj A3G+EzSeHG4AQ7HrknhbeQucLb9iLNWw0alr1vksWl6DOct0aWWbEKw7yJVBEaojpL 2ZQhq25gKfiXSGDQ7BIT8qUfFmKem/1dra+97rZuHqTLd9UWO1vd14hDgS/IxG/Jv4 sQUCtoTv4voh/tUQpSO/8vOOZlkCF7+MLX65eBagf3rtzUHlARjVXkbLY7UcUSADfu bTZZnb1FNbN2v171oUpB/lmpCi+RLOrGPLVqmvPJnwqRGWfZyThSkY23NVSFnZgOS3 CJ3aIqoLiErSg== X-ME-Helo: [192.168.1.18] X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 05 Nov 2023 22:27:56 +0100 X-ME-IP: 86.243.2.178 Message-ID: Date: Sun, 5 Nov 2023 22:27:50 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] comedi: Annotate struct comedi_lrange with __counted_by Content-Language: fr, en-US To: Kees Cook , Julia Lawall Cc: Kees Cook , "Gustavo A. R. Silva" , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-hardening@vger.kernel.org References: <5c3b7459b820e22e2ac6ce892d4aadcc119cc919.1696065263.git.christophe.jaillet@wanadoo.fr> <202309301342.5B5BED40A1@keescook> <90E2BBA5-8A2D-42DE-B36A-CD37BABBB433@kernel.org> <202310011405.7599BA9@keescook> <202310011421.C4F19D45@keescook> From: Christophe JAILLET In-Reply-To: <202310011421.C4F19D45@keescook> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 05 Nov 2023 13:28:03 -0800 (PST) Le 01/10/2023 à 23:22, Kees Cook a écrit : > On Sun, Oct 01, 2023 at 02:05:46PM -0700, Kees Cook wrote: >> On Sun, Oct 01, 2023 at 09:14:02PM +0200, Julia Lawall wrote: >>> Kees, >>> >>> You can try the following. >> >> Cool! Yeah, this finds the example: >> >> drivers/comedi/drivers/rti800.c:74: struct comedi_lrange: field at offset 0 is the counter for the flex array >> drivers/comedi/drivers/rti800.c:83: struct comedi_lrange: field at offset 0 is the counter for the flex array >> drivers/comedi/drivers/rti800.c:92: struct comedi_lrange: field at offset 0 is the counter for the flex array >> >> I'll run it on the whole codebase... > > It found only the struct comedi_lrange instances, but that's good to > know. :) > Hi, (removing most of people from the thread) I found another one. struct ocotp_devtype_data has a field 'num_entry' which is the number of entries in 'entry' flex array. [1]: https://elixir.bootlin.com/linux/v6.6/source/drivers/nvmem/imx-ocotp-ele.c#L28 [2]: https://elixir.bootlin.com/linux/v6.6/source/drivers/nvmem/imx-ocotp-ele.c#L143 CJ