Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1377814rdb; Wed, 20 Sep 2023 07:37:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFS3ukH11edxsojuVH8Oe3R4vl2Kv0jYV3CLFHE+huhjWZwvUIXWnmZdf5zLikRjmGlVioU X-Received: by 2002:a17:90b:fc8:b0:276:a310:2be3 with SMTP id gd8-20020a17090b0fc800b00276a3102be3mr2681399pjb.19.1695220631516; Wed, 20 Sep 2023 07:37:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695220631; cv=none; d=google.com; s=arc-20160816; b=o8V60ndwMf012seYL92T3t8JTndTjgcy5hVrwe0ZGMSEBgEoRm8h5bNB9MAWwo2gG8 gc8vkdKLjMDprkL9UCn3scXrvFGtJjU7nnuRy6QltkNJELprvGfCG6gPdPZdQ2KDDMqu ZWq351nJU+xAH7ovHCKsW8isIIg9UkVMNITEUMvnJBLeoEtgEZV9vdLenfAuueTKe1Mx 8n5hG5vdEdkqRLh66ngRMaRHbe/l0m/95h3eH7E35eV1dzG2Cu5atojvErBBUz/Z9J6G 6uoFik/hOzUE2gtdhU5PdjE6RQXAJemi4RACunb0WDeAzLv6SB3DLZ9T86fvyB0tW3bb OsrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version:date :message-id:subject:references:in-reply-to:cc:to:from:dkim-signature; bh=fWsa8Fh/7pxLDTS+dddOiQjrUIU85qgQCUhDdAXOmHs=; fh=MZJvUwUr6UwY+onXiAWjlauPaglaqYJlTBHymoCJIoY=; b=WOL5yZOwVYvxrqm9DJh0UVTU1iIn1kzG314khkem+2c68ZpqtsCTT4WovqrfyzaawA +qGeca72ziUDuY6yiOJFnaF9xJMbZhua3JI5HBcvVJl/6WABIhiWEXqeu9OqR9hvuS5B 7OWHCQCE3Rs8MpIXpilJcCnPXiLuQLyf1T3WbIo0x67VjvAH4R88kXnDWUWfhBw+k5QZ 3BzoJBwdmatcgUL4sAH4OMS+g4V4yG/NUI9hdDlIMv9dBEgJdiWmn/LA0ame1g6XAB6K cThx+VY6lOddHeSQ4Pxz+W1VpqvjBhktUgP3lUI49fvXfZi1mBLWp1InQYas0wooV/Kc vvbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WYgV42Q4; 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=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id u15-20020a17090a6a8f00b0026934bf746bsi1653565pjj.62.2023.09.20.07.37.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 07:37:11 -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=@kernel.org header.s=k20201202 header.b=WYgV42Q4; 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=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 47F0D808D6B0; Wed, 20 Sep 2023 06:51:01 -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 S236359AbjITNu7 (ORCPT + 99 others); Wed, 20 Sep 2023 09:50:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234960AbjITNu7 (ORCPT ); Wed, 20 Sep 2023 09:50:59 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5225CF; Wed, 20 Sep 2023 06:50:53 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2C9AAC433C7; Wed, 20 Sep 2023 13:50:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695217853; bh=ZYMgDvz7cLiEi48+fLoU5oYwxYC+RNXpuugTwerelA4=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=WYgV42Q41zYcX7fcsQWLwwrxbrrEfVse9h5Cv+phqauR1/HCAert4KodJzA2HkWy3 5wb0UyHx1o0VXHcCKUn0jNRzJu6mPirdPh0AkNjOfjEPMcqPrX6Ireg2yoYheIqCBy ldUg/NPOhKMcsQgNwz0zG0fd9GnxJnb/ulC14E2LjwHAL95gx65ZV8wVCMjDGBlPh9 vv+8yLllFz9LnvyNzDaIvrT/CHK8cT2GuvVL2I8zN5MzJy5HdZJRhRpgW/JDNIaD7C UUHRvK8FRsxpNZa6IRv3BFf2JudeMvzr4gO5/I7NJindbB8LJ388l971g3oLd9K6NG RG/djIE3eg1eA== From: Lee Jones To: Pavel Machek , Kees Cook Cc: Lee Jones , Matthias Brugger , AngeloGioacchino Del Regno , Alice Chen , Jacek Anaszewski , ChiYuan Huang , ChiaEn Wu , kernel test robot , linux-leds@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Nathan Chancellor , Nick Desaulniers , Tom Rix , linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-hardening@vger.kernel.org In-Reply-To: <20230915201051.never.429-kees@kernel.org> References: <20230915201051.never.429-kees@kernel.org> Subject: Re: (subset) [PATCH] leds: mt6370: Annotate struct mt6370_priv with __counted_by Message-Id: <169521784990.3449392.15396251707007241017.b4-ty@kernel.org> Date: Wed, 20 Sep 2023 14:50:49 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailer: b4 0.12.2 X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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]); Wed, 20 Sep 2023 06:51:01 -0700 (PDT) On Fri, 15 Sep 2023 13:10: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 mt6370_priv. > > [...] Applied, thanks! [1/1] leds: mt6370: Annotate struct mt6370_priv with __counted_by commit: 799107c1bb9049f9b3f28b5d651e336d09856019 -- Lee Jones [李琼斯]