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: <ZR5kbsUGuRB3dYWD@nanopsycho>
Date: Thu, 5 Oct 2023 09:23:26 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: Jakub Kicinski <kuba@...nel.org>
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

Thu, Oct 05, 2023 at 02:12:02AM CEST, kuba@...nel.org wrote:
>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?

I have no clue. I know very little about json schema. I can take a look.


Powered by blists - more mailing lists