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: <CALCETrXzHmAzAoH+f7QcaW_qyZAZKA1j7gCBpY39nwVkY_SX5A@mail.gmail.com>
Date:	Tue, 1 Sep 2015 14:50:01 -0700
From:	Andy Lutomirski <luto@...capital.net>
To:	Brian Gerst <brgerst@...il.com>
Cc:	X86 ML <x86@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Ingo Molnar <mingo@...nel.org>,
	"H. Peter Anvin" <hpa@...or.com>,
	Denys Vlasenko <dvlasenk@...hat.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH 0/7] x86 vdso32 cleanups

On Mon, Aug 31, 2015 at 6:37 PM, Andy Lutomirski <luto@...capital.net> wrote:
> I got random errors from perf kvm, but I think I found at least part
> of the issue.  The two irqs_disabled() calls in common.c are kind of
> expensive.  I should disable them on non-lockdep kernels.
>
> The context tracking hooks are also too expensive, even when disabled.
> I should do something to optimize those.  Hello, static keys?  This
> doesn't affect syscalls, though.
>
> With context tracking off and the irqs_disabled checks commented out,
> we're probably doing well enough.  We can always tweak the C code and
> aggressively force inlining if we want a few cycles back.

Currently, a compat AT_SYSINFO syscall (getpid) is 171 cycles for me.
With my patches, it's 196 cycles, so it's really not that bad.  The
impact will probably be slightly worse on native 32-bit because of
increased register pressure and because one of the micro-optimizations
I threw in are 64-bit specific.  We could probably tune the C code a
bit more to get a few of the cycles back.

On the flip side, the rewrite is *far* faster in some of the slow path
cases because the slow path no longer forces IRET.

On 32-bit, there's the added benefit that we could drop asmlinkage
from the syscall bodies on top of the rewrite.

--Andy

>
> --Andy



-- 
Andy Lutomirski
AMA Capital Management, LLC
--
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