Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp805252rdb; Sun, 1 Oct 2023 06:22:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFWGoZhaL2k9TMZDXinq0IhsAOtZy+FFAVQ0jsFSTELBDrFHdupD0Mhc85HJicohqA8YmkG X-Received: by 2002:a17:902:db0c:b0:1c6:2dbb:e5fa with SMTP id m12-20020a170902db0c00b001c62dbbe5famr10282754plx.44.1696166558306; Sun, 01 Oct 2023 06:22:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696166558; cv=none; d=google.com; s=arc-20160816; b=Rw7ONOB/WW0lg1shIIgLaKF8QdkCCX/ZiDKBXVQugI15MM+1NVGFqGCw04eiEe+kNw K1i3x401eqFVmyFzymsqp9otuF2/7bZDb8y7CKlnedAMH549UtxcBCteytP8vbI/T9Do QbnSPtQcK224D6NCAA6eHQUzT9BmWWcrzH6y1B9d3X0UU1hYsddERui/aUS8Kz1yh17e 2jQIaxEPEQAWT1haK5yx70KSLHMd2S/XaptTEe2RPZoT/z9+3xHYkUqUZzsd1fpSwAmQ /f6NBqvqkfryDhGR65drR0vRlVqxkGWlAvzDrfPdavLlNUc3ew+2aFvuWAEmKej2hQ8U grdg== 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 :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=wPXWPuO+l7Bt1DCLNCWcyq73NlME+4QNpzuzBGS7eHY=; fh=Go46pecqfx/raa367B3GAoXyJ9WewQ1TLHQ0JUEBiqU=; b=jCkPoAk28WtZouylmjjsrpEq9SaFJxpP0kHnXTQCPDLn3MicnRm8EfEsw5HWzjk0l1 mNYA8dWF+gecAbU3+cDGOz/Darbqr4ZQZFXLexCJSgpLr4EjS9gBqae7q6b+bIoiRT8e jB7/oMSrU0n1HXZtltkXYeVP/ZMivjbRV+bL0ZTuwHj6YVK/LvLOSanh9WrXX56t0n9Q pKMxaz+WgzK2KHT33Pv4rcXfwzBD0M7xVjGozFDHtra4IefjaYXuUqz3LTGn25aUj+K4 d967ofwAclkTIszmhjRx6me79bQ4ST/cdBvRE3GfVZsjgbF6EblXGxKDHRg8blyIhjw6 e/ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=NPRXBdo5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id jy6-20020a17090342c600b001c589ba4a08si22638908plb.1.2023.10.01.06.22.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Oct 2023 06:22:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=NPRXBdo5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 28A8F802DA93; Sun, 1 Oct 2023 00:50:29 -0700 (PDT) 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 S234420AbjJAHu1 (ORCPT + 99 others); Sun, 1 Oct 2023 03:50:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234402AbjJAHu0 (ORCPT ); Sun, 1 Oct 2023 03:50:26 -0400 Received: from smtp.smtpout.orange.fr (smtp-30.smtpout.orange.fr [80.12.242.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FC14D8 for ; Sun, 1 Oct 2023 00:50:24 -0700 (PDT) Received: from [192.168.1.18] ([86.243.2.178]) by smtp.orange.fr with ESMTPA id mrDYq8ghSBIhHmrDYqqmz3; Sun, 01 Oct 2023 09:50:22 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1696146622; bh=wPXWPuO+l7Bt1DCLNCWcyq73NlME+4QNpzuzBGS7eHY=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=NPRXBdo5D1S5ArsR8ea32mKYx0qkxgU11wt5LG7vWRr2BegBhpi8xxisH80G6FwiP LSOi5vaTw4/sF1DpEE/Y7l8G12M/Pkg9cRV/4H7ix6DTvJTCRXJkNXVik3np+mLAF6 218e6UINweQw3G76HHzz0RtfmYaIWXALkUfDBuAeYxqIN61lOtTuDG3jyLY7oHCTJP 27CPGqN5iFQ81YORV70cbmXV+/ykyiRoydbeWLiKJRTNyrYnL8BwH5wOgLYVNI2LRH 7uQVoqOnwTMBqRFWlK9PNzi0qTP6VJ/NFkjIsCEFop4lAMLHAgH8YMqQrBIjYVED1Y 1ug+sKWxczs9A== X-ME-Helo: [192.168.1.18] X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 01 Oct 2023 09:50:22 +0200 X-ME-IP: 86.243.2.178 Message-ID: <7e234efd-413c-ef6b-857b-d364db21141e@wanadoo.fr> Date: Sun, 1 Oct 2023 09:50:20 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH] comedi: Annotate struct comedi_lrange with __counted_by To: Julia Lawall , Kees Cook Cc: Ian Abbott , H Hartley Sweeten , "Gustavo A. R. Silva" , Nathan Chancellor , Nick Desaulniers , Tom Rix , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-hardening@vger.kernel.org, llvm@lists.linux.dev References: <5c3b7459b820e22e2ac6ce892d4aadcc119cc919.1696065263.git.christophe.jaillet@wanadoo.fr> <202309301342.5B5BED40A1@keescook> Content-Language: fr, en-GB, en-US From: Christophe JAILLET In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_PASS autolearn=unavailable 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, 01 Oct 2023 00:50:29 -0700 (PDT) Le 01/10/2023 à 09:25, Julia Lawall a écrit : > > This is not found due to the regular expression used for the name of the > alloc function. Maybe you could drop it entirely? Maybe you could just > check for alloc somewhere in the string? That's how I found it. I simplified a lot Kees's script and looked for function names that did *not* match his regex. Functions that: - return a pointer to a struct - are used with struct_size() - store the value used to compite the size in another field of the struct are good enough candidates. I think that removing the regex all together would be just good enough. CJ > > identifier ALLOC =~ "alloc"; > > works in this case. > > Also, I see in the link that you have: > > // Options: --all-includes > > You can actually force this by putting > > #spatch --all-includes Nice, thanks for the tip. > > and any other options you want. > > julia > >