From: Kees Cook <kees@kernel.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org, Haoyu Li <lihaoyu499@gmail.com>,
Johannes Berg <johannes.berg@intel.com>,
syzbot+e834e757bd9b3d3e1251@syzkaller.appspotmail.com
Subject: Re: [PATCH wireless] wifi: cfg80211: remove scan request n_channels counted_by
Date: Mon, 14 Jul 2025 22:04:02 -0700 [thread overview]
Message-ID: <202507142200.D315742C@keescook> (raw)
In-Reply-To: <20250714142130.9b0bbb7e1f07.I09112ccde72d445e11348fc2bef68942cb2ffc94@changeid>
On Mon, Jul 14, 2025 at 02:21:30PM +0200, Johannes Berg wrote:
> If we really wanted to fix it, we'd need to separately track the
> number of channels allocated and the number of channels currently
> used, but given that no bugs were found despite the numerous syzbot
> reports, that'd just be a waste of time.
This mismatch between "quantity allocated" and "quantity used from the
allocation" is repeated in more places that just wifi, and I'd agree
that it has caused some confusion. The intent of __counted_by is to
track the _allocation_, so my mistake was trying to apply it in places
where the allocation size is not retained, and to shoe-horn it into the
"used" tracking member.
Any opposition to adding such a field here, maybe "avail_channels"?
-Kees
--
Kees Cook
next prev parent reply other threads:[~2025-07-15 5:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-14 12:21 [PATCH wireless] wifi: cfg80211: remove scan request n_channels counted_by Johannes Berg
2025-07-15 5:04 ` Kees Cook [this message]
2025-07-15 8:24 ` Johannes Berg
2025-07-18 0:05 ` Kees Cook
2025-07-18 8:26 ` Johannes Berg
2025-07-21 18:36 ` Review of __counted_by in wireless (was Re: [PATCH wireless] wifi: cfg80211: remove scan request n_channels counted_by) Kees Cook
2025-07-21 18:52 ` Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202507142200.D315742C@keescook \
--to=kees@kernel.org \
--cc=johannes.berg@intel.com \
--cc=johannes@sipsolutions.net \
--cc=lihaoyu499@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=syzbot+e834e757bd9b3d3e1251@syzkaller.appspotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.