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: <20230324204736.217e622b@kernel.org>
Date:   Fri, 24 Mar 2023 20:47:36 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Donald Hunter <donald.hunter@...il.com>
Cc:     netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Paolo Abeni <pabeni@...hat.com>,
        Jonathan Corbet <corbet@....net>, linux-doc@...r.kernel.org,
        donald.hunter@...hat.com
Subject: Re: [PATCH net-next v4 4/7] tools: ynl: Add fixed-header support to
 ynl

On Fri, 24 Mar 2023 19:18:57 +0000 Donald Hunter wrote:
> diff --git a/Documentation/netlink/genetlink-legacy.yaml b/Documentation/netlink/genetlink-legacy.yaml
> index d50c78b9f42d..3b8984122383 100644
> --- a/Documentation/netlink/genetlink-legacy.yaml
> +++ b/Documentation/netlink/genetlink-legacy.yaml
> @@ -261,6 +261,13 @@ properties:
>        async-enum:
>          description: Name for the enum type with notifications/events.
>          type: string
> +      # Start genetlink-legacy
> +      fixed-header: &fixed-header
> +        description: |
> +          Name of the structure defininig the optional fixed-length protocol header. This header is

Typo in 'defininig', could you also wrap at 80 chars?
Old school kernel style.

> +          placed in a message after the netlink and genetlink headers and before any attributes.
> +        type: string
> +      # End genetlink-legacy

>  class GenlMsg:
> -    def __init__(self, nl_msg):
> +    def __init__(self, nl_msg, fixed_header_members = []):

spaces around = or no spaces? I don't really know myself but I'm used
to having no spaces.

> @@ -540,7 +555,7 @@ class YnlFamily(SpecFamily):
>                          print('Unexpected message: ' + repr(gm))
>                          continue
>  
> -                rsp.append(self._decode(gm.raw_attrs, op.attr_set.name))
> +                rsp.append(self._decode(gm.raw_attrs, op.attr_set.name) | gm.fixed_header_attrs)

nit: also line wrap?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ