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:	Wed, 23 Dec 2015 19:42:14 -0800
From:	Josh Triplett <josh@...htriplett.org>
To:	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	Paul Turner <pjt@...gle.com>, Andrew Hunter <ahh@...gle.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Michael Kerrisk <mtk.manpages@...il.com>,
	Russell King <linux@....linux.org.uk>
CC:	linux-kernel@...r.kernel.org,
	Catalin Marinas <catalin.marinas@....com>,
	Will Deacon <will.deacon@....com>,
	Peter Zijlstra <peterz@...radead.org>,
	Andy Lutomirski <luto@...capital.net>,
	Andi Kleen <andi@...stfloor.org>,
	Dave Watson <davejwatson@...com>, Chris Lameter <cl@...ux.com>,
	Ingo Molnar <mingo@...hat.com>, Ben Maurer <bmaurer@...com>,
	Steven Rostedt <rostedt@...dmis.org>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-api@...r.kernel.org
Subject: Re: [RFC PATCH v2 2/3] thread_local_abi: wire up x86 32/64 system call

On December 22, 2015 10:02:12 AM PST, Mathieu Desnoyers <mathieu.desnoyers@...icios.com> wrote:
>Wire up the thread local ABI on x86 32/64. Call the
>thread_local_abi_handle_notify_resume() function on return to
>userspace if TIF_NOTIFY_RESUME thread flag is set.
>
>This provides an ABI improving the speed of a getcpu operation
>on x86 by removing the need to perform a function call, "lsl"
>instruction, or system call on the fast path.
>
>Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
>CC: Russell King <linux@....linux.org.uk>
>CC: Catalin Marinas <catalin.marinas@....com>
>CC: Will Deacon <will.deacon@....com>
>CC: Thomas Gleixner <tglx@...utronix.de>
>CC: Paul Turner <pjt@...gle.com>
>CC: Andrew Hunter <ahh@...gle.com>
>CC: Peter Zijlstra <peterz@...radead.org>
>CC: Andy Lutomirski <luto@...capital.net>
>CC: Andi Kleen <andi@...stfloor.org>
>CC: Dave Watson <davejwatson@...com>
>CC: Chris Lameter <cl@...ux.com>
>CC: Ingo Molnar <mingo@...hat.com>
>CC: Ben Maurer <bmaurer@...com>
>CC: Steven Rostedt <rostedt@...dmis.org>
>CC: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
>CC: Josh Triplett <josh@...htriplett.org>
>CC: Linus Torvalds <torvalds@...ux-foundation.org>
>CC: Andrew Morton <akpm@...ux-foundation.org>
>CC: Thomas Gleixner <tglx@...utronix.de>
>CC: linux-api@...r.kernel.org
>---
> arch/x86/entry/common.c                | 2 ++
> arch/x86/entry/syscalls/syscall_32.tbl | 1 +
> arch/x86/entry/syscalls/syscall_64.tbl | 1 +
> 3 files changed, 4 insertions(+)
>
>diff --git a/arch/x86/entry/common.c b/arch/x86/entry/common.c
>index a89fdbc..222cacf 100644
>--- a/arch/x86/entry/common.c
>+++ b/arch/x86/entry/common.c
>@@ -249,6 +249,8 @@ static void exit_to_usermode_loop(struct pt_regs
>*regs, u32 cached_flags)
> 		if (cached_flags & _TIF_NOTIFY_RESUME) {
> 			clear_thread_flag(TIF_NOTIFY_RESUME);
> 			tracehook_notify_resume(regs);
>+			if (thread_local_abi_active(current))
>+				thread_local_abi_handle_notify_resume(current);

Every caller seems likely to duplicate this pattern; why not make the call itself a static inline containing this check and call (or no-op if compiled out)?

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