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: Mon, 18 Dec 2023 14:22:09 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Hangbin Liu <liuhangbin@...il.com>
Cc: netdev@...r.kernel.org, Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net-next 1/3] tools: ynl-gen: use correct len for string
 and binary

On Sat, 16 Dec 2023 16:35:40 +0800 Hangbin Liu wrote:
> The max-len / min-len / extact-len micro are used by binary. For string we
> need to use "len" to define the max length. e.g.
> 
> static const struct nla_policy
> team_nl_option_policy[TEAM_ATTR_OPTION_MAX + 1] = {
>         [TEAM_ATTR_OPTION_UNSPEC]               = { .type = NLA_UNSPEC, },
>         [TEAM_ATTR_OPTION_NAME] = {
>                 .type = NLA_STRING,
>                 .len = TEAM_STRING_MAX_LEN,
>         },

max-len / min-len / extact-len are just the names in the spec.
We can put the value provided in the spec as max-len inside
nla_policy as len, given that for string spec::max-len == policy::len 

Am I confused? 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ