lkml.org 
[lkml]   [2020]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 6/7] genirq: Provide interrupt injection mechanism
On 2020-03-06 13:03, Thomas Gleixner wrote:
> Error injection mechanisms need a half ways safe way to inject
> interrupts as
> invoking generic_handle_irq() or the actual device interrupt handler
> directly from e.g. a debugfs write is not guaranteed to be safe.
>
> On x86 generic_handle_irq() is unsafe due to the hardware trainwreck
> which
> is the base of x86 interrupt delivery and affinity management.
>
> Move the irq debugfs injection code into a separate function which can
> be
> used by error injection code as well.
>
> The implementation prevents at least that state is corrupted, but it
> cannot
> close a very tiny race window on x86 which might result in a stale and
> not
> serviced device interrupt under very unlikely circumstances.
>
> This is explicitly for debugging and testing and not for production use
> or
> abuse in random driver code.
>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

Acked-by: Marc Zyngier <maz@kernel.org>

M.
--
Jazz is not dead. It just smells funny...

\
 
 \ /
  Last update: 2020-03-06 14:52    [W:0.236 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site