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]
Message-ID: <alpine.DEB.2.20.1801172251280.2326@nanos>
Date:   Wed, 17 Jan 2018 22:54:11 +0100 (CET)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     David Miller <davem@...emloft.net>
cc:     torvalds@...ux-foundation.org, efault@....de, peterz@...radead.org,
        edumazet@...gle.com, dima@...sta.com, frederic@...nel.org,
        linux-kernel@...r.kernel.org, 0x7f454c46@...il.com,
        akpm@...ux-foundation.org, fweisbec@...il.com,
        hannes@...essinduktion.org, mingo@...nel.org,
        alexander.levin@...izon.com, pabeni@...hat.com,
        paulmck@...ux.vnet.ibm.com, rrendec@...sta.com, riel@...hat.com,
        sgruszka@...hat.com, wanpeng.li@...mail.com
Subject: Re: [RFC 1/2] softirq: Defer net rx/tx processing to ksoftirqd
 context

On Wed, 17 Jan 2018, David Miller wrote:

> From: Linus Torvalds <torvalds@...ux-foundation.org>
> Date: Wed, 17 Jan 2018 13:06:58 -0800
> 
> > It was in some way always a "poor mans interrupt thread" (with no
> > blocking like a real thread context, but at least not impacting actual
> > interrupt latency).
> 
> Or in this loopback device case (and tunnel decapsulation) a poor
> man's longjmp, releasing the current stack frame to keep the depth
> in check.
> 
> Anyways...
> 
> > That said, this made me wonder a bit. I wonder how bounded the latency
> > is for raising a softirq from process context. We only _check_ the
> > softirq on the last hardirq exit, I think.
> 
> System call return checks it, otherwise this situation would be
> completely bolixed.

Errm. No.

> 
> > I wonder if we should run softirqs on return to user mode (and make
> > softirq set a thread flag if not in interrupt context).
> 
> I'm pretty sure we already do.

Nope.

raise_softirq() -> raise_softirq_irqoff()

	set_softirq_bit();

	if (!in_interrupt())
		wake_softirqd();

So if the caller is not in hard or soft interrupt context, which includes
bottom half disabled regions softirqd is woken.

If the caller is in a bottom half disabled region then local_bh_enable()
will run the pending softirqs.

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ