lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 25 Feb 2022 17:57:20 +0100
From:   Petr Machata <petrm@...dia.com>
To:     Jakub Kicinski <kuba@...nel.org>
CC:     Petr Machata <petrm@...dia.com>, Ido Schimmel <idosch@...dia.com>,
        <netdev@...r.kernel.org>, <davem@...emloft.net>, <jiri@...dia.com>,
        <razor@...ckwall.org>, <roopa@...dia.com>, <dsahern@...il.com>,
        <andrew@...n.ch>, <mlxsw@...dia.com>
Subject: Re: [PATCH net-next 03/14] net: rtnetlink: RTM_GETSTATS: Allow
 filtering inside nests


Jakub Kicinski <kuba@...nel.org> writes:

> On Fri, 25 Feb 2022 09:22:19 +0100 Petr Machata wrote:
>> > Why use bitfield if we only use the .value, a u32 would do?  
>> 
>> The bitfield validates the mask as well, thereby making sure that
>> userspace and the kernel are in sync WRT which bits are meaningful.
>> 
>> Specifically in case of filtering, all meaningful bits are always going
>> to be the set ones. So it should be OK to just handroll the check that
>> value doesn't include any bits that we don't know about, and we don't
>> really need the mask.
>
> Nothing that NLA_POLICY_MASK() can't do, right?

I see, so no need to even handroll.

> Or do you mean that we can when user space requests _not_ to have a
> group reported?

Can't parse this, but I do not think unset bit X will mean anything else
than "do not include X+1 in the response".

>> So I can redo this as u32 if you prefer.
>
> I think that'd be better, simplest tool for the job.

NP.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ