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]
Date:	Wed, 02 Feb 2011 17:24:56 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Thomas Gleixner <tglx@...utronix.de>
Cc:	LKML <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...e.hu>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Heiko Carstens <heiko.carstens@...ibm.com>,
	David Miller <davem@...emloft.net>,
	Paul Mundt <lethal@...ux-sh.org>
Subject: Re: [PATCH] softirq: Avoid stack switch from ksoftirqd

On Wed, 2011-02-02 at 17:10 +0100, Thomas Gleixner wrote:
> ksoftirqd() calls do_softirq() which switches stacks on several
> architectures. That makes no sense at all. ksoftirqd's stack is
> sufficient.
> 
> Call __do_softirq() directly.
> 
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>

Acked-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>

> ---
>  kernel/softirq.c |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> Index: linux-2.6-tip/kernel/softirq.c
> ===================================================================
> --- linux-2.6-tip.orig/kernel/softirq.c
> +++ linux-2.6-tip/kernel/softirq.c
> @@ -738,7 +738,10 @@ static int run_ksoftirqd(void * __bind_c
>  			   don't process */
>  			if (cpu_is_offline((long)__bind_cpu))
>  				goto wait_to_die;
> -			do_softirq();
> +			local_irq_disable();
> +			if (local_softirq_pending())
> +				__do_softirq();
> +			local_irq_enable();
>  			preempt_enable_no_resched();
>  			cond_resched();
>  			preempt_disable();



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