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: <CALCETrXQnb6jPuXkjXmg5yYCKOEyCL3hZ_sDrD7=Af1idr5zBw@mail.gmail.com>
Date:	Thu, 23 Apr 2015 15:55:26 -0700
From:	Andy Lutomirski <luto@...capital.net>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	Borislav Petkov <bp@...en8.de>,
	Denys Vlasenko <vda.linux@...glemail.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Brian Gerst <brgerst@...il.com>,
	Denys Vlasenko <dvlasenk@...hat.com>,
	Ingo Molnar <mingo@...nel.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Oleg Nesterov <oleg@...hat.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Alexei Starovoitov <ast@...mgrid.com>,
	Will Drewry <wad@...omium.org>,
	Kees Cook <keescook@...omium.org>,
	"the arch/x86 maintainers" <x86@...nel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86/asm/entry/32: Restore %ss before SYSRETL if necessary

On Thu, Apr 23, 2015 at 3:52 PM, H. Peter Anvin <hpa@...or.com> wrote:
> On 04/23/2015 03:38 PM, Andy Lutomirski wrote:
>>>
>>> Because there are way more sysrets than context switches, and Linux is
>>> particularly sensitive to system call latency, by design.
>>
>
> Just to clarify: why would Linux be more sensitive to system call by
> design?  It enables much simpler APIs and avoids hacks like sending down
> a syscall task list (which was genuinely proposed at one point.)  If
> kernel entry/exit is too expensive, then the APIs get more complex
> because they *have* to do everything in the smallest number of system calls.
>

It's a matter of the ratio, right?  One cycle of syscall overhead
saved is worth some number of context switch cycles added, and the
ratio probably varies by workload.

If we do syscall, two context switches, and sysret, then we wouldn't
have been better off fixing it on sysret.  But maybe most workloads
still prefer the fixup on context switch.

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