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]
Message-ID: <20150403172148.GB13598@lerouge>
Date:	Fri, 3 Apr 2015 19:21:49 +0200
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	Rik van Riel <riel@...hat.com>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Dave Jones <davej@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Oleg Nesterov <oleg@...hat.com>,
	"Paul E . McKenney" <paulmck@...ux.vnet.ibm.com>,
	Ingo Molnar <mingo@...nel.org>
Subject: Re: [PATCH 2/3] context_tracking: Inherit TIF_NOHZ through forks
 instead of context switches

On Thu, Apr 02, 2015 at 03:11:20PM -0400, Rik van Riel wrote:
> On 04/02/2015 03:09 PM, Peter Zijlstra wrote:
> > On Thu, Apr 02, 2015 at 07:39:24PM +0200, Frederic Weisbecker wrote:
> >> TIF_NOHZ is used by context_tracking to force syscall slow-path on every
> >> task in order to track userspace roundtrips. As such, it must be set on
> >> all running tasks.
> >>
> >> It's currently explicitly inherited through context switches. There is
> >> no need to do it on this fast-path though. The flag could be simply
> >> set once for all on all tasks, whether they are running or not.
> >>
> >> Lets do this by setting the flag to init task on early boot and let it
> >> propagate through fork inheritance.
> >>
> > 
> > One must ask, what's the point of the flag if everybody must always have
> > it set?
> 
> We already test this word full of flags in the syscall
> entry and exit path.
> 
> Testing this same word for an additional flag is cheaper
> than testing a different variable.
> 
> See the places in entry_{32,64}.S where do_notify_resume,
> syscall_trace_enter, syscall_trace_leave, etc get called.
> All are called as a result of testing flags in the same
> word.

Indeed, we could add another check for a global flag but that's going
to bloat the syscall fastpath.
--
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