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]
Message-ID: <Y/6LQH4hU/gYROKO@lore-desk>
Date:   Wed, 1 Mar 2023 00:16:16 +0100
From:   Lorenzo Bianconi <lorenzo@...nel.org>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     netdev@...r.kernel.org, bpf@...r.kernel.org, davem@...emloft.net,
        edumazet@...gle.com, pabeni@...hat.com, ast@...nel.org,
        daniel@...earbox.net, hawk@...nel.org, john.fastabend@...il.com,
        saeedm@...dia.com, tariqt@...dia.com, leon@...nel.org,
        shayagr@...zon.com, akiyano@...zon.com, darinzon@...zon.com,
        sgoutham@...vell.com, lorenzo.bianconi@...hat.com, toke@...hat.com
Subject: Re: [RFC net-next 1/6] tools: ynl: fix render-max for flags
 definition

> On Thu, 23 Feb 2023 13:11:33 +0100 Lorenzo Bianconi wrote:
> > +                if const['type'] == 'flags':
> > +                    max_name = c_upper(name_pfx + 'mask')
> > +                    max_val = f' = {(entry.user_value() << 1) - 1},'
> > +                    cw.p(max_name + max_val)
> 
> Could you use EnumSet::get_mask instead() ?

ack, I will fix it.

> 
> I think it also needs to be fixed to actually walk the elements 
> and combine the user_value()s rather than count them and assume
> there are no gaps.

Do you mean get_mask()?

Regards,
Lorenzo

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ