[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fhgill32gd3ugmd23oxnyvvqqfd3feu4zv3ecrkubeyqhwnb2h@pkflwiezmsp2>
Date: Thu, 30 Jan 2025 22:23:30 +0300
From: Fedor Pchelkin <pchelkin@...ras.ru>
To: Johannes Berg <johannes@...solutions.net>
Cc: Vitaliy Shevtsov <v.shevtsov@...integration.ru>,
lvc-project@...uxtesting.org, Michael Wu <flamingice@...rmilk.net>,
linux-wireless@...r.kernel.org, "John W. Linville" <linville@...driver.com>,
linux-kernel@...r.kernel.org, syzbot+2e5c1e55b9e5c28a3da7@...kaller.appspotmail.com
Subject: Re: [lvc-project] [PATCH] wifi: nl80211: override all other flags if
MONITOR_FLAG_COOK_FRAMES is set
On Thu, 30. Jan 13:36, Johannes Berg wrote:
> On Thu, 2025-01-30 at 17:34 +0500, Vitaliy Shevtsov wrote:
> > It is possible to set both MONITOR_FLAG_COOK_FRAMES and MONITOR_FLAG_ACTIVE
> > flags simultaneously on the same monitor interface from the userspace. This
> > causes a sub-interface to be created with no IEEE80211_SDATA_IN_DRIVER bit
> > set because the monitor interface is in the cooked state and it takes
> > precedence over all other states. When the interface is then being deleted
> > the kernel calls WARN_ONCE() from check_sdata_in_driver() because of missing
> > that bit.
> >
> > Fix this by overriding all flags if MONITOR_FLAG_COOK_FRAMES is set because
> > this flag is incompatible with other monitor flags being set.
> >
>
> That seems wrong, reject it instead. Anyway we should probably remove
> cooked mode.
Do you suggest rejecting to set MONITOR_FLAG_COOK_FRAMES overall?
Wouldn't it break existing userspace, especially in context of systems
running old stable kernels where the patch is also needed?
There is still some usage of this flag in hostap [1].
Or your suggestion is to explicitly reject setting MONITOR_FLAG_COOK_FRAMES
only when it is passed combined with some other flags which it is
incompatible with?
Btw, the fragment [2] says the cooked flag overrides the other ones.
But it was written a long time ago so many things have changed I guess.
/**
* enum nl80211_mntr_flags - monitor configuration flags
*
* Monitor configuration flags.
...
* @NL80211_MNTR_FLAG_COOK_FRAMES: report frames after processing.
* overrides all other flags.
[1]: https://w1.fi/cgit/hostap/tree/src/drivers/driver_nl80211.c#n6209
[2]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/nl80211.h#n4731
--
Thanks,
Fedor
Powered by blists - more mailing lists