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: <045828bd-4aeb-4d8d-b152-44a816a07221@gmail.com>
Date: Fri, 7 Jun 2024 09:38:31 +0300
From: Matti Vaittinen <mazziesaccount@...il.com>
To: Thomas Gleixner <tglx@...utronix.de>,
 Matti Vaittinen <matti.vaittinen@...rohmeurope.com>
Cc: Lee Jones <lee@...nel.org>, Rob Herring <robh@...nel.org>,
 Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
 Conor Dooley <conor+dt@...nel.org>, Liam Girdwood <lgirdwood@...il.com>,
 Mark Brown <broonie@...nel.org>,
 Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
 "Rafael J. Wysocki" <rafael@...nel.org>,
 Wim Van Sebroeck <wim@...ux-watchdog.org>, Guenter Roeck
 <linux@...ck-us.net>, devicetree@...r.kernel.org,
 linux-kernel@...r.kernel.org, linux-watchdog@...r.kernel.org,
 Herve Codina <herve.codina@...tlin.com>
Subject: Re: [PATCH v3 07/10] irqdomain: Allow giving name suffix for domain

Hello Thomas, Herve.

On 6/6/24 21:59, Thomas Gleixner wrote:
> Matti!
> 
> On Tue, Jun 04 2024 at 10:55, Matti Vaittinen wrote:
>>   struct irq_domain *__irq_domain_add(struct fwnode_handle *fwnode, unsigned int size,
>>   				    irq_hw_number_t hwirq_max, int direct_max,
>>   				    const struct irq_domain_ops *ops,
>> -				    void *host_data);
>> +				    void *host_data, const char *name_suffix);
>>   struct irq_domain *irq_domain_create_simple(struct fwnode_handle *fwnode,
>>   					    unsigned int size,
>>   					    unsigned int first_irq,
>> @@ -350,7 +350,8 @@ static inline struct irq_domain *irq_domain_add_linear(struct device_node *of_no
>>   					 const struct irq_domain_ops *ops,
>>   					 void *host_data)
>>   {
>> -	return __irq_domain_add(of_node_to_fwnode(of_node), size, size, 0, ops, host_data);
>> +	return __irq_domain_add(of_node_to_fwnode(of_node), size, size, 0, ops,
>> +				host_data, NULL);
> 
> ....
> 
> Looking at the resulting amount of churn to add that argument, I'm not
> really enthused. There is some other unrelated change required in this
> area:
> 
>    https://lore.kernel.org/all/8734pr5yq1.ffs@tglx
> 
> My suggestion to convert all of this mess into a template based
> mechanism would nicely solve your problem too.

I am not entirely sure what you mean by template based in this context. 
My brains are somehow fixed to start thinking of C++ templates, or C 
macro magic with typeof() and I just can't get past that.

Anyways, what I picked from discussion between you and Herve, is using 
an initialization structure (struct irq_domain_info) for the new domain 
creation function (irq_domain_instantiate()) instead of adding bunch of 
functions with quite a few separate arguments. So, I assume you're 
referring to a possibility to add the name-suffix in this initialization 
structure? I hope I got this right.

I assume there is no intention to change the existing public 
irq_domain_creat_foo() APIs to use the new irq_domain_info - and change 
all the callers(?) But I think changing the internal 
__irq_domain_create() to use this new info struct should be very much 
doable - although, in my opinion, making existing callers of the 
__irq_domain_create() to assign their parameters to this struct so they 
can pass it to __irq_domain_create() does not seem so nice.

So, even though I am not really happy about the delay (I secretly hoped 
to get the series merged before my summer vacations ;) ) - I admit your 
suggested change looks cleaner (again, at least to me).

Herve, do you have any idea when you plan to do further sketching on 
this? Do you want me to try seeing if I can add the struct 
irq_domain_info and maybe use that in the __irq_domain_add() to get the 
name-suffix added? I might be able to send one version out during next 
week - but then I plan to be offline for couple of weeks ... so it may 
be I am not much of a help here.

> Can you please have a look and eventually team up with Herve (CC'ed) to
> sort this out? I'm happy to help and give guidance.

I appreciate the guidance! Thanks Thomas.

Yours,
	-- Matti

-- 
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland

~~ When things go utterly wrong vim users can always type :help! ~~


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ