Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1355583rdb; Wed, 20 Sep 2023 07:05:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFW+HT1zhK781D+cXlGiiC2BP/HMZPinGGg0voa1x7r2F5DBZ6PnYwbLbH3uSXwR/fUfH9W X-Received: by 2002:a05:6a00:39a9:b0:690:bf57:7c22 with SMTP id fi41-20020a056a0039a900b00690bf577c22mr2712672pfb.24.1695218751168; Wed, 20 Sep 2023 07:05:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695218751; cv=none; d=google.com; s=arc-20160816; b=m97lTnKjevLb4rXbJcjoGQcTEcRKlJiUzpyTErN5Bb++0Iv1qEPTVNu4Tw+DAx6Ml7 B0+J8kpxqPZ+TOp3OUSgm8dv/8tP+80PAIUBzAlTEdL9WsTFcC+d65AKzlspRgtHOyDe KhaKWsMHKy6SItViPbwucvDfm5obaJNWTuBSEi9Du//Wl81wrRNUUwmLVCrn4vjjkuiW H1hKreQ5N9nyDZzutFPZIuP3ZARcMNta9EdV2XfWEhCD5aTC6ZzVcPya3HilzJ5UdD4F iA5ZVpN6naU45ESOqqbSOKUB3luNtwW9aT63m3lwPqKCh2bOuxODyLDVQNjq3AKr5Rzr SfQw== 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=/F+EvXy/jfn0bD++OL6jT5lV4OBJOAv0uv1Ij3xsfKk=; fh=5U7KOGgjNc1SMMpK5EMwwma9gywqfpnWN6qjXECS8k0=; b=0rsjIcfoKJGpEtHhPEZuekGC6CzPAj0kHFaK+RP4vJ+248ysHD5rVPCq2bg5SAz1pY VztHN9pBtxtaPWceRQQgIZmdrRSs8CBbt46GAMEbOEM3vG499NdxPL1e1iCKNSnlvOhg aQdWce8qTsO9qlNXZf7wQdkBKrmPsKZd9aSRGws2yHAcUDLfrzi4oWH+VwWAvzgbgbTD +SF4DaO1lO6bNctUK++KB7YXgepDCq3fhO0uNuQYKodvXIO6r5Coarg7f7pL1AZcM1H6 Sr82/BuWcvZtA0bvVUJIu7IDQKLVf2iYfbFJ/+3jzy69Co4DGVRpVSAlAiFXQcjYz/o1 /DwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hg6DG5H3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id bw16-20020a056a00409000b0068fcae723easi11855628pfb.368.2023.09.20.07.05.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 07:05:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hg6DG5H3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id 6F7E5806316A; Wed, 20 Sep 2023 06:50:52 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234565AbjITNu2 (ORCPT + 99 others); Wed, 20 Sep 2023 09:50:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236398AbjITNu0 (ORCPT ); Wed, 20 Sep 2023 09:50:26 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53A0FD8; Wed, 20 Sep 2023 06:50:21 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA712C433C8; Wed, 20 Sep 2023 13:50:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695217820; bh=F0w62KOri4+nv8ORRuidRDPCFETZBxnGyBhVgs19590=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=hg6DG5H3voBk4yi1xt3gVxtpWKQwL7f+Xg1hqn+I02tKlteuaHdIGKPKgtDakRgHe fmTD4cXn9KSlneOaoR3WQeicN/z5g2sgz/GofMHLn2z2F/Kyq9qU759Hg/vdrQ9k9+ 5GAsapzYRZKp+opUKaAuXToOADpp6z9wcbbM6BxUWb94RZPxGvjtMtqV6fgzlNvDaP U3v9zQOXnETzESzXbZFX9czV0eXkXknpCFGA7j2WDmd664c/xI9KbMJvScvEvEr1MC 1GqH1UznXTFpO8/Moj4m1AZEMXxI5OA0W+bL79vIF5i6YBaTfWh6tz7tsdp83WBSe1 j9QypSGog46Kw== From: Lee Jones To: Pavel Machek , Kees Cook Cc: Lee Jones , Matthias Brugger , AngeloGioacchino Del Regno , Gene Chen , Jacek Anaszewski , Andy Shevchenko , 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: <20230915201020.never.433-kees@kernel.org> References: <20230915201020.never.433-kees@kernel.org> Subject: Re: (subset) [PATCH] leds: mt6360: Annotate struct mt6360_priv with __counted_by Message-Id: <169521781759.3448785.6991953068239903845.b4-ty@kernel.org> Date: Wed, 20 Sep 2023 14:50:17 +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 agentk.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 (agentk.vger.email [0.0.0.0]); Wed, 20 Sep 2023 06:50:52 -0700 (PDT) On Fri, 15 Sep 2023 13:10:20 -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 mt6360_priv. > > [...] Applied, thanks! [1/1] leds: mt6360: Annotate struct mt6360_priv with __counted_by commit: cecdfff8f5c82816d8b9ef2f4b3d7f4943dfd360 -- Lee Jones [李琼斯]