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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m1ir53gev4.fsf@ebiederm.dsl.xmission.com>
Date:	Fri, 19 Oct 2007 12:04:47 -0600
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	Jeff Garzik <jeff@...zik.org>
Cc:	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/9] irq-remove: core

Jeff Garzik <jeff@...zik.org> writes:

> commit 008b5fcf3c1d8456005de26ddd4256b1369225e8
> Author: Jeff Garzik <jeff@...zik.org>
> Date:   Fri Oct 19 00:45:51 2007 -0400
>
>     [IRQ ARG REMOVAL] core interrupt delivery infrastructure updates
>
>  include/asm-generic/irq_regs.h |   25 +++++++++++++++++++++++++
>  include/linux/interrupt.h      |    4 ++--
>  kernel/irq/handle.c            |    5 +++--
>  kernel/irq/manage.c            |    4 ++--
>  kernel/irq/spurious.c          |    3 ++-
>  lib/irq_regs.c                 |    5 +++++
>  6 files changed, 39 insertions(+), 7 deletions(-)
>
> 008b5fcf3c1d8456005de26ddd4256b1369225e8
> diff --git a/include/asm-generic/irq_regs.h b/include/asm-generic/irq_regs.h
> index 5ae1d07..1d99ef4 100644
> --- a/include/asm-generic/irq_regs.h
> +++ b/include/asm-generic/irq_regs.h
> @@ -34,4 +34,29 @@ static inline struct pt_regs *set_irq_regs(struct pt_regs
> *new_regs)
>  	return old_regs;
>  }
>  
> +DECLARE_PER_CPU(unsigned int, __irqfunc_irqs);
> +
> +static inline unsigned int get_irqfunc_irq(void)
> +{
> +	return __get_cpu_var(__irqfunc_irqs);
> +}
> +
> +#if 0
> +static inline unsigned int set_irqfunc_irq(unsigned int new_irq)
> +{
> +	unsigned int old_irq, *pirq = &__get_cpu_var(__irqfunc_irqs);
> +
> +	old_irq = *pirq;
> +	*pirq = new_irq;
> +	return old_irq;
> +}
> +#else
> +static inline void set_irqfunc_irq(unsigned int new_irq)
> +{
> +	int *pirq = &__get_cpu_var(__irqfunc_irqs);
> +
> +	*pirq = new_irq;
> +}
> +#endif

Please look at handle_IRQ_event.  Local irqs are enabled so irq
recursion can happen.  So not handling old_irq is a big nasty
bug.

Eric
-
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