Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp866490rdb; Sat, 7 Oct 2023 02:21:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFYMfNBdQhZdGlqPENDXc50PgfnBqhTWYQJaGLig16XlSzhnPX4lm6sozUEmYjZoQkZdJ5d X-Received: by 2002:a05:6358:2484:b0:141:8c:75ad with SMTP id m4-20020a056358248400b00141008c75admr13244933rwc.28.1696670512650; Sat, 07 Oct 2023 02:21:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696670512; cv=none; d=google.com; s=arc-20160816; b=06kKAvgBFBomMYb4XrhNboGot0OBVqKkqPz0792l0nCAkLnGIlvy7KjJIW/UweTPBu ditaQr1nat62Hp4g4/ggzfTNbLGVk4FqD0MNSWyftvm3eHzl1HBxpnXIj0HNiSkGbv1P iWC8Ddkt+bkAusJi/9Db9X3VldLhPA7rvU0yOL53X6/PmDnQOyHCIY2oqNxSpg6APlzF j1e6uFqgxrfC8K/hLml8Fyr7YT/yVitsWCsImX865V965ZUnPDtqv47d2Ad0Y1uPIfNQ 7fHx0cKjkA3lhiDw5Yz7SgbrFQDitOuNiw4WoZugdIIvUKs1HT6fegS/LsyJaGbPQXcx 7C0g== 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; bh=knBTgoZoduJcX7InuKcpPpfJkPmx/iCOlX8AIHE6Lxc=; fh=YgFRDKwqb7stgVt1txR+xSQ2YSNhWuSNEEGWiuBRb6s=; b=LkvzGWjYFc/uokJPSKzDU3J2NLB5XzExg5h9F8t09uY+a5VoY+gK0qnaqTTuzWdQ+2 eY61R9PYbT+uEHnhf8cSBOt6M6azfMXaOzWf3+CNNowyILreYJ89Kn/2pdz0LiBN7FRh zbmWRaJq126+W1d+/JwTMClitBLwAwhVMSOVgjETsvsynLDMo0K7yvyi8v6joewO3QDH Eh58SexAbnFh5kDOf0Xa5ZNaBsEz0+WVTyK1v+TngzYs2NS21WBh/p2QqT9/NdirQclf cs2kyWfMBy+y66doiYFfi+xq8SkG62TsoAhiC5SMKjshB9E0TxQUkeZB9jwv77D+oQzx jB7Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id mh4-20020a17090b4ac400b00277630078f9si2764356pjb.12.2023.10.07.02.21.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Oct 2023 02:21:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 5581D804C216; Sat, 7 Oct 2023 02:21:50 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343706AbjJGJVf (ORCPT + 99 others); Sat, 7 Oct 2023 05:21:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229757AbjJGJVe (ORCPT ); Sat, 7 Oct 2023 05:21:34 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1087B9; Sat, 7 Oct 2023 02:21:31 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31520C433C8; Sat, 7 Oct 2023 09:21:27 +0000 (UTC) Message-ID: Date: Sat, 7 Oct 2023 11:21:26 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] media: v4l2-event: Annotate struct v4l2_subscribed_event with __counted_by Content-Language: en-US, nl To: Kees Cook , Mauro Carvalho Chehab Cc: lijian , linux-media@vger.kernel.org, Nathan Chancellor , Nick Desaulniers , Tom Rix , linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-hardening@vger.kernel.org References: <20230922174951.work.160-kees@kernel.org> <169662411867.2154917.2192633783167073007.b4-ty@chromium.org> From: Hans Verkuil In-Reply-To: <169662411867.2154917.2192633783167073007.b4-ty@chromium.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.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 (fry.vger.email [0.0.0.0]); Sat, 07 Oct 2023 02:21:50 -0700 (PDT) X-Spam-Level: ** On 06/10/2023 22:28, Kees Cook wrote: > On Fri, 22 Sep 2023 10:49:52 -0700, Kees Cook wrote: >> Prepare for the coming implementation by GCC and Clang of the __counted_by >> attribute. Flexible array members annotated with __counted_by can have >> their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS >> (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family >> functions). >> >> As found with Coccinelle[1], add __counted_by for struct v4l2_subscribed_event. >> Additionally, since the element count member must be set before accessing >> the annotated flexible array member, move its initialization earlier. >> >> [...] > > Since this is a trivial change and it's been 2 week without further > discussion, I'll snag this patch. Ah, I picked this up for media as well. Same for the other patch. You should have gotten an email from patchwork on Oct 3 that it was accepted. I think I should be more pro-active and reply when I pick up patches from non-media developers instead of relying on patchwork. It seems that it is easy to miss emails from patchwork. Regards, Hans > > Applied to for-next/hardening, thanks! > > [1/1] media: v4l2-event: Annotate struct v4l2_subscribed_event with __counted_by > https://git.kernel.org/kees/c/b1a20bbd4687 > > Take care, >