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: <ZSY7kHSLKMgXk9Ao@nanopsycho>
Date: Wed, 11 Oct 2023 08:07:12 +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, jacob.e.keller@...el.com,
	johannes@...solutions.net
Subject: Re: [patch net-next 02/10] tools: ynl-gen: introduce support for
 bitfield32 attribute type

Tue, Oct 10, 2023 at 08:58:04PM CEST, kuba@...nel.org wrote:
>On Tue, 10 Oct 2023 13:08:21 +0200 Jiri Pirko wrote:
>> Introduce support for forgotten attribute type bitfield32.
>
>s/forgotten//, no family need it so far
>
>> Note that since the generated code works with struct nla_bitfiel32,
>> the generator adds netlink.h to the list of includes for userspace
>> headers. Regenerate the headers.
>
>If all we need it for is bitfield32 it should be added dynamically.
>bitfiled32 is an odd concept.

What do you mean by "added dynamically"?


>
>> diff --git a/Documentation/netlink/genetlink-c.yaml b/Documentation/netlink/genetlink-c.yaml
>> index f9366aaddd21..8192b87b3046 100644
>> --- a/Documentation/netlink/genetlink-c.yaml
>> +++ b/Documentation/netlink/genetlink-c.yaml
>> @@ -144,7 +144,7 @@ properties:
>>                name:
>>                  type: string
>>                type: &attr-type
>> -                enum: [ unused, pad, flag, binary, u8, u16, u32, u64, s32, s64,
>> +                enum: [ unused, pad, flag, binary, bitfield32, u8, u16, u32, u64, s32, s64,
>>                          string, nest, array-nest, nest-type-value ]
>
>Just for genetlink-legacy, please.

Why? Should be usable for all, same as other types, no?


>Also I think you need to update Documentation.
>
>> +class TypeBitfield32(Type):
>> +    def arg_member(self, ri):
>> +        return [f"const struct nla_bitfield32 *{self.c_name}"]
>> +
>> +    def struct_member(self, ri):
>> +        ri.cw.p(f"struct nla_bitfield32 {self.c_name};")
>
>I think that you can re-implement _complex_member_type() instead
>of these two?

Will check.

>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ