Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1388564rdb; Wed, 20 Sep 2023 07:54:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFTWUfbZVM2+ql7+uk1fLKZMYSa3rluXv48hbCXt0M1EbKfrBVtgwGALe/pnY9U81QbScE7 X-Received: by 2002:a17:90a:69a3:b0:273:e4a7:ce72 with SMTP id s32-20020a17090a69a300b00273e4a7ce72mr2664624pjj.3.1695221679157; Wed, 20 Sep 2023 07:54:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695221679; cv=none; d=google.com; s=arc-20160816; b=lcl5HOxjQENlzGBs/Ip9NVtrSya3DfJAh+/ZNi4MAonur4++jwcKwky1BoPVOI+UV3 ByA6TPTpGY7oGjfDDTrDRG7bJgy/kkPe83/hy8ANps1yHnnwj856CFBPIygvanoZjgHj I8gjE3DGv8XnLiOdXl9LQDnjZ0AJEkq7XCh3i3e+rrOIjPusCtjMr+5cBlXHejZU395o R8E0fYJFpDfrWMv5PYWpxLD+XPNX2y5CuLjytlvTAYWk3shpVxP4Y4DPcI70UqA/Op7i GOMZGWZSSOXt1v5OKYfdZlr6vUO6XDu7sZn6DrrjYztZGosMrrPt4R8SGMExgF5drK86 JIvA== 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=2B5TAzm2TuFmNsslkOTXOz0YI5UezeYa50z0GrNFIK0=; fh=V1YG4YuQENJ7jSM3uDI9ofm4qsjYV2G4p5xt8+zRWng=; b=I3nNp6+uiT4cDUWP2KxWqQ6JMiciebzQJ3Ofe/ArYhpJQWeDrX1D5RvOuiYDfn89Yr i+QdoO52u6BPvynaDgN1Hq3G4fvQ/ts3+Omj8aJJ/5N5aAQhigSQpXgpsrKm6K/a0+rw y7hnq2tR5ZqCxZJiBbEjIh1a4Frpe5mWLQbc7yGIDNkcst6byGy9BmFg8cqit0ehTDtD 2n2OzNiH8pyJjfIzzfQeP5XNp8kKQx6uoYYcURgSzPdjggvxtOc6Q+gOPsBtmNohaf3t mBVdU6iOeRIL+nbZU9rrELY1+jDerPOU/HkqYBJzjTJnHKqHDjj14i22HOgUvF3fVRMA 3qOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Vyv2x2GY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id e30-20020a17090a6fa100b0026c198d8182si1777805pjk.105.2023.09.20.07.54.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 07:54:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Vyv2x2GY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 2B33580BD3A7; Wed, 20 Sep 2023 06:42:45 -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 S236165AbjITNmn (ORCPT + 99 others); Wed, 20 Sep 2023 09:42:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235399AbjITNml (ORCPT ); Wed, 20 Sep 2023 09:42:41 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E94E1CE; Wed, 20 Sep 2023 06:42:35 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 48616C433C8; Wed, 20 Sep 2023 13:42:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695217355; bh=4VZ2d49H7sr9rWHygFCjye19MowJnLLFSJFfbWTj9ys=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=Vyv2x2GYTtyai6iEOn85f2Wrj3TEznKggifWFV/zogAhZaNgBRhySwvoYpq83BjEM 08QgEV9tO1VdSbGPCqNqCSwoXiPpNZYIdOQXVG2mQeEKdpyHVSYWt4PNU0ihPNpWj9 MP+n/TOb9dAJd2eFSYcwZRNxJ03byJV+swXPpKRnGmKm0cHb1UUz3oYhFI0TDG6Yyi ESzXRyHt86kWp1WgFTC8QujZKdq5TuKh4m1tpCnJNNvoeY3Qkfh28xriZWyYp/rAnt WDUqCmu9nCsASquz5OFMiHopKGb88AUt6NfcYabjQjY/rP/7bDOk91INmDokrp138u tSCxUtJec4kDg== From: Lee Jones To: Pavel Machek , Kees Cook Cc: Lee Jones , Bjorn Andersson , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Douglas Anderson , Anjelique Melendez , linux-leds@vger.kernel.org, Nathan Chancellor , Nick Desaulniers , Tom Rix , Neil Armstrong , Luca Weiss , Lu Hongfei , Dmitry Baryshkov , linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-hardening@vger.kernel.org In-Reply-To: <20230915201059.never.086-kees@kernel.org> References: <20230915201059.never.086-kees@kernel.org> Subject: Re: (subset) [PATCH] leds: qcom-lpg: Annotate struct lpg_led with __counted_by Message-Id: <169521735205.3443473.3273251476364082094.b4-ty@kernel.org> Date: Wed, 20 Sep 2023 14:42:32 +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:42:46 -0700 (PDT) On Fri, 15 Sep 2023 13:11:00 -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 lpg_led. > > [...] Applied, thanks! [1/1] leds: qcom-lpg: Annotate struct lpg_led with __counted_by commit: 3a2a14ad346d60da60aef0a2afc1fb256a56c83c -- Lee Jones [李琼斯]