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: <713900690.290718.1450970237981.JavaMail.zimbra@efficios.com>
Date:	Thu, 24 Dec 2015 15:17:17 +0000 (UTC)
From:	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To:	Josh Triplett <josh@...htriplett.org>
Cc:	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>,
	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>,
	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 <linux-api@...r.kernel.org>
Subject: Re: [RFC PATCH v2 2/3] thread_local_abi: wire up x86 32/64 system
 call

----- On Dec 23, 2015, at 10:42 PM, Josh Triplett josh@...htriplett.org wrote:

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

Very good point, I'll do that.

Thanks!

Mathieu

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
--
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