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:	Sun, 12 Apr 2009 19:25:36 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Cyrill Gorcunov <gorcunov@...nvz.org>
Cc:	hpa@...or.com, tglx@...utronix.de, xemul@...nvz.org,
	yhlu.kernel@...il.com, linux-kernel@...r.kernel.org,
	macro@...ux-mips.org, andi@...stfloor.org
Subject: Re: [rfc 1/4] x86: irq.c - tiny cleanup


* Cyrill Gorcunov <gorcunov@...nvz.org> wrote:

> Impact: cleanup
> 
> 1) guard ack_bad_irq with printk_ratelimit since there is no
>    guarantee we will not be flooded one day
> 2) use pr_emerg helper
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov@...nvz.org>
> ---
>  arch/x86/kernel/irq.c |    9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> Index: linux-2.6.git/arch/x86/kernel/irq.c
> =====================================================================
> --- linux-2.6.git.orig/arch/x86/kernel/irq.c
> +++ linux-2.6.git/arch/x86/kernel/irq.c
> @@ -24,7 +24,8 @@ void (*generic_interrupt_extension)(void
>   */
>  void ack_bad_irq(unsigned int irq)
>  {
> -	printk(KERN_ERR "unexpected IRQ trap at vector %02x\n", irq);
> +	if (printk_ratelimit())
> +		pr_err("unexpected IRQ trap at vector %02x\n", irq);

Btw, this is not so theoretical - in the past i've had bugs where a 
flood of these messages made the system unusable. (granted, it would 
have been unusable even with rate-limiting - but it's still nice to 
have a throttle in place for something like this.)

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