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: <20230223090937.53103f89@kernel.org>
Date:   Thu, 23 Feb 2023 09:09:37 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Lorenzo Bianconi <lorenzo@...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() ?

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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ