From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from omta34.uswest2.a.cloudfilter.net (omta34.uswest2.a.cloudfilter.net [35.89.44.33]) (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 49D31219E8D for ; Mon, 9 Feb 2026 22:24:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=35.89.44.33 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770675896; cv=none; b=JdzMTULPhZwat0aOnt2NDvn6xE5ar5tEsfOoTKPBIx/UZ0e9TAayoUX7D1rcPNNWntH/5gNSFyb1rZJTYQFc+FWGY1j7E3BkeXvMgmnpVAafygrLRKgDuLVQB6Yav9YLttb/lOniSQRRsDSHpJWAaT07MqXDf4HijR0Mh2wlPKE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770675896; c=relaxed/simple; bh=E/wDNYT8yd4LvpoBYJ5ZjInPsfE0jSS1jaxSdU49C18=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=YfJ6oRUsrOkak/4OVv73yStNChxBDWlrpqA1xxZzYUwfsxg1egeUJxXD14AWYDUmJkourGodqqJsnu/OjjXwTS3T2gDe3DEadjyR8XVXb5f1apVorgDRiBJJwLZS46OHXip81FWDzUN0Qro9QcrMaemdKfjpzfqa+Fo9XN6aUK8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=embeddedor.com; spf=pass smtp.mailfrom=embeddedor.com; dkim=pass (2048-bit key) header.d=embeddedor.com header.i=@embeddedor.com header.b=nl/9NeqK; arc=none smtp.client-ip=35.89.44.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=embeddedor.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=embeddedor.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=embeddedor.com header.i=@embeddedor.com header.b="nl/9NeqK" Received: from eig-obgw-6007b.ext.cloudfilter.net ([10.0.30.166]) by cmsmtp with ESMTPS id pYa6vQ4iLKjfopZf5vQb5I; Mon, 09 Feb 2026 22:23:19 +0000 Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with ESMTPS id pZf5vphRGh8QWpZf5vEuAx; Mon, 09 Feb 2026 22:23:19 +0000 X-Authority-Analysis: v=2.4 cv=Mcdsu4/f c=1 sm=1 tr=0 ts=698a5e57 a=1YbLdUo/zbTtOZ3uB5T3HA==:117 a=Mt98uAL8hC94oX8DrwaRjw==:17 a=IkcTkHD0fZMA:10 a=HzLeVaNsDn8A:10 a=7T7KSl7uo7wA:10 a=IdIfsTrEsfU7E6sfyFMA:9 a=QEXdDO2ut3YA:10 a=2aFnImwKRvkU0tJ3nQRT:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=embeddedor.com; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=SHn36UqCLpdD2vGFlZTVJyUtylTSL6ZnEIe6tsgs8Og=; b=nl/9NeqKjijtQ/ICGi1t4Ju80B 4pEyYHFHFdDnjoUit+2i+Ge71Bljcf9oNy2lXAJuEk/EkM70KnEXzHiexmp7rNcxlXMTpJe9EQ93a KDHEYVyvCEPxazb5a6lG6G8+HFP8dFWmvqCXPXWog6YfDg8FOOM5inMEuylQ173RqrekdWpH3uoP0 gYrlS01dKMAropBI+V3qHjIlbKQx1lUEgJruDZiuxaFuyk4+s4gAjOKR/LWU4IlSBXL7tN7vWigMw PA233sVfnhtvDvGy4SdFwUW4Al+8LKUEO34ikdlu4U9Iij9KdknGDagJWkYFa9TowyNbZxHMB/H1B +DZcjU2w==; Received: from [177.238.18.130] (port=51670 helo=[192.168.0.100]) by gator4166.hostgator.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.99.1) (envelope-from ) id 1vpZf4-00000003cd5-2I7f; Mon, 09 Feb 2026 16:23:18 -0600 Message-ID: Date: Mon, 9 Feb 2026 16:22:44 +0900 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2][next] iwlegacy: Avoid multiple -Wflex-array-member-not-at-end warnings To: Kees Cook Cc: "Gustavo A. R. Silva" , Stanislaw Gruszka , Johannes Berg , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org References: <202602091212.743C6B9B7C@keescook> <4bf43164-b130-4643-9f4f-761f49bd0dc9@embeddedor.com> <202602091416.A7FD08F6C@keescook> Content-Language: en-US From: "Gustavo A. R. Silva" In-Reply-To: <202602091416.A7FD08F6C@keescook> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 177.238.18.130 X-Source-L: No X-Exim-ID: 1vpZf4-00000003cd5-2I7f X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: ([192.168.0.100]) [177.238.18.130]:51670 X-Source-Auth: gustavo@embeddedor.com X-Email-Count: 2 X-Org: HG=hgshared;ORG=hostgator; X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfIMsdmmmnrFojpgPqglqzLAoZpqRTqa1DHczG70Kw1rhi3MaFOfRtUeu/yPTD78kxrqg6qgs+q+mQVTGYN0m1cWJKIzVPWit0N8v6SJ7yW80E4pfxnBf +NXU3GsQhZPhJX9o/Cu0XwV+UJ5JU1D76ds01nsuJ64lAd7Yo3oIjLB2ngtoYKpQFJ625wqyNNajOEl8NSd/3SftV+GpkcHHJYXhov+QMGZr0Pt0gE34kHRO On 2/10/26 07:20, Kees Cook wrote: > On Mon, Feb 09, 2026 at 03:23:59PM +0900, Gustavo A. R. Silva wrote: >> Ah yes, I can do this. The only thing is that I'd have to change every >> place where members in struct il4965_tx_resp are used, e.g. >> >> s/frame_count/hdr.frame_count > > Hm? No, that's what transparent struct members avoid: there is no > sub-struct name, the members of the struct are transparently visible in > the surrounding struct: Ah yes, that's why it's defined like +struct il4965_tx_resp { + struct il4965_tx_resp_hdr; /* * For non-agg: frame status TX_STATUS_* @@ -2664,7 +2668,8 @@ struct il3945_beacon_notif { } __packed; and not like +struct il4965_tx_resp { + struct il4965_tx_resp_hdr hdr; /* * For non-agg: frame status TX_STATUS_* @@ -2664,7 +2668,8 @@ struct il3945_beacon_notif { } __packed; > > struct inside { > int a; > int b; > }; > > struct foo { > struct inside; > int c; > } *p; > > "p->a" is valid. Yes, gotcha! > >> Another thing to take into account (fortunately, not in this case) is >> when the FAM needs to be annotated with __counted_by(). If we use a >> separate struct for the header portion of the flexible structure, GCC >> currently cannot _see_ the _counter_ if it's included in a non-anonymous >> structure. However, this will be possible in the near future, correct? > > Right, that's still in progress. I don't expect it soon, though. :( > Okay. -Gustavo