Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp265164rdg; Thu, 12 Oct 2023 05:17:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEpOWJiUQoHKk4qLOmISeRpQMdomHvNtPzkLVSzOku2ac0zmJepqpXUrYSIiO0nPBaKJDad X-Received: by 2002:a05:6358:430c:b0:133:b42:69ca with SMTP id r12-20020a056358430c00b001330b4269camr27348263rwc.18.1697113027488; Thu, 12 Oct 2023 05:17:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697113027; cv=none; d=google.com; s=arc-20160816; b=qshV+SH4k6gMl3BkCmXfbRSRwpD2ZA0dgpKxRg08cM5F941Ip/sr2qhB4g7dYrbGA7 cerw7gMmVhxbwM/Hasyflfap3aS1f+YgyPHMy+jIhaK21NkoB3ZhLddndRLXJXBsjlzW 6QaNG+UdYGht2GzIpuuc4jv35ywnpM2ZQzUzrUdOCVt6rfMyE2i7p/HJFk1o/Kd9jD+z W7cgNfYbqtq0dqITXl9n7YsuPCYylQJLj7A1Lqq2f6h33VWiDn3qkEM5kCjKlXtJWkMM IBLt7JL/lM67acBlqzfWa+fuxGRb4ak8r6Iyc8kVeGS5sHQkOuhdgYHB85TnmbYUuZgn nc/w== 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=v+dBdPnY63bGgV1YmeEMSkwrgSDojVrXs58+X7sLJMk=; fh=I6yQiUVFAZZ8S6DTsoPljbjuGMsH+u5/DOGp2+Q/qew=; b=Eznm9+f1mT2yr0YaJQ2kgJFmllJUjwV8Y5Rzc5T/Af8WHQ1a9sWGWjcw/iO1QBtKti /v4RkhKQGF9egeM4vj4EnrrdbmpqCc3TpjodAC0v43ZXjVKzV7WMMTvs/sZe/W5RQ4Am RSHNP2FvZdChrKkle7aWrJATyzM1TF7Q+XZP78KD0f6a5Ex2TcOludP9KltiTBipoVtq Yhy4fLVAyb5+UYFGCQ5/Fpcd1T3g8WVTk1HedMtmYw+P1CNgAdLv9LIcfXSgKY+7joYI cplZuFsXbEZ7V2Wjcxv84lSxavWsp10vJFKtdxxcCNVYzbuBsw9YxEbtTfjY4kNDU/Pq bIjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="BJwwO9/o"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id bt23-20020a056a00439700b0068e39cd7acdsi14336461pfb.83.2023.10.12.05.17.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 05:17:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="BJwwO9/o"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id 2B0608098E91; Thu, 12 Oct 2023 05:17:03 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347211AbjJLMRC (ORCPT + 52 others); Thu, 12 Oct 2023 08:17:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343908AbjJLMRB (ORCPT ); Thu, 12 Oct 2023 08:17:01 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD6D2B7 for ; Thu, 12 Oct 2023 05:17:00 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 98A85C433C7; Thu, 12 Oct 2023 12:16:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697113020; bh=un9r1J+wb3IxjUD97AY6S9Fr1vVQfxEvKE/st9YxWPM=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=BJwwO9/oRy/HlpUsoJ6yYdYQ3FS6LZt7Kaq0jNuyltm0kP1CyRcWnW7tCZQXylWdk HDQUbO5braRIcfMDcFMfoE5cedErBDwdILGJ8JGhHOJpzNNGbGxL+Fs+Sd0oU7xxu1 6RWtEtPd4anaB9PTflu/3DvirWssBHro3MX1UFi6WKod53YxZflYqV+wzMN49AZI0U J+KaXsikahzUxrmUwxyqWp87iZa/RWkAXbv7tgOAK1qie6SpCNo3/doNd0W2b6RAKK krHXYopxNmibK5xbFMSGZxG+/7VJjWxks1K07kUjwx9ZNOVkjDYbvEfGYcz22A//ke hAuZib8bS7m9w== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH 1/2] wifi: rtw89: coex: add annotation __counted_by() for struct rtw89_btc_btf_set_slot_table From: Kalle Valo In-Reply-To: <20231011063725.25276-1-pkshih@realtek.com> References: <20231011063725.25276-1-pkshih@realtek.com> To: Ping-Ke Shih Cc: , User-Agent: pwcli/0.1.1-git (https://github.com/kvalo/pwcli/) Python/3.11.2 Message-ID: <169711301771.2932680.1214330921072528204.kvalo@kernel.org> Date: Thu, 12 Oct 2023 12:16:59 +0000 (UTC) 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 pete.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 (pete.vger.email [0.0.0.0]); Thu, 12 Oct 2023 05:17:03 -0700 (PDT) Ping-Ke Shih 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 via CONFIG_UBSAN_BOUNDS (for > array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family > functions). > > Use struct_size() and flex_array_size() helpers to calculate proper sizes > for allocation and memcpy(). > > Don't change logic at all, and result is identical as before. > > Cc: Kees Cook > Signed-off-by: Ping-Ke Shih > Reviewed-by: Kees Cook 2 patches applied to wireless-next.git, thanks. 07202dc12b53 wifi: rtw89: coex: add annotation __counted_by() for struct rtw89_btc_btf_set_slot_table 618071ae0f7e wifi: rtw89: coex: add annotation __counted_by() to struct rtw89_btc_btf_set_mon_reg -- https://patchwork.kernel.org/project/linux-wireless/patch/20231011063725.25276-1-pkshih@realtek.com/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches