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: <20240913213941.5b76c22e@kernel.org>
Date: Fri, 13 Sep 2024 21:39:41 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Asbjørn Sloth Tønnesen
 <ast@...erby.net>
Cc: Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
 David Ahern <dsahern@...nel.org>, Matthieu Baerts <matttbe@...nel.org>, Mat
 Martineau <martineau@...nel.org>, Geliang Tang <geliang@...nel.org>, "David
 S. Miller" <davem@...emloft.net>, Donald Hunter <donald.hunter@...il.com>,
 netdev@...r.kernel.org, mptcp@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next] tools: ynl-gen: use big-endian netlink
 attribute types

Nice improvement! Since it technically missed net-next closing by a few
hours, let me nit pick a little..

On Fri, 13 Sep 2024 08:55:54 +0000 Asbjørn Sloth Tønnesen wrote:
> diff --git a/tools/net/ynl/ynl-gen-c.py b/tools/net/ynl/ynl-gen-c.py
> index 717530bc9c52e..e26f2c3c40891 100755
> --- a/tools/net/ynl/ynl-gen-c.py
> +++ b/tools/net/ynl/ynl-gen-c.py
> @@ -48,6 +48,7 @@ class Type(SpecAttr):
>          self.attr = attr
>          self.attr_set = attr_set
>          self.type = attr['type']
> +        self.nla_type = self.type

is it worth introducing nla_type as Type attribute just for one user?
inside a netlink code generator meaning of nla_type may not be crystal
clear

>          self.checks = attr.get('checks', {})
>  
>          self.request = False
> @@ -157,7 +158,7 @@ class Type(SpecAttr):
>          return '{ .type = ' + policy + ', }'
>  
>      def attr_policy(self, cw):
> -        policy = c_upper('nla-' + self.attr['type'])
> +        policy = c_upper('nla-' + self.nla_type)

We could just swap the type directly here?
-- 
pw-bot: defer

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ