From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3492CE79CD for ; Wed, 20 Sep 2023 11:14:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234343AbjITLOf (ORCPT ); Wed, 20 Sep 2023 07:14:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233970AbjITLOe (ORCPT ); Wed, 20 Sep 2023 07:14:34 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8CB7B4; Wed, 20 Sep 2023 04:14:28 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B11D0C433C8; Wed, 20 Sep 2023 11:14:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695208468; bh=4ohIM+PR0LkQKum0byuzz3ycyYgyXeMylliHgM3EBoQ=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=ijaRBULS666AbH3P/pJ1eLSNRJVlcFLP2EhIlkqKmf67PK3VEk0FGPCGvEuEQDmS7 j1aCPJ66Nitqle4/qWtja+jVqxH2qBTrvVvTWPAMlK74IvnTkUNAzuSIhvdakto8VV 7NNJCtv0QZLkosnal/BdrOVmbQAIvb2TGVVOUd3E6oZbxU8+oSwwktwz/Io2brXEQE e1vd39tAiQkcBu2zMneGhhamjGIlwU57BCfvYreadbW3zg6RkfMXtR5oQSzsh/ikRx bLfGnluPZKjQ2kpMKSOdr4HuUgpvLexkddvsXwOf5eIQsaHg4WOa2UXIUHSAdebaxJ IojSj22oBbFBw== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH] wifi: brcmfmac: Annotate struct brcmf_gscan_config with __counted_by From: Kalle Valo In-Reply-To: <20230915200542.never.417-kees@kernel.org> References: <20230915200542.never.417-kees@kernel.org> To: Kees Cook Cc: Arend van Spriel , Kees Cook , Franky Lin , Hante Meuleman , "Gustavo A. R. Silva" , Hector Martin , Ryohei Kondo , Hans de Goede , linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, SHA-cyfmac-dev-list@infineon.com, Nathan Chancellor , Nick Desaulniers , Tom Rix , Linus Walleij , linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-hardening@vger.kernel.org User-Agent: pwcli/0.1.1-git (https://github.com/kvalo/pwcli/) Python/3.11.2 Message-ID: <169520846255.991705.4120611293307630241.kvalo@kernel.org> Date: Wed, 20 Sep 2023 11:14:24 +0000 (UTC) Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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 brcmf_gscan_config. > > [1] https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci > > Cc: Arend van Spriel > Cc: Franky Lin > Cc: Hante Meuleman > Cc: Kalle Valo > Cc: "Gustavo A. R. Silva" > Cc: Hector Martin > Cc: Ryohei Kondo > Cc: Hans de Goede > Cc: linux-wireless@vger.kernel.org > Cc: brcm80211-dev-list.pdl@broadcom.com > Cc: SHA-cyfmac-dev-list@infineon.com > Signed-off-by: Kees Cook > Reviewed-by: Gustavo A. R. Silva Patch applied to wireless-next.git, thanks. cf74cdc6e581 wifi: brcmfmac: Annotate struct brcmf_gscan_config with __counted_by -- https://patchwork.kernel.org/project/linux-wireless/patch/20230915200542.never.417-kees@kernel.org/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches