]> git.baikalelectronics.ru Git - kernel.git/commit
x86/asm/entry: Add comments about various syscall instructions
authorDenys Vlasenko <dvlasenk@redhat.com>
Thu, 26 Feb 2015 22:40:32 +0000 (14:40 -0800)
committerIngo Molnar <mingo@kernel.org>
Wed, 4 Mar 2015 21:50:51 +0000 (22:50 +0100)
commitf1ab841511c5231be6cf3c7ce938d02a495d37d8
treea99e7a8ebef93d88347bc931fe2cb5b0ea5d47eb
parent1db68e92ac3c2ebcafcc6238ed272f389ff4f270
x86/asm/entry: Add comments about various syscall instructions

SYSCALL/SYSRET and SYSENTER/SYSEXIT have weird semantics.
Moreover, they differ in 32- and 64-bit mode.

What is saved? What is not? Is rsp set? Are interrupts disabled?
People tend to not remember these details well enough.

This patch adds comments which explain in detail
what registers are modified by each of these instructions.

The comments are placed immediately before corresponding
entry and exit points.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Drewry <wad@chromium.org>
Link: http://lkml.kernel.org/r/a94b98b63527797c871a81402ff5060b18fa880a.1424989793.git.luto@amacapital.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/ia32/ia32entry.S
arch/x86/kernel/entry_64.S