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]
Date:	Mon, 27 Jul 2015 17:51:12 -0700
From:	Gregory Fong <gregory.0xf0@...il.com>
To:	Florian Fainelli <f.fainelli@...il.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	linux-mips@...ux-mips.org, Kevin Cernekee <cernekee@...il.com>,
	jason@...edaemon.net, tglx@...utronix.de,
	bcm-kernel-feedback-list <bcm-kernel-feedback-list@...adcom.com>,
	Brian Norris <computersforpeace@...il.com>
Subject: Re: [PATCH] irqchip: bcm7120-l2: Fix interrupt status for multiple
 parent IRQs

On Thu, Jul 23, 2015 at 3:52 PM, Florian Fainelli <f.fainelli@...il.com> wrote:
> Our irq-bcm7120-l2 interrupt controller driver utilizes the same handler
> function for the different parent interrupts it services: UPG_MAIN, UPG_BSC for
> instance.
>
> The problem is that function reads the IRQSTAT register which can combine
> interrupt causes for different parent interrupts, such that we can end-up in
> the following situation:
>
> - CPU takes an interrupt
> - bcm7120_l2_intc_irq_handle() reads IRQSTAT
> - generic_handle_irq() is invoked
> - there are still pending interrupts flagged in IRQSTAT from a different parent
> - handle_bad_irq() is invoked for these since they come from a different irq_desc/irq
>
> In order to fix this, make sure that we always mask IRQSTAT with the
> appropriate bits that correspond go the parent interrupt source this is coming
> from. To simplify things, associate an unique structure per parent interrupt
> handler to avoid multiplying the number of lookups.
>
> Fixes: a5042de2688d ("irqchip: bcm7120-l2: Add Broadcom BCM7120-style Level 2 interrupt controller")
> Signed-off-by: Florian Fainelli <f.fainelli@...il.com>

Acked-by: Gregory Fong <gregory.0xf0@...il.com>

> ---
>  drivers/irqchip/irq-bcm7120-l2.c | 51 ++++++++++++++++++++++++++++++----------
>  1 file changed, 39 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/irqchip/irq-bcm7120-l2.c b/drivers/irqchip/irq-bcm7120-l2.c
> index 3ba5cc780fcb..8302d45d13ac 100644
> --- a/drivers/irqchip/irq-bcm7120-l2.c
> +++ b/drivers/irqchip/irq-bcm7120-l2.c
> @@ -47,14 +47,20 @@ struct bcm7120_l2_intc_data {
>         struct irq_domain *domain;
>         bool can_wake;
>         u32 irq_fwd_mask[MAX_WORDS];
> -       u32 irq_map_mask[MAX_WORDS];
> +       struct bcm7120_l1_intc_data *l1_data;
>         int num_parent_irqs;
>         const __be32 *map_mask_prop;
>  };
>
> +struct bcm7120_l1_intc_data {
> +       struct bcm7120_l2_intc_data *b;
> +       u32 irq_map_mask[MAX_WORDS];
> +};

I'm not sure the name bcm7120_l1_intc_data is a good name for this,
but I can't think of a better one, and it really doesn't matter that
much.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ