Received: by 2002:ab2:2441:0:b0:1f3:1f8c:d0c6 with SMTP id k1csp167911lqe; Thu, 4 Apr 2024 03:12:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWzj4YmB4Z0AS3inWx6EOwlSk8TtkVQBRacGkq6QvVd2rKXjOJSkH159kgI/rCNybAIn4T9vJx8JD+clzKLGlnxqz1ujsvV4irlCnoC6Q== X-Google-Smtp-Source: AGHT+IGjtOqSA4nOKwwLNWSlyBJaGuC2Z7XeRPrVMrbwe04N3bZ7zAR/rC5HGuvzhhGrz4o6p8z2 X-Received: by 2002:a17:906:1395:b0:a51:8a60:e1f0 with SMTP id f21-20020a170906139500b00a518a60e1f0mr832288ejc.62.1712225531602; Thu, 04 Apr 2024 03:12:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712225531; cv=pass; d=google.com; s=arc-20160816; b=kr3iw/wuufRzdCUH3LwEMtkMOw/UFW6v298sjO0rFZY1860/6c0gr9CW5K32d6MBQf xtyjhW94zZ52D2GsJIp4e4cqmkyURaliJ4/OUx/oWsQEgpdvccDwQVPyqByRLtFJZW5r iCIvqYGcb9Vk6SgnzhdNBsXVceu84F3PvO0icDZ30BG6oXKRcChzjK8wkImej7z8QOTI RPPU4dx1IuEVnD9VGGlRG1n85RYUPVG6ljiS6PrRdiy2jgIWUi2XYDOerSIdstyTnwxo 0j9II6HxtUduZkKZ1ICAxgdHlLwowvUScKenGxJjY2JOhhPOglmVz2Eqh3sEo81i1+7P ihmw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=date:message-id:user-agent:cc:to:references:in-reply-to:from :subject:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=KT271HVsFwswqhcHFMZARFItQe3xcpV7BmGJx1lUEis=; fh=owgTmgKEcEMqVL3ypepj/ZzFsSzYmsY6SRzX5BE8iRo=; b=jBlAYnjuLfs549kTxSEdQehzUdHcurX85T8rq+YEWkJ08fUj1x0b9iQ/gVwtKopRPk 382o9bwUi38JFhp8sBcXbx7z2H9AGtWSzptbfvLPYJpnE2t/9fpeo5AHhFtiLw9GOleT uRZLHRw717fMyObAKzYePvmXe1Net0TO9UI2WWuoQD5TimlDJU80799wYrDUhDroH6Eq o/nhtv82aBwEtIL6jGtz2cQjQR3Ig+bJVMZ/WwjPYv5Tz8Ty/y8DNsvfaoERtg85X1Yb i05PkAK2v3Gr0auRj/ZncvUCQB8kmtXBBixO/pBMu7ypTsMeDl1MKLO0ZSRL9GxHK015 ng9Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WKH2h3jI; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-131224-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131224-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ga15-20020a1709070c0f00b00a4e371349c0si6523050ejc.481.2024.04.04.03.12.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 03:12:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131224-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WKH2h3jI; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-131224-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131224-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 4D3D21F22987 for ; Thu, 4 Apr 2024 10:12:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 15C1D76035; Thu, 4 Apr 2024 10:12:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WKH2h3jI" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3B3DF3D96B; Thu, 4 Apr 2024 10:12:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712225521; cv=none; b=jYAd99hdfaP256y+/c0ZNEkAlTVkWKsX79EvsmntBoKXnjm9gY/VCKeDDP1rEnPd86DJvZvgcM1hZCFZXXperdcQUL5upPk3jcDG49q/etKlqhwbfPclTsxH5+G6PNYdwW5rkiPnPV9O0W7dLr6HpK+avGzJENva0rwhWWwGKkE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712225521; c=relaxed/simple; bh=+lFGWUK2A8+AE0BNEahXmc50uDsxFP64dSIEEtTABKk=; h=Content-Type:MIME-Version:Subject:From:In-Reply-To:References:To: Cc:Message-ID:Date; b=MwpWOeb67In3lIGYsiMLd8D0aG1FCho3S8M/c2Vwt8vNH+qBkCi8rERNCOwqwohTtugD2KugborYxdBaM/SodUEu7vPG3+V0PItO1JN0VrzvTVV8t4aICFZNKVEsjkmTBBt4XuhTBZtvMSpy7/yffHy2rnLVctTYxBuim5bLWJs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WKH2h3jI; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80D0BC433F1; Thu, 4 Apr 2024 10:11:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712225520; bh=+lFGWUK2A8+AE0BNEahXmc50uDsxFP64dSIEEtTABKk=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=WKH2h3jITiaB4V+Poz2Io74wXrCiEo++JJk+Pu/qYTvn8UOART5NBdRtozL031SUj 3sV5pplFjGIMc5Car6Pk7k/3UysJI51GkeMJDfs3JwK5jK2FP8AAmeH052uHK/Ous4 BPGPqQMRn+LVmbmxS1VgY8PSQEKJ9eG/jvPgNC0+1DoIfmMXf3tlg6kH69wu1VIbE0 NULMcBqkYOMnJn4HEj5bVrhxCWxAFMzmtWjxq9DI085E7Gli8pkhTTzwQ1EktqfWTP E4ZtMW//ZqSbpGGZ1Ar54DUhjTZnl1uMyTimNochYeJ5yKcCsD2+ng8cg5v+i5lYSb Izb9GciaUYa6w== Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH v2][next] wifi: wil6210: cfg80211: Use __counted_by() in struct wmi_start_scan_cmd and avoid some -Wfamnae warnings From: Kalle Valo In-Reply-To: References: To: "Gustavo A. R. Silva" Cc: Jeff Johnson , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" , linux-hardening@vger.kernel.org User-Agent: pwcli/0.1.1-git (https://github.com/kvalo/pwcli/) Python/3.11.2 Message-ID: <171222551750.1806092.12183763425108574151.kvalo@kernel.org> Date: Thu, 4 Apr 2024 10:11:59 +0000 (UTC) "Gustavo A. R. Silva" 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). > > Also, -Wflex-array-member-not-at-end is coming in GCC-14, and we are > getting ready to enable it globally. > > So, use the `DEFINE_FLEX()` helper for an on-stack definition of > a flexible structure where the size of the flexible-array member > is known at compile-time, and refactor the rest of the code, > accordingly. > > So, with these changes, fix the following warning: > drivers/net/wireless/ath/wil6210/cfg80211.c:896:43: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] > > Link: https://github.com/KSPP/linux/issues/202 > Signed-off-by: Gustavo A. R. Silva > Reviewed-by: Jeff Johnson > Signed-off-by: Kalle Valo Patch applied to ath-next branch of ath.git, thanks. 34c34c242a1b wifi: wil6210: cfg80211: Use __counted_by() in struct wmi_start_scan_cmd and avoid some -Wfamnae warnings -- https://patchwork.kernel.org/project/linux-wireless/patch/ZgSP/CMSVfr68R2u@neat/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches