Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2324818rdb; Thu, 21 Sep 2023 15:33:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEEfCVQHAEtKmNdQZLaXIqh2fuKFdGesytTNpYxCqsyZasnUkSW1lkwe/lBDIVTwW1ssQJC X-Received: by 2002:a54:4509:0:b0:3a4:1c16:b1bc with SMTP id l9-20020a544509000000b003a41c16b1bcmr6718206oil.12.1695335601999; Thu, 21 Sep 2023 15:33:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695335601; cv=none; d=google.com; s=arc-20160816; b=ZR6XblqOAGuZQQArZxkGbySS6eJYX0LptJIVmmBOuzkepPto53RVbsfmTdVJ5Ntgvy VL72hCjQVTFeUYMDvMITZw8K4oXMcPGPmZs+6f08X833YoB07WkdG80cgHY1F04s47mh EDDa4DfFBeIIfnvb5W8ME29zI84/XVhTsRycA4n3pEFTK98FRUCn36WUhOyXqC90tfh8 oO9CPZygBkPbvPOh07YtM4HrsGkxxH+Vet1hZHeDtsTnDGU3gmGs5qgN1W5/jFzX9X7w phZVqoKIRtXiDlLa61tNwfwbZN3Z8usedSTDkmEZZlXQV7YE+fYAwwo76bv+XsTqBy+4 VquA== 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=lNDL/nNJhCUmiMDbA6h9XtYJSIdGR7pIAWnachQl+b8=; fh=jtxoqZP7Uv1oPS/H4jqp9X9gIdjKYXtyKlPhjfXPffM=; b=xJWKw6pde+K5NmEm3kgCzIIk7fORTWSShPMY3Hpo0WNmS/CfVBBXNsRCTsAP8GLFH9 FdhAgnThILhvENBbftWIuk16wQdoL9/Hr7Tid57sWq83Xg92CHIz6vvSa0TJfzc/jtPX J27jY5fVH+TwlQ7WadoHJaV+Gh27qIQLrcBJJSGnmo7d/PnGkxvFj5UfvtZM+wFIewDg ESQaHCRUDmo6dYLNvWusYnmrsphDyllNk99TKtUc0KMqzMImyvk3dw7D15pmIfVu1qrb oVmq0abyE8shbAUYfYhhIchYYJpdE6gzpsz1WElwxLRzwmu2Bri0DbyTyevQsrVNozBv yuiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=F8spp6f2; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id c3-20020a6566c3000000b0056534300dc2si2328311pgw.247.2023.09.21.15.33.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 15:33:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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=F8spp6f2; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (Postfix) with ESMTP id AB33482D87B8; Thu, 21 Sep 2023 15:21:01 -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 S232218AbjIUWU7 (ORCPT + 56 others); Thu, 21 Sep 2023 18:20:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232215AbjIUWUo (ORCPT ); Thu, 21 Sep 2023 18:20:44 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A20FA9F7; Thu, 21 Sep 2023 10:07:28 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 15B06C433D9; Thu, 21 Sep 2023 06:30:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695277858; bh=T+AarZU1OTWE4tfG5KCNEN7xu+9uCv63xpcrlLBPzs4=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=F8spp6f20lSgSPHJDALIiU808mf39UoqBTNdF7qImjbNCJwTFAC3eIT2dM1d9jnJx Hz7Ek/XGl4FJw8IyEj87AlnDMKzuVWv2Jyn50UdvQz54g8Pda4wteEZiOpW/e606MW aiQ+wR1I9Zzr5RI1fXHVsD6oki6FitbWIfn8AMbAIz0iwUpoQh+fREph4mexqnHQm+ CDt8pTl83zrSp3k8q50qdg3OsV+ag3dJcCuF0cxmfBx6cbMdcYsav3J3rKJrbW62TD ucDYT+V8I9UpkPPQPbR3w1onrFv9hIr47UeFE3OL8c05hPDHSDmJ+be9gmwtjb4mH/ 0Tlelv86F33bQ== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH] wifi: ipw2x00: Annotate struct libipw_txb with __counted_by From: Kalle Valo In-Reply-To: <20230915200602.never.582-kees@kernel.org> References: <20230915200602.never.582-kees@kernel.org> To: Kees Cook Cc: Stanislav Yakovlev , Kees Cook , 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: <169527785383.1469888.6111719451945571724.kvalo@kernel.org> Date: Thu, 21 Sep 2023 06:30:55 +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=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-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Thu, 21 Sep 2023 15:21:01 -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 libipw_txb. > > [1] https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci > > Cc: Stanislav Yakovlev > Cc: Kalle Valo > Cc: linux-wireless@vger.kernel.org > Signed-off-by: Kees Cook > Reviewed-by: Gustavo A. R. Silva Patch applied to wireless-next.git, thanks. 357be7ebba38 wifi: ipw2x00: Annotate struct libipw_txb with __counted_by -- https://patchwork.kernel.org/project/linux-wireless/patch/20230915200602.never.582-kees@kernel.org/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches