[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1cce66bc-af3f-97d8-f898-130e81fcfcff@kernel.org>
Date: Wed, 20 Dec 2023 11:47:17 -0800 (PST)
From: Mat Martineau <martineau@...nel.org>
To: Ido Schimmel <idosch@...dia.com>
cc: netdev@...r.kernel.org, mptcp@...ts.linux.dev, davem@...emloft.net,
kuba@...nel.org, pabeni@...hat.com, edumazet@...gle.com,
nhorman@...driver.com, matttbe@...nel.org, yotam.gi@...il.com,
jiri@...nulli.us, jacob.e.keller@...el.com, johannes@...solutions.net,
andriy.shevchenko@...ux.intel.com, fw@...len.de
Subject: Re: [PATCH net-next v2] genetlink: Use internal flags for multicast
groups
On Wed, 20 Dec 2023, Ido Schimmel wrote:
> As explained in commit e03781879a0d ("drop_monitor: Require
> 'CAP_SYS_ADMIN' when joining "events" group"), the "flags" field in the
> multicast group structure reuses uAPI flags despite the field not being
> exposed to user space. This makes it impossible to extend its use
> without adding new uAPI flags, which is inappropriate for internal
> kernel checks.
>
> Solve this by adding internal flags (i.e., "GENL_MCAST_*") and convert
> the existing users to use them instead of the uAPI flags.
>
> Tested using the reproducers in commit 44ec98ea5ea9 ("psample: Require
> 'CAP_NET_ADMIN' when joining "packets" group") and commit e03781879a0d
> ("drop_monitor: Require 'CAP_SYS_ADMIN' when joining "events" group").
>
> No functional changes intended.
>
> Signed-off-by: Ido Schimmel <idosch@...dia.com>
> ---
> v2:
> * Add a comment for each flag
> ---
> include/net/genetlink.h | 9 ++++++---
> net/core/drop_monitor.c | 2 +-
> net/mptcp/pm_netlink.c | 2 +-
Thanks Ido.
For the mptcp change:
Reviewed-by: Mat Martineau <martineau@...nel.org>
> net/netlink/genetlink.c | 4 ++--
> net/psample/psample.c | 2 +-
> 5 files changed, 11 insertions(+), 8 deletions(-)
Powered by blists - more mailing lists