Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2363648rdb; Thu, 21 Sep 2023 17:08:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF8dfdgr5jgs0obbujmcc09H6Gk9SWIdDmwVuUD3V5AVogBN804MPrTk7auseHAcUmLTDOF X-Received: by 2002:a05:6808:2a46:b0:398:5d57:3d08 with SMTP id fa6-20020a0568082a4600b003985d573d08mr6246676oib.37.1695341296841; Thu, 21 Sep 2023 17:08:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695341296; cv=none; d=google.com; s=arc-20160816; b=nkwnm8SBbcgb1QgbC0il8ICjFKKITieRrRCyxI7dNpKEvmUwKwBIHrlBDxVhkA6ABu /1JCkKp0CVO24Qkgr+1oIChxvRuKJMv0rTpGn4DkrykClkojHXQPUFKyQvMpqjh/CWAk bseMWhVvPRkiYTOKppTZkrmLSsCwutU3Z0KCNj6bdquJa+DsD3UAikUwMnzGnHOTXW55 Taz+4r1Us3wrZh6kBKgWKjMyrx/AHu1qNi8WzSe8h+mWQF8rwJtURKQNt/IpEovsVZlo dy3vimydr0eWzAyeGukMRCfBqx4NKpZcpQm1i8imXsxewE7HwetPZdAAUZCgZv0dZ3xN 69gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:message-id:user-agent:cc:to:references :in-reply-to:from:subject:content-transfer-encoding:mime-version :dkim-signature; bh=edtuObfbem3rItyLl/+kvdcRz1Xr5WN2W/fgxlnU1MM=; fh=Xnwia9GlL8nYM6dE16Xr6exDgPfLXjW2Bd6oHTqb4dU=; b=PDGx5VceqJFbZIX5hTx2dOTOMZ8fvh9IbmtbDv5mHajCc7E72S8dXewjfmAx6eU5TD TQbtBv5iyVEk3+YNsa0WAM5RldRnj2DxHNji82R6Y2DBjA1hk6K4+lt77C8o4z9zsQzY FoZFENfHxCamLLE13qVsfDucdbyQ8Tuf5mJgdobxhfwbS7SaVkQBhZrs7bsajREejeF8 pyrsSsbBEU9pnr4GQ+cO9Rj5zg9xUICm7NpQlrGBAA/0Gz/3GngE921okW3T0eDv/K2/ JZg9wvq2r2J++UM3PM4XWt6NXI19xvhr8uqI+pQRkD/pZDr4vYKwzIvz8xjLxfrekICL i24g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=r0+lsAVN; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id f5-20020a056a0022c500b0068fb8704b9csi2819809pfj.28.2023.09.21.17.08.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 17:08:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=r0+lsAVN; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-wireless-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 morse.vger.email (Postfix) with ESMTP id 7D6208040D42; Thu, 21 Sep 2023 13:58:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232148AbjIUU6g (ORCPT + 56 others); Thu, 21 Sep 2023 16:58:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231916AbjIUU6E (ORCPT ); Thu, 21 Sep 2023 16:58:04 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 551BE83F4A; Thu, 21 Sep 2023 10:37:16 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 29E5BC116B0; Thu, 21 Sep 2023 08:10:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695283827; bh=88AKbaA+AwhS8raz9bZXjzCE7ETgOOVMKBcCNcy1RpE=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=r0+lsAVNF5tR0s5cWaq+Pkxc60xpmpbcvJv/SqRxkRG6zHI3C5bg75kBgkOYtOwEe Kdxx/8IEtAOZQC3QfQgQa8sRrxzalbw6e8LvhnZ9ovU7CnyML/rrSgfMckxClATarU tgAU1TlJrpmc0fUtqqEvDmQPnxdFywznVuEOoL6ELu7m6Lf655hRfLiNTZxwMIrQ/u 0iiBWjOduJFDq0Sk8sL+iCGrIRielVtykLyfjCufQSxDPfQJet+KWSYWfyD46/5yQT hP3xXkryE1hBnssPwK2DsQpuCcjdw+2INnYpP8q1BpReKsb9NP/cfr6+CV1vss7z+A xvhdLX9t1m1Fw== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH] wifi: ath10k: Annotate struct ath10k_ce_ring with __counted_by From: Kalle Valo In-Reply-To: <20230915200636.never.762-kees@kernel.org> References: <20230915200636.never.762-kees@kernel.org> To: Kees Cook Cc: Kees Cook , Jeff Johnson , ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, Nathan Chancellor , Nick Desaulniers , Tom Rix , 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: <169528382314.1539628.5873188832117553584.kvalo@kernel.org> Date: Thu, 21 Sep 2023 08:10:24 +0000 (UTC) X-Spam-Status: No, score=-0.1 required=5.0 tests=DATE_IN_PAST_06_12, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Thu, 21 Sep 2023 13:58:33 -0700 (PDT) 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 ath10k_ce_ring. > > [1] https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci > > Cc: Kalle Valo > Cc: Jeff Johnson > Cc: ath10k@lists.infradead.org > Cc: linux-wireless@vger.kernel.org > Signed-off-by: Kees Cook > Acked-by: Jeff Johnson > Reviewed-by: Gustavo A. R. Silva > Signed-off-by: Kalle Valo Patch applied to ath-next branch of ath.git, thanks. 3f856f29551f wifi: ath10k: Annotate struct ath10k_ce_ring with __counted_by -- https://patchwork.kernel.org/project/linux-wireless/patch/20230915200636.never.762-kees@kernel.org/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches