From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A00FBC83F3F for ; Thu, 31 Aug 2023 19:18:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347012AbjHaTSg (ORCPT ); Thu, 31 Aug 2023 15:18:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230245AbjHaTSf (ORCPT ); Thu, 31 Aug 2023 15:18:35 -0400 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63BF9E67 for ; Thu, 31 Aug 2023 12:18:31 -0700 (PDT) Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1bc63ef9959so9421745ad.2 for ; Thu, 31 Aug 2023 12:18:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1693509511; x=1694114311; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=GsqiH/F0uiLsgZIOirUAxv8nRkz7x6zqX7vHcWml97w=; b=c6Z1i7tbOl0pBGpw7EAB3G5WmSTikIg6ZqDWf/YIHaVKo8BRqj0K5M9bGo7GnBZPOZ F8hQGw+1tQPmhlJmajGIqg6VgSIKa3s+ETXKfrP87Fj8GaWmkQ7p/UzIQmNZEjXreHU7 Dsly0nsqDp1M66pziR+EQCiwhCU7kVP6CBz54= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693509511; x=1694114311; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=GsqiH/F0uiLsgZIOirUAxv8nRkz7x6zqX7vHcWml97w=; b=JfNSsiedUlk3eL1TEfCNF722/qaV+tjfH8CAPt80XzqX/lCGbXfKyRWWpODYj0P2t1 tNYeJ6XVHyKqT/hvY1iNd4luear2s2CuDVPNYaEq76QyagMwA9eb9jFUB2ANYkpS/Fd9 yJcaUNxhX7u/mQaXGecIynnoAlDW3U1F9Szx+SeVGepceIhW89DZH2laquE24xf58oG7 oZzw6InDQVo+qoReAHdT68Lz59R4giK4qFp302JNDXNJ4YjtDzK2hxTk/pDEDmdpin01 EDGl9V7JBt0P50ehe1okplQPJu+3NFRA1FgVuc8mFF8B36hh2AVhaetc+XOYzvCVG0nA 5YXA== X-Gm-Message-State: AOJu0YywpZB0yxlu4+xom6Hif/RLLD5PPR5EeJ+OHth8vgXZnFHlvmAP YFC++TES+ropC1i1wiPd9BMC2A== X-Google-Smtp-Source: AGHT+IHAB09QJKFbJyJ6Mj/J8+vjv8IjfbkJCAe02z4bfIN2Qk8IUL2743Wr0Yrhw/3xqxR3apNxNg== X-Received: by 2002:a17:903:26d4:b0:1c0:aa04:dc2f with SMTP id jg20-20020a17090326d400b001c0aa04dc2fmr632850plb.11.1693509510884; Thu, 31 Aug 2023 12:18:30 -0700 (PDT) Received: from www.outflux.net (198-0-35-241-static.hfc.comcastbusiness.net. [198.0.35.241]) by smtp.gmail.com with ESMTPSA id jf13-20020a170903268d00b001b8b07bc600sm1573727plb.186.2023.08.31.12.18.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Aug 2023 12:18:30 -0700 (PDT) Date: Thu, 31 Aug 2023 12:18:29 -0700 From: Kees Cook To: Jeff Johnson Cc: kernel@quicinc.com, Kalle Valo , Toke =?iso-8859-1?Q?H=F8iland-J=F8rgensen?= , Christian Lamparter , Stanislaw Gruszka , Helmut Schaa , Ping-Ke Shih , Johannes Berg , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH v3 2/2] mac80211: Use flexible array in struct ieee80211_tim_ie Message-ID: <202308311218.D82D90A@keescook> References: <20230831-ieee80211_tim_ie-v3-0-e10ff584ab5d@quicinc.com> <20230831-ieee80211_tim_ie-v3-2-e10ff584ab5d@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230831-ieee80211_tim_ie-v3-2-e10ff584ab5d@quicinc.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 31, 2023 at 11:22:58AM -0700, Jeff Johnson wrote: > Currently struct ieee80211_tim_ie defines: > u8 virtual_map[1]; > > Per the guidance in [1] change this to be a flexible array. > > Per the discussion in [2] wrap the virtual_map in a union with a u8 > item in order to preserve the existing expectation that the > virtual_map must contain at least one octet (at least when used in a > non-S1G PPDU). This means that no driver changes are required. > > [1] https://docs.kernel.org/process/deprecated.html#zero-length-and-one-element-arrays > [2] https://lore.kernel.org/linux-wireless/202308301529.AC90A9EF98@keescook/ > > Suggested-by: Kees Cook > Signed-off-by: Jeff Johnson Looks good to me! Thanks for the conversion. :) Reviewed-by: Kees Cook -- Kees Cook