[lkml]   [2003]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectNUMA-Q sys_ioperm()/sys_iopl()
NUMA-Q cannot support these operations without significant
infrastructure to emulate a global port io space for userspace to
manipulate, possibly even with hooks into the scheduler.

Not only are the applications depending on this particular form of
privilege elevation generally inappropriate uses of these machines
(they are large "server-class" machines, typically shipped and run
headless), but the devices typically managed with these interfaces
are already explicitly unsupported in UNIX configurations.

This patch removes sys_iopl() and sys_ioperm() support conditional on
#ifdef CONFIG_X86_NUMAQ to prevent the device register corruption
condition without significant impact on core i386 support.

diff -urpN linux-2.5.68/arch/i386/kernel/ioport.c ioperm-2.5.68-1/arch/i386/kernel/ioport.c
--- linux-2.5.68/arch/i386/kernel/ioport.c 2003-04-19 19:49:26.000000000 -0700
+++ ioperm-2.5.68-1/arch/i386/kernel/ioport.c 2003-04-30 05:01:09.000000000 -0700
@@ -53,6 +53,12 @@ static void set_bitmap(unsigned long *bi
* this changes the io permissions bitmap in the current task.
+#ifdef CONFIG_X86_NUMAQ
+asmlinkage int sys_ioperm(unsigned long from, unsigned long num, int turn_on)
+ return -ENOSYS;
asmlinkage int sys_ioperm(unsigned long from, unsigned long num, int turn_on)
struct thread_struct * t = &current->thread;
@@ -97,6 +103,7 @@ asmlinkage int sys_ioperm(unsigned long
return ret;

* sys_iopl has to be used when you want to access the IO ports
@@ -109,6 +116,12 @@ out:
* code.

+#ifdef CONFIG_X86_NUMAQ
+asmlinkage int sys_iopl(unsigned long unused)
+ return -ENOSYS;
asmlinkage int sys_iopl(unsigned long unused)
volatile struct pt_regs * regs = (struct pt_regs *) &unused;
@@ -127,3 +140,4 @@ asmlinkage int sys_iopl(unsigned long un
return 0;
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at
 \ /
  Last update: 2005-03-22 13:35    [W:0.037 / U:2.176 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site