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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231004171202.6e52bde3@kernel.org>
Date: Wed, 4 Oct 2023 17:12:02 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Jiri Pirko <jiri@...nulli.us>
Cc: netdev@...r.kernel.org, pabeni@...hat.com, davem@...emloft.net,
 edumazet@...gle.com, donald.hunter@...il.com
Subject: Re: [patch net-next v2 1/3] tools: ynl-gen: lift type requirement
 for attribute subsets

On Fri, 29 Sep 2023 15:47:40 +0200 Jiri Pirko wrote:
> --- a/tools/net/ynl/ynl-gen-c.py
> +++ b/tools/net/ynl/ynl-gen-c.py
> @@ -723,6 +723,8 @@ class AttrSet(SpecAttrSet):
>              self.c_name = ''
>  
>      def new_attr(self, elem, value):
> +        if 'type' not in elem:
> +            raise Exception(f"Type has to be set for attribute {elem['name']}")
>          if elem['type'] in scalars:
>              t = TypeScalar(self.family, self, elem, value)
>          elif elem['type'] == 'unused':

Can this still be enforced using JSON schema? Using dependencies 
to make sure that if subset-of is not present type is?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ