virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] x86: Support compiling out userspace I/O (iopl and ioperm)
@ 2013-10-22  2:33 Josh Triplett
  2013-10-22  2:34 ` [PATCH 1/3] x86: process: Unify 32-bit and 64-bit copy_thread I/O bitmap handling Josh Triplett
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Josh Triplett @ 2013-10-22  2:33 UTC (permalink / raw)
  To: linux-kernel, virtualization, x86, xen-devel
  Cc: Alexander van Heukelum, Jeremy Fitzhardinge, Raghavendra K T,
	Len Brown, Frederic Weisbecker, H. Peter Anvin, Paul Gortmaker,
	David Herrmann, Masami Hiramatsu, Seiji Aguchi, Jiri Slaby,
	Alok Kataria, Jesper Nilsson, Andi Kleen, Daniel Lezcano,
	Ingo Molnar, Steven Rostedt, Borislav Petkov, Fenghua Yu,
	Kees Cook, Konrad Rzeszutek Wilk, Ross Lagerwall, Chris

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2013-11-01 17:19 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-22  2:33 [PATCH 0/3] x86: Support compiling out userspace I/O (iopl and ioperm) Josh Triplett
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

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