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: <a682824a-1b65-4b05-9e42-3edc167600a8@icloud.com>
Date: Tue, 11 Feb 2025 21:40:33 +0800
From: Zijun Hu <zijun_hu@...oud.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
 "Rob Herring (Arm)" <robh@...nel.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
 "Rafael J. Wysocki" <rafael@...nel.org>,
 Saravana Kannan <saravanak@...gle.com>, Len Brown <lenb@...nel.org>,
 Daniel Scally <djrscally@...il.com>,
 Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
 Sakari Ailus <sakari.ailus@...ux.intel.com>, linux-acpi@...r.kernel.org,
 devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
 Zijun Hu <quic_zijuhu@...cinc.com>
Subject: Re: [PATCH v3] of: property: Increase NR_FWNODE_REFERENCE_ARGS

On 2025/2/11 20:24, Andy Shevchenko wrote:
>>>> -#define NR_FWNODE_REFERENCE_ARGS	8
>>>> +#define NR_FWNODE_REFERENCE_ARGS	16
>>> Thinking of the case, perhaps you also want
>>>
>>> static_assert(NR_FWNODE_REFERENCE_ARGS == MAX_PHANDLE_ARGS);
>>>
>>> to be put somewhere, but I don't think we can do it in this header file.
>> thank you Andy for code review.
>>
>> yes. it seems there are good location to place the static_assert().
>>
>> is it okay to associate two macros by
>> #define MAX_PHANDLE_ARGS NR_FWNODE_REFERENCE_ARGS
> I was thinking about this and I don't see how it can be done without
> introducing more chaos (dependency hell) into the headers. So, I won't
> take this path or even consider it deeper.
> 

i have confirmed that:

of.h includes fwnode.h indirectly
fwnode.h does not include of.h directly or indirectly

in theory, dependency between both headers should also be like this.

So, it is simple to use below define in of.h
#define MAX_PHANDLE_ARGS NR_FWNODE_REFERENCE_ARGS

>> OR
>> replace all MAX_PHANDLE_ARGS instances with NR_FWNODE_REFERENCE_ARGS
>> ?
> This sounds plausible to me, but you need a blessing from OF people as
> the naming may be a bit confusing (for them) as "phandle" is well established
> term in OF realm.

phandle is a type of DT firmware node reference. so this solution
seems suitable as well.

struct software_node_ref_args also uses NR_FWNODE_REFERENCE_ARGS directly.

let us wait for more comments.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ