Re: [PATCH v4 1/6] netlink: Reverse the patch which removed filtering

From: Jakub Kicinski
Date: Sat Apr 01 2023 - 15:12:20 EST


On Sat, 1 Apr 2023 18:24:11 +0000 Anjali Kulkarni wrote:
> > nit: slight divergence between __u32 and u32 types, something to clean
> > up if you post v5
>
> Thanks so much! Will do. Any comments on the connector patches?

patch 3 looks fine as far as I can read thru the ugly in place casts
patch 5 looks a bit connector specific, no idea :S
patch 6 does seem to lift the NET_ADMIN for group 0
and from &init_user_ns, CAP_NET_ADMIN to net->user_ns, CAP_NET_ADMIN
whether that's right or not I have no idea :(

Also, BTW, on the coding level:

+static int cn_bind(struct net *net, int group)
+{
+ unsigned long groups = 0;
+ groups = (unsigned long) group;
+
+ if (test_bit(CN_IDX_PROC - 1, &groups))

Why not just

+static int cn_bind(struct net *net, int group)
+{
+ if (group == CN_IDX_PROC)

?

Who are you hoping will merge this?