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, 02 May 2022 10:31:11 +0100
From:   Marc Zyngier <maz@...nel.org>
To:     Marek BehĂșn <kabel@...nel.org>
Cc:     linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
        pali@...nel.org
Subject: Re: irqdomain API: how to set affinity of parent irq of chained irqs?

On Mon, 02 May 2022 09:21:37 +0100,
Marek BehĂșn <kabel@...nel.org> wrote:
> 
> Dear Marc, Thomas,
> 
> we have encountered the following problem that can hopefully be put
> some light onto: What is the intended way to set affinity (and possibly
> other irq attributes) of parent IRQ of chained IRQs, when using the
> irqdomain API?

Simples: you can't. What sense does it make to change the affinity of
the parent interrupt, given that its fate is tied to *all* of the
other interrupts that are muxed to it?

Moving the parent interrupt breaks userspace's view of how interrupt
affinity is managed (change the affinity of one interrupt, see all the
others move the same way). Which is why we don't expose this interrupt
to userspace, as this can only lead to bad things.

Note that this has nothing to do with the irqdomain API, but
everything to do with the userspace ABI.

> 
> We are working on a driver that
> - registers an irqchip and adds an irqdomain
> - calls irq_set_chained_handler_and_data(parent_irq, handler)
>   where handler triggers handling of child IRQs
> - but since parent_irq isn't requested for with request_thread_irq(),
>   it does not show up in proc/sysfs, only in debugfs
> - the HW does not support setting affinity for the chained IRQs, only 
>   the parent (which comes from a GIC chip)
> 
> The problem is that he parent IRQ, as mentioned in the third point, does
> not show up in proc/sysfs.
> 
> Is there some precedent for this?

There were precedents of irqchips doing terrible things, such as
implementing a set_affinity() callback in the chained irqchip.
Thankfully, they have been either fixed or eradicated.

	M.

-- 
Without deviation from the norm, progress is not possible.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ