Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1344593rdb; Wed, 20 Sep 2023 06:49:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEruxRXHfF9IlVfywBx9iLUeQs8eJDPuDEagVmwM5JdVERLdBFSznHxPlu5rAQ9azwRJX04 X-Received: by 2002:a05:6358:50cc:b0:133:a55:7e26 with SMTP id m12-20020a05635850cc00b001330a557e26mr3738057rwm.7.1695217762336; Wed, 20 Sep 2023 06:49:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695217762; cv=none; d=google.com; s=arc-20160816; b=KWKmJa3Xjrtd59KVe0pY5H2VSu4xDXBEphIAmnPgUb90VwTzyM29gysZiyUzwSPpVC snqr2FESJTZc5WBj3itVlsBYsYoO3FBeZ50nIvYuRF8jOi1bos3UAlJn2xz+p72azloL JTZKz8mqRwKoHlJbhw18ZmOlj2Knu3PGuROWNI1+LaCKtC3WTeF8ZWa2a2IPZhKG0KFX 4i9ZGYqk2yA5XJzf5Fn/ZrlbmUPDcB7VWe6Gi8XW1iVeMh0OWVXyZW1Giy8FnvrKgCqH YhDB6WjY0th42PncyTXijtCPdUQShaajlr5dJ8KMpT06+58zSKtLaPoI6jG72xmq//eK dRbA== 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=09NlI72e/uXupDMBKB2AesGsNhYYhcpNvRVcsJBVH/o=; fh=xvLIIjrCKtxGrcmIRryI8L3jLajytLK96nxJTOpsY3w=; b=Nr6u9P6OllF1/pOlss9PITsFSUzpo5DacWgju4FqvuFWe3a6cmqXSxHCyRwI2M3M/j vWRM83ABDpToYfW6zyrTExmy55Zw3oZK6dhIjTqFIwewg1e/kTJhE/AjZLaK3UKRpzWf rNzLE0HvEBPEj9Oj5IZUdt0WyNLQNFfGXcMv80VyKoMKgMPzGQHq6cdpjotzWQvMTSNF gvudhTHkh3iIQRyoZUE7K1DykPZ7Zb2xPpXCjwl+hwBfJ0trrpD5qs/6sf19UQjglF70 qQRfhTdjvXkqfCVvG4ChoVgTY5xmhFxYVUeTbD3Of9aFhqbaucqHB2R+LA4dcn4rUy1m weKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RUtVhgRU; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id 195-20020a6300cc000000b00565f76f86d8si11702140pga.818.2023.09.20.06.49.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 06:49:22 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RUtVhgRU; 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=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 fry.vger.email (Postfix) with ESMTP id 50964835156A; Wed, 20 Sep 2023 06:39:07 -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 S236377AbjITNjA (ORCPT + 99 others); Wed, 20 Sep 2023 09:39:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236165AbjITNi6 (ORCPT ); Wed, 20 Sep 2023 09:38:58 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BEDCDDE; Wed, 20 Sep 2023 06:38:49 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80A7FC433C7; Wed, 20 Sep 2023 13:38:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695217129; bh=pP1eXibM2XF9AVZiEeducJytLu6b4fRhxtC+s2WLHok=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=RUtVhgRUXHgvIAUA6eZisimvx4dHVon1muBzkge8QCpU8ixknMmdqE1dxEWSu2Pf9 i8NOnu7GTV507B/cVo8FwP/SX9iRm+cw095oWSJkf8l+1cr58qQ4L6/BZy/hV8Do2a sT6nM0XSa/2Qf0ODN3rmEc/bBvc9yrduhxxC5IXmcab2RAS/3GYQBvwhZGER9hahi7 cxRiLWIRnG/LNnKjKv5qowsCAlQmHaiv+sMnK6kPu/kJBQAUrKlWOtECUmLAJyIC6v esSofuyHFur3+b11sHaqHkge7eGLul2D/pEo3Oqe/ldsqPmURem+1J/jEIymOcWrDS WzKCtuSTTK7mw== From: Lee Jones To: Pavel Machek , Kees Cook Cc: Lee Jones , linux-leds@vger.kernel.org, Nathan Chancellor , Nick Desaulniers , Tom Rix , linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-hardening@vger.kernel.org In-Reply-To: <20230915201003.never.148-kees@kernel.org> References: <20230915201003.never.148-kees@kernel.org> Subject: Re: (subset) [PATCH] leds: gpio: Annotate struct gpio_leds_priv with __counted_by Message-Id: <169521712728.3441672.12465778864045972543.b4-ty@kernel.org> Date: Wed, 20 Sep 2023 14:38:47 +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 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]); Wed, 20 Sep 2023 06:39:07 -0700 (PDT) On Fri, 15 Sep 2023 13:10:04 -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 gpio_leds_priv. > > [...] Applied, thanks! [1/1] leds: gpio: Annotate struct gpio_leds_priv with __counted_by commit: 00f91ead9c8037d044414ae44a0e75ef3df27e6f -- Lee Jones [李琼斯]