Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1503067lqa; Mon, 29 Apr 2024 10:10:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV6EfIbIX2OPx2yzRUWcLhR3gZvGWnOvhvKPkgfcLuV6KsAAsBwwNk+zq4gnQJDhKvxoPqUEg1MhEHmIkpVeW2Ehys2DzFX7u10jRUmpA== X-Google-Smtp-Source: AGHT+IHqgoyEzD6sw8nqd6T6Kk6xD1nb7QGrK/3/nn9K5sCTQrwOoOoPEQud6jJ4SQgnnCvAm0UN X-Received: by 2002:a17:906:16c5:b0:a52:3984:148f with SMTP id t5-20020a17090616c500b00a523984148fmr211597ejd.36.1714410653759; Mon, 29 Apr 2024 10:10:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714410653; cv=pass; d=google.com; s=arc-20160816; b=QfNWzsLjZl5VHCojR1zaY54N129L2r8KZPoDQFSDJHWLQVmhDsTijK9RrE0xy++Vxm 9hch+piMn7Sa2SmC5KPXe5TJOX0j6mg1x3NnCchVXc0GNMenPANvovnq3MJkwXh/yGGU hSaYXkQV9LyYmZd6ycGKjKVfiGU+quWaO7ZoxreWI7JbCCe4zohmCV/TiypgZBcy4lkj Q82BKGD1s5buAi5MgonlHLS1Qm0Qmy/+mW+MkPx8BjelvoQ6jw7EILuma1msBWK1qEM1 w6TYvpYpuWAHTAOB55qadDf13A1vTDEsHGULUuPpSMf6b5bL98eCRTRFDQ2u1Y9k03N4 X3hA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=oZRgSAbzG7KcvdiTauEibDNnc/WC+ObXBWTvwKd5YyQ=; fh=/tARWojEHUWupPGV9LBVCcm+CCLPq+UvNOEKlqgY3FU=; b=boxs3soD51avOcHhwr+EkFuo/hYspjFqntG4qgJO8EcIle0vbGkzax8zkkqvtAbDeK JuhPaT1RyUp0sINiDoLM/93Oqc/LM97yI7zkbxfyiNH/Y5v4yc5mxBWT07kUYgVZSyB3 wt3d256nMRhNKy13FsJVQ23L4Q+AFumyPlEixblOoXcrP6T+e6Cs/DgyxqiFkHri78Be lDKFff+JwXNias8M3N1BL3pZnqphTt0yqGQxHOPTQLDraiO96jioog2b+NL0YKIYksL6 qYpS2Ya9wFsFizgO9VhhiSXVtqtI7dkJPc6bo6tL78Y9Qex/InOQFxCI+EdnA5SMPaFv KYjw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=frNC7ypk; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-wireless+bounces-6994-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6994-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ds3-20020a170907724300b00a58f73c9eeesi2037298ejc.268.2024.04.29.10.10.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 10:10:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-6994-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=@chromium.org header.s=google header.b=frNC7ypk; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-wireless+bounces-6994-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6994-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.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 786801F253F0 for ; Mon, 29 Apr 2024 17:10:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BF33283CBA; Mon, 29 Apr 2024 17:10:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="frNC7ypk" X-Original-To: linux-wireless@vger.kernel.org Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 485808626A for ; Mon, 29 Apr 2024 17:10:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714410649; cv=none; b=XXv1cF5jNdM9zU3Vvz0OZLQWV77BKLhUAC0dc6rWqvaL/wnF/05KDk7CwA4aUXhF+VGIWrHZZdsNmTRh4Ujb1nKaJTaaNA1hTIO82CEmZAbx8H4VBUb2PLlBtzoJWBwKv592jWaHi1gFF9HHx1HmNg3f5JLs8krjA5wH4/8mF88= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714410649; c=relaxed/simple; bh=0jNTl45Cs7ezsUWeAWbPmvCWgF+22Evr0a+0tU6atao=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fQo9SZZr6+kTwgp0eKLz25vmw2B3XBCokD4TJoarkyShx3qh1KkI/QzSfdWlW0o2rIkxb47mwO7HFW15LevEnvCnhcbEoL5V0d+Ux5AFqWH8nq9adNMpShOSWuaz38lErCrhvOCHPdKLi9ApbG7SG5gFaeimczbyqB9GK9V2c9o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=frNC7ypk; arc=none smtp.client-ip=209.85.215.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pg1-f178.google.com with SMTP id 41be03b00d2f7-5cf2d73a183so4145342a12.1 for ; Mon, 29 Apr 2024 10:10:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714410647; x=1715015447; 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=oZRgSAbzG7KcvdiTauEibDNnc/WC+ObXBWTvwKd5YyQ=; b=frNC7ypk1oXy4cYOUkEh1xrUZaaHRoAmacK25JOYs6LaD2a0j0PVUxBhwPNtoo+kz0 fNI89O/2zo91YhFv3vITF6WmgBZiQLg535I5N3VbhJjbTa+ZInayKi2hMpVb9Nku4A9W aCk06kZU1kUVBczu5Uddf++oFugHe8ZPo8JlI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714410647; x=1715015447; 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=oZRgSAbzG7KcvdiTauEibDNnc/WC+ObXBWTvwKd5YyQ=; b=MwETxfjKRsjuPsHXZBLksX+FPJpV1d4hYG6BsDRlHPfB8nPrXQmVV7zhUxvUdZWRm7 uQY7wed4CIQ1KgcPzAPyN8Cmtx0+tQptwEr2ySNHFmdbHKJdQN/BfkCWCIjrht3jIV91 2hYkMZ5IOTw+iICIBC27imrNDPEMdkOSdoHAtVnKzCRWRVymzceSC7kOTsL7fbmRbuzw gqvAJyt/crj5q2qq6Xx0NMzpU2+zaXMsACzO6735wWhTM7dwL/pnGQQQaqknrdKSC2In 0TZT63CKNagLnlrWGAW9zvahBCuCxfpi4FaAztxW0RMZdBOHjl67Uv6ziw44KKTu8koL 2VPA== X-Forwarded-Encrypted: i=1; AJvYcCUEiXqRA6z4T/cISnBcRZpHmGaKguySYEQxQJ7sBwaOe6Eb9Uki0w7Y2ZhmBhyS/O1o5EaRXUeDJbd73YpwItKWH1FI8I9Y5G5R/GYgdKw= X-Gm-Message-State: AOJu0Yz6DTQIr7TUPgql0EcjINiRKy7GC1ISIgEOaOd+D0eWQVdjZjgA HCBXZjVVigd4FbMFlQCsN7Rv6TqbVJm/8879w1LHlF2Sr1vrv5FJwbdB8NNAhw== X-Received: by 2002:a17:90b:270d:b0:2a2:6244:32b5 with SMTP id px13-20020a17090b270d00b002a2624432b5mr368408pjb.11.1714410647531; Mon, 29 Apr 2024 10:10:47 -0700 (PDT) Received: from www.outflux.net ([198.0.35.241]) by smtp.gmail.com with ESMTPSA id m14-20020a17090a668e00b002a6e67e197dsm19363447pjj.45.2024.04.29.10.10.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 10:10:46 -0700 (PDT) Date: Mon, 29 Apr 2024 10:10:46 -0700 From: Kees Cook To: Kalle Valo Cc: "Gustavo A. R. Silva" , Jeff Johnson , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH v2][next] wifi: wil6210: wmi: Use __counted_by() in struct wmi_set_link_monitor_cmd and avoid -Wfamnae warning Message-ID: <202404291008.51DB333F@keescook> References: <171222554691.1806092.8730005090791383928.kvalo@kernel.org> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <171222554691.1806092.8730005090791383928.kvalo@kernel.org> On Thu, Apr 04, 2024 at 10:12:28AM +0000, Kalle Valo wrote: > "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/wmi.c:4018:49: 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. > > cbb0697e0ded wifi: wil6210: wmi: Use __counted_by() in struct wmi_set_link_monitor_cmd and avoid -Wfamnae warning Hi, I was just walking through our patch tracker and noticed that I don't see this patch include in -next yet (as of next-20240429). Is there a flush of the ath-next queue planned soon? Or did I miss some change? Thanks! -Kees -- Kees Cook