Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1011428rdb; Sun, 1 Oct 2023 16:00:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFaivmDipd0Y09g9Ugyu47NL17onKdg8OYaU9J+Fjd9ZqWuPY0SGULyXXe8diikReSpbOL4 X-Received: by 2002:a05:6e02:1c84:b0:34f:d135:bc8 with SMTP id w4-20020a056e021c8400b0034fd1350bc8mr12470537ill.7.1696201216104; Sun, 01 Oct 2023 16:00:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696201216; cv=none; d=google.com; s=arc-20160816; b=Dt4iZImCqQ56CV7JISPxPDmKmq8ENo4SFWvX6Ac9FD7+kW9YtAXBjuCRjHZ/wPznNQ eu4gLvQbqBCUMMBopiPkITCY5OL5evKPbq8gZ2Ax8LsfBwWjt1n6lVYnilD3TFB2W6Nf AivPd6+3q+K8z9RB2RoffSZLnVvbtcOPWAU4pEKRkFbYGbeGdtphW2ptK3Vfj2sr0lyY RQKGHy8wYFnI7GLOLzOUy4LOOaHbr0dgUL0K2N/MXiBMTonSgpDyuX5yIn3yWfebqKGU YQMzE7b4m3G99K2igftWSX1I4KhI/dsHzlNOJ8Guf0+H3BvUsGLlNSaax/XM1zpeSvzi hPig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=PHJrlgm7LFwgtNAlZtL3Zhw4zS1ia4QUcX3TsUNW/zY=; fh=vzI13+Le9X4g6qIpJSxvbVRKWcrur6qfGmlImdnjChE=; b=gGi/wuNXID0bZWbGC5X9VTVPUB7UjQTPqbJu3DaZ1kVJyKXVgeolt48gK5LJLnQv2A /yR3zf62zeKKmCOoZys07C5KDm4wb2tRPTWeRMtdFAZ2UK//0IYv8799Dgmf4UY9YIvN 0N8iE9hejNlDEJRVKYwd5d3i7p4eEyJ+gjbSE36d5JO+aKhqAb2B4LL04OlfS/yaiZ64 oLabKg32T5xEUQ+miGHRkQHJNJ2DRkXnwN98QDQhGQAx7okOBor8r2WAXH8ZG3mMyr+X 1K0HQAisrrwIg2y4h5IxWskDOLjg3fBkthMErHlFzx5YxkaMq8GA0RY56aEvf8bTh9cl aRAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=K8ahlFg2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id p24-20020a17090ad31800b0027748734bb9si6216448pju.148.2023.10.01.16.00.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Oct 2023 16:00:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=K8ahlFg2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 003F18035AE0; Sun, 1 Oct 2023 14:22:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235396AbjJAVW1 (ORCPT + 99 others); Sun, 1 Oct 2023 17:22:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235161AbjJAVWZ (ORCPT ); Sun, 1 Oct 2023 17:22:25 -0400 Received: from mail-oo1-xc35.google.com (mail-oo1-xc35.google.com [IPv6:2607:f8b0:4864:20::c35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84B219B for ; Sun, 1 Oct 2023 14:22:23 -0700 (PDT) Received: by mail-oo1-xc35.google.com with SMTP id 006d021491bc7-57be7c28423so5077166eaf.0 for ; Sun, 01 Oct 2023 14:22:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1696195343; x=1696800143; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=PHJrlgm7LFwgtNAlZtL3Zhw4zS1ia4QUcX3TsUNW/zY=; b=K8ahlFg2t0R6P640XZbVxn1n2eDcpclSPylMTjfPl2JXWodDr6kLrmiNBWzklmDxfH Aw2tK9NBINlcbwYXlmiUEecoy2Zwz4jDigiPKrVjpnE7TY7Rvf5x+y+PkzQQHURorboz xCH+3AnjYHGTOI1euqmlPVViIwmcqqhQwYQ1Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696195343; x=1696800143; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=PHJrlgm7LFwgtNAlZtL3Zhw4zS1ia4QUcX3TsUNW/zY=; b=fgHiS2n2b5TFT4zH89/fzQN+Y9KrDH8mqKT382LTlVJBaUC9oUlpce4nYYxTR3pVWY FKFgR382wZBe5mIUOZlhURFclVWlsnPajOC8fgYHwgLQohPxkkkszQK8GfZ7OwYxSQDZ SEa9W0JBdv54E2II10mpeCGPQ6W4lMphooMeAx0Lt+6bjAMXxqClk5Chl8IImWIT7zEk HoUbwPzSBhakOF129q3q3OTxTwCIkUmmeX0zujyc2x2xRPLgHen339Of3ajyTpcvcwZ+ Tw8FOC9H2XfA0j1o4lGkilefmwXnMXB0bR9WnpjukxkZwtjCNGzF0N7Ttbaeer5LvmVX sUwQ== X-Gm-Message-State: AOJu0Yzo7Rwd8OlraiwhsaP5majOcC63D7FWgyKbPzVcktrKnmutuOHc y14KPzKbPaTfjxVBb1bcTHWpnA== X-Received: by 2002:a05:6358:91c:b0:139:cb15:ecd3 with SMTP id r28-20020a056358091c00b00139cb15ecd3mr12488851rwi.8.1696195342750; Sun, 01 Oct 2023 14:22:22 -0700 (PDT) Received: from www.outflux.net (198-0-35-241-static.hfc.comcastbusiness.net. [198.0.35.241]) by smtp.gmail.com with ESMTPSA id y5-20020a62b505000000b0068ffb8da107sm18363405pfe.212.2023.10.01.14.22.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Oct 2023 14:22:22 -0700 (PDT) Date: Sun, 1 Oct 2023 14:22:17 -0700 From: Kees Cook To: Julia Lawall Cc: Kees Cook , Christophe JAILLET , 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 Subject: Re: [PATCH] comedi: Annotate struct comedi_lrange with __counted_by Message-ID: <202310011421.C4F19D45@keescook> References: <5c3b7459b820e22e2ac6ce892d4aadcc119cc919.1696065263.git.christophe.jaillet@wanadoo.fr> <202309301342.5B5BED40A1@keescook> <90E2BBA5-8A2D-42DE-B36A-CD37BABBB433@kernel.org> <202310011405.7599BA9@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202310011405.7599BA9@keescook> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email 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 (lipwig.vger.email [0.0.0.0]); Sun, 01 Oct 2023 14:22:35 -0700 (PDT) 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. :) -- Kees Cook