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] [day] [month] [year] [list]
Message-ID: <1ad2eb4b.68b90.18cd34a146c.Coremail.linma@zju.edu.cn>
Date: Thu, 4 Jan 2024 15:04:56 +0800 (GMT+08:00)
From: "Lin Ma" <linma@....edu.cn>
To: "Jeremy Kerr" <jk@...econstruct.com.au>
Cc: "Jakub Kicinski" <kuba@...nel.org>, matt@...econstruct.com.au, 
	davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com, 
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v1] net: mctp: use deprecated parser in
 mctp_set_link_af

Hello Jeremy,

> 
> Hi Lin,
> 
> > (1) will get AF_MCTP with nla_type(...) call, and (2) will then
> > passing `af` to `mctp_set_link_af`, which will expect the
> > `NLA_F_NESTED` flag.
> 
> You could set that flag? It's not exclusive with the attribute type.
> From netlink.h:
> 
>   /*
>    * nla_type (16 bits)
>    * +---+---+-------------------------------+
>    * | N | O | Attribute Type                |
>    * +---+---+-------------------------------+
>    * N := Carries nested attributes
>    * O := Payload stored in network byte order
>    *
>    * Note: The N and O flag are mutually exclusive.
>    */
> 
> Which is what we do with existing userspace:
> 
>   https://github.com/CodeConstruct/mctp/blob/6aa4b052d/src/mctp.c#L569C1-L569C1
> 
> Cheers,

Oops, my bad. Just know that the nla_type will mask with `NLA_TYPE_MASK`. 

Sorry for the bother. T^T

> 
> 
> Jeremy

Thanks
Lin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ