From: Josh Triplett <josh@joshtriplett.org>
To: linux-kernel@vger.kernel.org,
virtualization@lists.linux-foundation.org, x86@kernel.org,
xen-devel@lists.xenproject.org
Cc: Alexander van Heukelum <heukelum@fastmail.fm>,
Jeremy Fitzhardinge <jeremy@goop.org>,
Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>,
Len Brown <len.brown@intel.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Paul Gortmaker <paul.gortmaker@windriver.com>,
David Herrmann <dh.herrmann@gmail.com>,
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
Seiji Aguchi <seiji.aguchi@hds.com>, Jiri Slaby <jslaby@suse.cz>,
Alok Kataria <akataria@vmware.com>,
Jesper Nilsson <jesper.nilsson@axis.com>,
Andi Kleen <ak@linux.intel.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Ingo Molnar <mingo@redhat.com>,
Steven Rostedt <rostedt@goodmis.org>,
Borislav Petkov <bp@suse.de>, Fenghua Yu <fenghua.yu@intel.com>,
Kees Cook <keescook@chromium.org>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Ross Lagerwall <rosslagerwall@gmail.com>,
Chris
Subject: [PATCH 0/3] x86: Support compiling out userspace I/O (iopl and ioperm)
Date: Tue, 22 Oct 2013 03:33:58 +0100 [thread overview]
Message-ID: <cover.1382407802.git.josh@joshtriplett.org> (raw)
This patch series makes it possible to compile out the iopl and ioperm system
calls, which allow privileged processes to request permission to directly poke
I/O ports from userspace.
Nothing on a modern Linux system uses these calls anymore, and anything new
should be using /dev/port instead, or better yet writing a driver.
Copying the bloat-o-meter stats from the final patch:
32-bit bloat-o-meter:
add/remove: 0/3 grow/shrink: 0/10 up/down: 0/-17681 (-17681)
function old new delta
cpu_init 676 668 -8
ioperm_active 18 7 -11
init_task 1296 1284 -12
exit_thread 179 91 -88
ioperm_get 103 10 -93
__switch_to_xtra 254 161 -93
sys_iopl 127 - -127
SyS_iopl 127 - -127
copy_thread 606 446 -160
vt_ioctl 4127 3919 -208
sys_ioperm 370 - -370
init_tss 8576 384 -8192
doublefault_tss 8576 384 -8192
64-bit bloat-o-meter:
add/remove: 0/4 grow/shrink: 2/9 up/down: 45/-9764 (-9719)
function old new delta
cpu_init 958 995 +37
arch_align_stack 78 86 +8
perf_event_exit_task 525 517 -8
ioperm_active 17 8 -9
init_task 1968 1944 -24
stub_iopl 81 - -81
ioperm_get 111 11 -100
__switch_to_xtra 281 164 -117
exit_thread 212 92 -120
vt_ioctl 4432 4304 -128
sys_iopl 137 - -137
SyS_iopl 137 - -137
copy_thread 694 520 -174
sys_ioperm 473 - -473
init_tss 8896 640 -8256
Josh Triplett (3):
x86: process: Unify 32-bit and 64-bit copy_thread I/O bitmap handling
x86: tss: Eliminate fragile calculation of TSS segment limit
x86: Support compiling out userspace I/O (iopl and ioperm)
arch/x86/Kconfig | 10 ++++
arch/x86/include/asm/desc.h | 11 +----
arch/x86/include/asm/paravirt.h | 2 +
arch/x86/include/asm/paravirt_types.h | 2 +
arch/x86/include/asm/processor.h | 54 +++++++++++++++++---
arch/x86/include/asm/syscalls.h | 3 ++
arch/x86/kernel/Makefile | 3 +-
arch/x86/kernel/cpu/common.c | 12 +----
arch/x86/kernel/entry_64.S | 9 ++--
arch/x86/kernel/paravirt.c | 2 +
arch/x86/kernel/process-io.h | 93 +++++++++++++++++++++++++++++++++++
arch/x86/kernel/process.c | 34 ++-----------
arch/x86/kernel/process_32.c | 40 ++++-----------
arch/x86/kernel/process_64.c | 26 ++--------
arch/x86/kernel/ptrace.c | 8 +++
arch/x86/xen/enlighten.c | 4 ++
drivers/tty/vt/vt_ioctl.c | 2 +-
kernel/sys_ni.c | 5 ++
18 files changed, 206 insertions(+), 114 deletions(-)
create mode 100644 arch/x86/kernel/process-io.h
--
1.8.4.rc3
next reply other threads:[~2013-10-22 2:33 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-22 2:33 Josh Triplett [this message]
2013-10-22 2:34 ` [PATCH 1/3] x86: process: Unify 32-bit and 64-bit copy_thread I/O bitmap handling Josh Triplett
2013-10-30 22:21 ` Kees Cook
2013-10-31 20:01 ` Alexander van Heukelum
2013-11-01 16:33 ` Josh Triplett
2013-10-22 2:34 ` [PATCH 2/3] x86: tss: Eliminate fragile calculation of TSS segment limit Josh Triplett
2013-10-30 22:22 ` Kees Cook
2013-10-30 22:53 ` H. Peter Anvin
2013-10-31 11:17 ` Josh Triplett
2013-10-31 11:12 ` Josh Triplett
2013-10-31 20:02 ` Alexander van Heukelum
2013-11-01 16:40 ` Josh Triplett
2013-10-22 2:35 ` [PATCH 3/3] x86: Support compiling out userspace I/O (iopl and ioperm) Josh Triplett
2013-10-26 3:17 ` Stephen Hemminger
2013-10-26 4:30 ` Kees Cook
2013-10-31 20:04 ` Alexander van Heukelum
2013-11-01 17:19 ` Josh Triplett
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.1382407802.git.josh@joshtriplett.org \
--to=josh@joshtriplett.org \
--cc=ak@linux.intel.com \
--cc=akataria@vmware.com \
--cc=bp@suse.de \
--cc=daniel.lezcano@linaro.org \
--cc=dh.herrmann@gmail.com \
--cc=fenghua.yu@intel.com \
--cc=fweisbec@gmail.com \
--cc=heukelum@fastmail.fm \
--cc=hpa@zytor.com \
--cc=jeremy@goop.org \
--cc=jesper.nilsson@axis.com \
--cc=jslaby@suse.cz \
--cc=keescook@chromium.org \
--cc=konrad.wilk@oracle.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mingo@redhat.com \
--cc=paul.gortmaker@windriver.com \
--cc=raghavendra.kt@linux.vnet.ibm.com \
--cc=rosslagerwall@gmail.com \
--cc=rostedt@goodmis.org \
--cc=seiji.aguchi@hds.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=x86@kernel.org \
--cc=xen-devel@lists.xenproject.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).