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:   Sat, 24 Nov 2018 18:20:20 +0200
From:   nikolay@...ulusnetworks.com
To:     Andrew Lunn <andrew@...n.ch>
CC:     netdev@...r.kernel.org, roopa@...ulusnetworks.com,
        davem@...emloft.net, bridge@...ts.linux-foundation.org
Subject: Re: [PATCH net-next v2 3/3] net: bridge: export supported boolopts

On 24 November 2018 18:16:47 EET, Andrew Lunn <andrew@...n.ch> wrote:
>On Sat, Nov 24, 2018 at 04:34:22AM +0200, Nikolay Aleksandrov wrote:
>> Now that we have at least one bool option, we can export all of the
>> supported bool options via optmask when dumping them.
>> 
>Hi Nik
>
>That answers my question then...
>
>I'm assuming this means there is no easy way to generate a bitmask of
>0? So you waited until there was at least one bit.
>
>(1 << 2) - 1 = 3
>(1 << 1) - 1 = 1
>(1 << 0) - 1 = 0
>
>So does 
>
>GENMASK((BR_BOOLOPT_MAX - 1), 0);
>
>really not do the right thing when BR_BOOLOPT_MAX = 1?
>

GENMASK(0, 0) = 1
the minus is done before the shift. 
Think of it of setting all bits from 0 to MAX - 1 inclusive. 

>       Andrew


-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ