From: Andy Lutomirski <luto@MIT.EDU>
To: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
x86@kernel.org
Cc: linux-kernel@vger.kernel.org, Andy Lutomirski <luto@MIT.EDU>
Subject: [PATCH 0/5] x86-64: Remove syscall instructions at fixed addresses
Date: Fri, 27 May 2011 13:38:37 -0400 [thread overview]
Message-ID: <cover.1306517576.git.luto@mit.edu> (raw)
I lied about taking awhile to do this.
There are a bunch of syscall instructions in kernel space at fixed
addresses that user code can execute.
One is a time() fallback. Patch 3/5 removes it.
Several are data that isn't marked NX. Patch 2/5 makes vvars NX and
5/5 makes the HPET NX.
The last one is the gettimeofday fallback. We need that, but it
doesn't have to be a real syscall. Patch 3/5 adds int 0xCC (callable
only from the vsyscall page) that implements the gettimeofday fallback
and nothing else.
Patch 1/5 is just a dumb but harmless bug fix from the last vdso
series.
I've only tested this in KVM with a hacked-up initramfs, but Ingo
wanted it for 2.6.40, so here it is.
Andy Lutomirski (5):
x86-64: Fix alignment of jiffies variable
x86-64: Give vvars their own page
x86-64: Remove kernel.vsyscall64 sysctl
x86-64: Replace vsyscall gettimeofday fallback with int 0xcc
x86-64: Map the HPET NX
arch/x86/include/asm/fixmap.h | 1 +
arch/x86/include/asm/pgtable_types.h | 6 ++-
arch/x86/include/asm/traps.h | 4 ++
arch/x86/include/asm/vgtod.h | 1 -
arch/x86/include/asm/vsyscall.h | 6 ++
arch/x86/include/asm/vvar.h | 24 ++++-----
arch/x86/kernel/entry_64.S | 2 +
arch/x86/kernel/hpet.c | 2 +-
arch/x86/kernel/traps.c | 4 ++
arch/x86/kernel/vmlinux.lds.S | 27 ++++++----
arch/x86/kernel/vsyscall_64.c | 86 ++++++++++++++++++---------------
arch/x86/vdso/vclock_gettime.c | 55 ++++++++-------------
tools/power/x86/turbostat/turbostat | Bin 0 -> 29200 bytes
13 files changed, 117 insertions(+), 101 deletions(-)
create mode 100755 tools/power/x86/turbostat/turbostat
--
1.7.5.1
next reply other threads:[~2011-05-27 17:38 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-27 17:38 Andy Lutomirski [this message]
2011-05-27 17:38 ` [PATCH 1/5] x86-64: Fix alignment of jiffies variable Andy Lutomirski
2011-05-27 17:38 ` [PATCH 2/5] x86-64: Give vvars their own page Andy Lutomirski
2011-05-29 20:34 ` Borislav Petkov
2011-05-30 1:37 ` Andrew Lutomirski
2011-05-27 17:38 ` [PATCH 3/5] x86-64: Remove kernel.vsyscall64 sysctl Andy Lutomirski
2011-05-27 17:38 ` [PATCH 4/5] x86-64: Replace vsyscall gettimeofday fallback with int 0xcc Andy Lutomirski
2011-05-29 19:10 ` Ingo Molnar
2011-05-29 19:23 ` Andrew Lutomirski
2011-05-29 19:43 ` Ingo Molnar
2011-05-29 19:49 ` Ingo Molnar
2011-05-29 19:57 ` Andrew Lutomirski
2011-05-29 20:01 ` Ingo Molnar
2011-05-29 20:04 ` Andrew Lutomirski
2011-05-29 20:26 ` Borislav Petkov
2011-05-29 19:49 ` Jesper Juhl
2011-05-29 19:54 ` Jesper Juhl
2011-05-29 20:05 ` Andrew Lutomirski
2011-05-29 20:07 ` Jesper Juhl
2011-05-27 17:38 ` [PATCH 5/5] x86-64: Map the HPET NX Andy Lutomirski
2011-05-29 19:19 ` [PATCH 0/5] x86-64: Remove syscall instructions at fixed addresses Ingo Molnar
2011-05-31 2:33 ` Andrew Lutomirski
2011-05-31 8:07 ` Ingo Molnar
2011-05-31 12:27 ` Andrew Lutomirski
2011-05-31 12:54 ` Ingo Molnar
2011-05-31 13:06 ` Andrew Lutomirski
2011-05-31 13:11 ` Ingo Molnar
2011-05-31 13:17 ` Andrew Lutomirski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1306517576.git.luto@mit.edu \
--to=luto@mit.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.