Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp36385rdh; Mon, 18 Dec 2023 10:47:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IE3T0+oXFnj4Foo7u4gvNQ99b3dL43BPLzhpeuLcHrNe+HW5XKeMojJ7iNohI871uY8SUNE X-Received: by 2002:a05:6a20:d386:b0:190:1e0c:d29 with SMTP id iq6-20020a056a20d38600b001901e0c0d29mr28714793pzb.4.1702925254464; Mon, 18 Dec 2023 10:47:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702925254; cv=none; d=google.com; s=arc-20160816; b=hv6ou9gVJ+QWZ74X4VrBfk2dmhg4vWcCGG6PM7odmYjufE9rn7UdGFWJa11mOmyGsl zdZmz4aeC0Cazng0xR0VyCc6jfFA5PhldcyFOsvyUkbWZZksX/FxF9PC70J9U3Om8yHp OkUeL29n1ygjagZXd6BWbXaZe7yoc0hU3IKjoQWjPFlf+7IJL8Ik66HVQwU57/sqF/GP LqSWt/j4ZpUf0ty+HL62NL26PTia5bDsdG+I7M4hh4gGXlELki5coiezat6aLrR0gaHU ks1MJTN7PS7JRFNpP2GbOTkJcZapG8sTzYxKWMjS+fJgWuPEK//j7MNAmdCGW9kYLROB GvHA== ARC-Message-Signature: i=1; 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=5wNLORli7BDHo9r/kzrR/IxfZpnpeASnJ1nfAhIpnNE=; fh=zPbh/ZwmmZQBkIFPD5R3KjuwCTqCuOFhw6Q5oB6kWCk=; b=KSTp0+CTDNx6YH+CO+uda9+JmGW38xTPdp/A1lMG6Utv2+Ss/vJ6P64fll1Weoufg6 DbEAIQZ9Q2LKVDDO34xnZrzIwLWDGlclksLs3n0yJMT5OtSdArKWPQsUMJJMzgJHpMyf IAGq5HoPNUbsO48GVcVrk+iWuORVSI+YmckupWsUmc1TW8LmQFWM67d3H22Q/mxy0Rn9 nSdikpwqiFYBrK3q2dgbxYuFys+YHocx2VZ/bceFx+5VEVWLWnHcDC3yFE/jaANFJ+Um NWvRiOsy+vV5Csj8lKG3XKI7xRnOn0t5hzwFJaP0hO9EmCFyBisZn8iRfBj5ekYaekYs YmHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="duhDDjH/"; spf=pass (google.com: domain of linux-wireless+bounces-945-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-945-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id n22-20020a62e516000000b006ce97669ffdsi17522087pff.358.2023.12.18.10.47.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 10:47:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-945-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="duhDDjH/"; spf=pass (google.com: domain of linux-wireless+bounces-945-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-945-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id D987028551A for ; Mon, 18 Dec 2023 18:47:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 42C265BF9D; Mon, 18 Dec 2023 18:47:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="duhDDjH/" 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 E8B6A26287; Mon, 18 Dec 2023 18:47:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E79AEC433C9; Mon, 18 Dec 2023 18:47:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702925249; bh=MNFpGtT+UDTrh+CtH/56pWdeRMJBi6mOCBVEoln6zPk=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=duhDDjH/pkjlzzSF5hSbzWfVyBHh5y4eEVQPfd8Ew+i34CDgDiqcdy9XYpKW8FK8x pm9jt9QzWfC4TyqVDv9GJ09DigCsTkIfcegcBLCqKhGkOCDA1NQ1ZUU2t2w+8QdxsI EC0ILgNSRzU4zpM2XhjjW2XejeKFyCh09+pj2r8XT8CMKnbsN4P5MUKND28vpHdt3u VUxULwBDqNKChmhFVg7Gu/BcASIPx8tgwZ1+1cA+exEJ4mRQTK4pXwi35DGMVGtWRO wEVKlFidpkQtdQHI7yBvvfmdBMvI3JdHdl+n7ipDCB25UoI1JOFzrMMJFsWfA+TC2V NdSYAhAvCPU4w== Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH 1/6] wifi: ath10k: use flexible array in struct wmi_host_mem_chunks From: Kalle Valo In-Reply-To: <20231213-wmi_host_mem_chunks_flexarray-v1-1-92922d92fa2c@quicinc.com> References: <20231213-wmi_host_mem_chunks_flexarray-v1-1-92922d92fa2c@quicinc.com> To: Jeff Johnson Cc: Jeff Johnson , Kees Cook , "Gustavo A. R. Silva" , , , User-Agent: pwcli/0.1.1-git (https://github.com/kvalo/pwcli/) Python/3.11.2 Message-ID: <170292524618.424292.1640750049894446616.kvalo@kernel.org> Date: Mon, 18 Dec 2023 18:47:27 +0000 (UTC) Jeff Johnson wrote: > Currently struct wmi_host_mem_chunks defines: > struct host_memory_chunk items[1]; > > Per the guidance in [1] this should be a flexible array. However there > is a documented requirement: > some fw revisions require at least 1 chunk regardless of count > > To satisfy this requirement, follow the guidance from [2] and wrap the > array in a union which contains both the flexible array and a single > instance of the underlying struct. Since the footprint of the struct > is unchanged, no additional driver changes are required. > > No functional changes, compile tested only. > > [1] https://docs.kernel.org/process/deprecated.html#zero-length-and-one-element-arrays > [2] https://lore.kernel.org/linux-wireless/202308301529.AC90A9EF98@keescook/ > > Signed-off-by: Jeff Johnson > Reviewed-by: Kees Cook > Reviewed-by: Gustavo A. R. Silva > Signed-off-by: Kalle Valo 6 patches applied to ath-next branch of ath.git, thanks. d2eb318f4b6b wifi: ath10k: use flexible array in struct wmi_host_mem_chunks 72ca7c4073ac wifi: ath10k: use flexible arrays for WMI start scan TLVs 26eb704a46f8 wifi: ath10k: remove struct wmi_pdev_chanlist_update_event b0c0794b05ec wifi: ath10k: remove unused template structs cb188e862c1c wifi: ath10k: use flexible array in struct wmi_tdls_peer_capabilities 6b9923f1f6d1 wifi: ath10k: remove duplicate memset() in 10.4 TDLS peer update -- https://patchwork.kernel.org/project/linux-wireless/patch/20231213-wmi_host_mem_chunks_flexarray-v1-1-92922d92fa2c@quicinc.com/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches