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: <20160306083119.GB12352@gmail.com>
Date:	Sun, 6 Mar 2016 09:31:19 +0100
From:	Ingo Molnar <mingo@...nel.org>
To:	Andy Lutomirski <luto@...nel.org>
Cc:	x86@...nel.org, linux-kernel@...r.kernel.org,
	Borislav Petkov <bp@...en8.de>,
	Oleg Nesterov <oleg@...hat.com>,
	Andrew Cooper <andrew.cooper3@...rix.com>,
	Brian Gerst <brgerst@...il.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH 00/10] x86: Various SYSENTER/SYSEXIT/#DB fixes and
 cleanups


* Andy Lutomirski <luto@...nel.org> wrote:

> hpa asked me to get rid of the ASM_CLAC at the beginning of the SYSENTER
> path.  Little did he know...

Btw., before we further change this code, something else I think would be very 
useful. We have countless system call entry points on x86 CPUs, and they are now 
consistently named and are very easy to grep for:

 triton:~/tip> git grep 'ENTRY(entry_' arch/x86/entry/
 arch/x86/entry/entry_32.S:ENTRY(entry_SYSENTER_32)
 arch/x86/entry/entry_32.S:ENTRY(entry_INT80_32)
 arch/x86/entry/entry_64.S:ENTRY(entry_SYSCALL_64)
 arch/x86/entry/entry_64_compat.S:ENTRY(entry_SYSENTER_compat)
 arch/x86/entry/entry_64_compat.S:ENTRY(entry_SYSCALL_compat)
 arch/x86/entry/entry_64_compat.S:ENTRY(entry_INT80_compat)

Furthermore, each entry point has extensive comments, except one important detail: 
none of the comments really explains the circumstances under which the entry 
points are _used_ by user-space.

I'd like to see something like:

arch/x86/entry/entry_64.S:ENTRY(entry_SYSCALL_64)

	*
	* The 64-bit SYSCALL instruction is used by all modern 64-bit user-space 
	* code to execute most system calls: this instruction is the fastest and 
	* sanest implementation on modern Intel and AMD CPUs.
	*

... and we should add similar explanations for all of the 6 entry points, with 
caveats and limitations listed generously.

Especially valuable would be to list eventual 'strange' usages of the various 
syscall instructions, used by rare packages, compatibility layers, emulators, 
embedded libraries, etc. (To the extent we know about them, obviously.)

I.e. it would be very nice to do a full documentation of our current system call 
usage patterns, as utilized by user-space. Beyond the documentation value this 
will also help people prioritize optimizations between the various entry points - 
which should be optimized more, which entry point matters less, etc.

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ