Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1575896lqa; Mon, 29 Apr 2024 12:21:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVhWAFHuJWY5JuQahKpcNDmZ6Yr80lPObDaIGayrJhyl97CBHPqEeqw6x9R6FRzeckzMcx8OQwGprrNEEPi/yHxjpR4Jxq3MgfTlAME3w== X-Google-Smtp-Source: AGHT+IHaHDVFrVQfmEZyrE3nvAMYDzie9xrWIZ7ygtHj4NXUwS0+JPPdRslkpcxzcSb+n0sZkiGd X-Received: by 2002:a05:622a:1910:b0:43a:efdc:ce1b with SMTP id w16-20020a05622a191000b0043aefdcce1bmr479581qtc.35.1714418511169; Mon, 29 Apr 2024 12:21:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714418511; cv=pass; d=google.com; s=arc-20160816; b=oUgv250VMzZ57Z+dkzwajQ9yAE3Jy90bS/8T8QAhw9eOSXzAsRgQomeWxp1nAMPKB8 fbM3u6mOCSvBN+zxVOIU9YpvUKtrsTm0QeMzd8CXPN8iezI2oaMczjE1qvp6ZXl59aKu 5IvVldf+wSxq845H0qeyTNWHdhPNzHggtUkMAnWwwyA6/YebOCUR0nbwp5sgDExbfe7x O2r00cTmqdOa+LpWlZLvFecKs5zeA9HZ40MDKl6ST0ATqNQ5TZzC0Hsgu/1MM48cxdXY sl7c3ezfF98dDLg6wJ6YlsZ6i9rsr/BPIjOCNFhhoDvyrB74vsoQ3q2gc0atT81U4bhq 7cWQ== ARC-Message-Signature: i=2; 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=w/yUVMCeXIXXstjAd7ZavlBFqOo/VxFI9MM3COfpPEs=; fh=T8dxBgMmQA7zQ045yoVtGGNZ0a5dMGM1L0EJb0pfnwg=; b=oKe2bNdlgQKCRohpH6QVvXp8yC5LkYo5pdhEQK3NQ7tRGpW8QbcGZ9J7h98xMhmsLC EA4g/ThUdvAcXq7Tz9HfE7d9L5hE1T9/vfbTK5HCjE/tDvthl5U3PoslJn9UbljwGGbP wNCTcBGqcWGa7VbqL9OPhFwS+6f7bXraQRpuoHnTZ59dnkCe0RbTIFRLNFndw4pLc9+U w/iz30+3euWKpK7sxBzQOOTurSwddLxpJLcMfm3CIvYBeZr9V1nnYdb2RUuMVVS67iYE aD0O+Q+VcACsH6yXeqqwS1Q8GxuS03+7mejGhVg3idklCFsyG8xgj8uIqn2dIt1XnyHf Bq+Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=c0RFfydn; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-162908-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162908-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 g7-20020ac85d47000000b004343a018c54si27245275qtx.794.2024.04.29.12.21.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 12:21:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-162908-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=c0RFfydn; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-162908-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162908-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 DEE831C211C2 for ; Mon, 29 Apr 2024 19:21:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 13E8513B59E; Mon, 29 Apr 2024 19:21:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="c0RFfydn" 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 2EE9012B73; Mon, 29 Apr 2024 19:21:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714418496; cv=none; b=lvZJ5CwUEjJYo7WOh6O/F1pmQZWUIZ/5BfsYOHuKFxPvhDDr0OpZXcD21k4hYO+egFQJWwC1goHepvcwH8WEAWrfw4K973LCzaeyeAiKnuMC2lhCzib9fdvOSUKyHbuqvIdGAu5hmDF5Hf22GoVjLDF4SZHdjlsinjSeD++T/08= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714418496; c=relaxed/simple; bh=vOAjXkqV/BW5BFMy/FugtkSomI+lCtbQeeOuE8DfZRM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type; b=o7M6vKzttgiUZ2NiTYYY2BbTwhmAeBvbC+rkkoNY6DMw0kvSHOBeV+AIhHfxzzMvCx5hP39HMwt31Eo094rkLxCPLiYrsG6s7SBRpfQlKlctQTDsFUlOkfbZOMqIerkcUPqvxT00dHtPcTCxMYwUKRwvUpa9/6nSXpJ0vSMCsOQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=c0RFfydn; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E4AEC4AF1A; Mon, 29 Apr 2024 19:21:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714418495; bh=vOAjXkqV/BW5BFMy/FugtkSomI+lCtbQeeOuE8DfZRM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=c0RFfydnB/AYsCs+tTB8U2TfsP/SkMCXDKAFCcdiWgHbk9DVIikiajKo42GI80Bzb /QcXx4KflBBZyWAeym9CEbXh/qGHPhuo7Kco+c4KcJOVSQfcjg8guWhTHkP6/XUAcE +a+iNmYng8SmHShJOR9wjrONK4D8wB0vcsl9QKtk40PyINjGLtMMfZA0nnwOvNc/sd QYzzm5UP/ZEykBARAwTm9RqCCMl878CnBECYblsWQUZQ9P92P/3v2fri6fLCQ+OMqM +9Hs6zv0xovtrYn/RH8NSfiX3dOsovbAgZeZB7xrY/KI1Uji9+RKNjMW96pmwxovVL 0cQwguLbnWKUw== From: Kalle Valo To: Kees Cook 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 References: <171222554691.1806092.8730005090791383928.kvalo@kernel.org> <202404291008.51DB333F@keescook> <877cggqdwb.fsf@kernel.org> <202404291109.331E1704@keescook> Date: Mon, 29 Apr 2024 22:21:32 +0300 In-Reply-To: <202404291109.331E1704@keescook> (Kees Cook's message of "Mon, 29 Apr 2024 11:09:43 -0700") Message-ID: <87bk5sf003.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Kees Cook writes: > On Mon, Apr 29, 2024 at 08:25:56PM +0300, Kalle Valo wrote: > >> Kees Cook writes: >> >> > 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? >> >> Yeah, wireless-next was pulled last week so most likely we will create >> ath-next pull request this week. >> >> BTW we are planning to move ath.git to a new location, rename branches >> etc. I think we'll see if we can also setup it so that it can be pulled >> to linux-next, so that you don't need to ask this every time ;) >> >> (Just joking of course, there a lot of benefits from having the tree in >> linux-next) > > Ah-ha! Thanks. Yeah, sorry if I keep asking about that. It's different > from other trees, so it doesn't stick in my head. :) I should keep > better notes! BTW I think all vendor specific wireless driver trees are not pulled to linux-next: iwlwifi, mt76, rtw (Realtek) and ath. So with all of these it will take a while before the commit is in linux-next. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches