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]
Date:   Mon, 17 Sep 2018 14:27:31 +0100
From:   Marc Zyngier <marc.zyngier@....com>
To:     Guo Ren <ren_guo@...ky.com>
Cc:     <tglx@...utronix.de>, <jason@...edaemon.net>, <robh+dt@...nel.org>,
        <mark.rutland@....com>, <linux-kernel@...r.kernel.org>,
        <devicetree@...r.kernel.org>
Subject: Re: [PATCH V5 1/3] irqchip: add C-SKY irqchip drivers

On Mon, 17 Sep 2018 03:09:29 +0100,
Guo Ren <ren_guo@...ky.com> wrote:

[...]

> > > +
> > > +	irq_set_default_host(root_domain);
> > 
> > Please drop this. There is no reason to use this on any modern, DT
> > based architecture.
> Please let me keep this and in my arch/csky/kernel/smp.c:
> 
> void __init setup_smp_ipi(void)
> {
> 	...
> 	irq_create_mapping(NULL, IPI_IRQ);

This looks quite wrong. Reading the code at
https://lkml.org/lkml/2018/9/12/674, it really looks like you're
assuming that IPI_IRQ will be mapped to a Linux IRQ with the same
number. Nothing could be farther from the truth.

The Linux IRQ is returned as the result of irq_create_mapping, which
you're ignoring. You'd be better off creating this mapping from the
irqchip code, and expose the resulting Linux IRQ to oyu SMP code by
any mean of your choice (such as moving the send_ipi_message into the
irqchip code as well).

> 
> I need irq_set_default_host to pass the domain and this api is used by
> a lot of drivers:
> 
> $ grep irq_set_default_host drivers/irqchip -r | wc -l
> 16

These are all legacy calls, and predates DT conversion. In a number of
cases, these calls could be removed.

> In future we could find a better solution.

I respectfully disagree. There is strictly no reason to merge a new
architecture relying on deprecated features, specially as the code
appears to be buggy. Now is the right time to fix it.

Thanks,

	M.

-- 
Jazz is not dead, it just smell funny.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ