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

From: Anjali Kulkarni
Date: Sat Apr 01 2023 - 15:59:00 EST




> On Apr 1, 2023, at 12:12 PM, Jakub Kicinski <kuba@xxxxxxxxxx> wrote:
>
> 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
Thanks for reviewing!
> 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 :(
I can move this back to &init_user_ns, and will look at group 0 too.
>
> 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)
>
> ?
Will change this.
>
> Who are you hoping will merge this?
I am not sure. Whom should I contact to move this forward?