Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2565089rdb; Mon, 4 Dec 2023 00:37:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IFN3QYvz/42/Zq4cteKl1qS1GDzPlyx3P2XGl7DAAScs46kQJwGhwquf+C04xAfc9yLtZIr X-Received: by 2002:a05:620a:6405:b0:775:6785:3051 with SMTP id pz5-20020a05620a640500b0077567853051mr4657599qkn.50.1701679079413; Mon, 04 Dec 2023 00:37:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701679079; cv=none; d=google.com; s=arc-20160816; b=eKHb/QlwFdknJmAx0JpD680gqyIAkruBlZ8tde9yCEAZrms7BCYqw3WKQyQX57gjRn 7eluMCtkW6jHYUI+arhreqVTEz9YFCwd+WMqtS2m7oS3aW8WmHDXWloF92vHhFyAvvOn ryeocmHfCXLlLyfw2Okk7esGr9/YDt31K7C9ubzXtnNDC860hSp2lKZjB5pEx0VqiEwG oe340NMznu+Izcgjic6iE/Z1JosFAXBu94QavUvAmu4H1Mf4a6VbN2zKbp6Pafp06ZNk bzp9noL9Ni//1PeHS+JDj/2mCMUEXTjVjAUBH3Whj2IwqxlBM9019ZJKIz5X10fkV1FT OM6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dkim-signature; bh=c+ydD79UDn6WKjD/5Hw+OmKQSFy7oV67TboMZQA58Pc=; fh=KXZmrBeCXU7VmXPWQ7YxesmMKpIW69h+nIDZYOXAqHI=; b=q1xnb72Bq7diMgm2M5FeoATpH1HkR3zHs4guzBwC46U5hZ6eS3vWWRx4JgDRHW2GTf v5HxnMbNm3LIweL+2x+66Nv8mZE0s+gAd7rpOkujTUbdY1phGd9QCNXsLGkX0zdhqALT BS/jc6vfZqfwbQuHlPn2pla+JbJpZIvJHmBEx2B7661oslvy3kBIFAUA8rdwOLrpR353 lCYvCg94WPq2rIORvptFT8PvJBugLPTVw0uPLr4tSBb9tkUaNezbYbvgQAHMdB5bAhPy eq9GqiQlYOo05y1oOiKiV8yeFmZ9FMKAwV1nI77Vn57/mzWBrkinB9ls4EvAz3rS9WnI kYcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Tg/7WLEZ"; spf=pass (google.com: domain of linux-wireless+bounces-370-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-370-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id q4-20020a05620a0d8400b0077dcfd4d7a9si9487410qkl.8.2023.12.04.00.37.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 00:37:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-370-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Tg/7WLEZ"; spf=pass (google.com: domain of linux-wireless+bounces-370-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-370-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 18DC01C209ED for ; Mon, 4 Dec 2023 08:37:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3249C17F4; Mon, 4 Dec 2023 08:37:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Tg/7WLEZ" X-Original-To: linux-wireless@vger.kernel.org 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 11C8ED298; Mon, 4 Dec 2023 08:37:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F5BEC433C7; Mon, 4 Dec 2023 08:37:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701679075; bh=ftmmbjUPFPYaMVVTsCh1SAKi4plLZBTdcQEkERtxlG4=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Tg/7WLEZoOcMn2nDBFBn/UG3NI6uXNyiSPClpRfA1cBfPtSx2pDbdWD/H4k56mwoE +QNupT1g1geF2oa+jqBmH44890zbr8wjRors3E3pX4A+bGdtIUR4qmCh0y81LPaSBy +BIWDBqCTOHTsNmlUSXqYIFOOAwZJ6mVZwrWVTVNNtKb9/dg+eXmln9zoPb4txG4aW o9JR6NOaTn2PWaU6xhPjs8Wx+XIXN3nAtWN4jHRUxOygjlDjfLyuQQbmjmQUOgbZJw AnPgrYkuxx6xeeym9KAEhHXELSvGAUhEYG8zeLPUJu1RIZMTmh/20qaUmeHT+ggNBC E3sI7GQMAL8eQ== From: Kalle Valo To: Kees Cook Cc: "Gustavo A. R. Silva" , Felix Fietkau , Lorenzo Bianconi , Ryder Lee , Shayne Chen , Sean Wang , Matthias Brugger , AngeloGioacchino Del Regno , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH][next] wifi: mt76: mt7996: Use DECLARE_FLEX_ARRAY() and fix -Warray-bounds warnings References: <202312021326.D3504C1@keescook> Date: Mon, 04 Dec 2023 10:37:50 +0200 In-Reply-To: <202312021326.D3504C1@keescook> (Kees Cook's message of "Sat, 2 Dec 2023 13:27:54 -0800") Message-ID: <87zfyqqs69.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Kees Cook writes: > On Thu, Nov 16, 2023 at 02:57:24PM -0600, Gustavo A. R. Silva wrote: > >> Transform zero-length arrays `adm_stat` and `msdu_cnt` into proper >> flexible-array members in anonymous union in `struct >> mt7996_mcu_all_sta_info_event` via the DECLARE_FLEX_ARRAY() >> helper; and fix multiple -Warray-bounds warnings: >> >> drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:483:61: warning: >> array subscript is outside array bounds of 'struct >> [0]' [-Warray-bounds=] >> drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:490:58: warning: >> array subscript is outside array bounds of 'struct >> [0]' [-Warray-bounds=] >> drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:492:58: warning: >> array subscript is outside array bounds of 'struct >> [0]' [-Warray-bounds=] >> drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:469:61: warning: >> array subscript is outside array bounds of 'struct >> [0]' [-Warray-bounds=] >> drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:477:66: warning: >> array subscript is outside array bounds of 'struct >> [0]' [-Warray-bounds=] >> drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:479:66: warning: >> array subscript is outside array bounds of 'struct >> [0]' [-Warray-bounds=] >> >> This results in no differences in binary output, helps with the ongoing >> efforts to globally enable -Warray-bounds. >> >> Signed-off-by: Gustavo A. R. Silva > > *thread ping* > > Can wireless folks please pick this patch up? Ok, I assigned this to me on patchwork now. Felix, please let me know if you prefer to take this to your tree instead. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches