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: <20230612-corny-march-372b42c8b9d9@wendy>
Date:   Mon, 12 Jun 2023 14:26:51 +0100
From:   Conor Dooley <conor.dooley@...rochip.com>
To:     Marc Zyngier <maz@...nel.org>
CC:     Thomas Gleixner <tglx@...utronix.de>,
        <linux-kernel@...r.kernel.org>, <conor@...nel.org>,
        <daire.mcnamara@...rochip.com>
Subject: Re: Potential issue with (or misunderstanding of) of_irq_get()

On Thu, Jun 08, 2023 at 02:29:47PM +0100, Conor Dooley wrote:
> On Mon, May 22, 2023 at 12:56:30PM +0100, Conor Dooley wrote:
> > On Sun, May 21, 2023 at 01:38:11PM +0100, Marc Zyngier wrote:

> Sounds like it may be the latter... The hierarchical stuff for the
> direct interrupts is working well, so progress at least. I seem to
> have gotten stuck with the non-direct/muxxed interrupts though.
> 
> My alloc() now looks like, for the direct interrupts:
> static int mpfs_irq_mux_alloc(struct irq_domain *d, unsigned int virq,
> 				     unsigned int nr_irqs, void *arg)
> {
> 	struct mpfs_irq_mux *priv = d->host_data;
> 	struct irq_fwspec *fwspec = arg;
> 	struct irq_fwspec parent_fwspec;
> 	int ret;
> 
> 	pr_info("attempting to allocate\n");
> 	ret = mpfs_irq_mux_is_direct_get_mapping(priv, fwspec);
> 	if (ret == -EINVAL) {
> 		irq_domain_disconnect_hierarchy(d, virq);

A weekend & sufficient caffeine later and I've realised that this
should probably be disconnecting the parent...
Modulo WIP bodging, things seem to be working. Touch wood it doesn't
collapse in a heap when the bodges are cleaned up.


> 	}
> 
> 	parent_fwspec.fwnode = d->parent->fwnode;
> 	parent_fwspec.param[0] = priv->parent_irqs[ret];
> 	parent_fwspec.param_count = 1;
> 
> 	ret = irq_domain_alloc_irqs_parent(d, virq, 1, &parent_fwspec);
> 	if (ret)
> 		return ret;
> 
> 	irq_domain_set_hwirq_and_chip(d, virq, fwspec->param[0],
> 				      &mpfs_irq_mux_irq_chip, priv);
> 
> 	return 0;
> }

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ