NUMA-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.
arch/i386/kernel/ioport.c +14 -0
@@ -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 ; +} +#else asmlinkage int sys_ioperm(unsigned long from, unsigned long num, int turn_on) {struct thread_struct * t = ¤t->thread;
@@ -97,6 +103,7 @@ asmlinkage int sys_ioperm(unsigned long out: return ret; } +#endif /* * 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 ; +} +#else 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 unset_thread_flag (TIF_IRET ); return 0; } +#endif
Quoted 10 lines · William Lee Irwin III
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.
Quoted 3 lines
This patch removes
sys_iopl()andsys_ioperm()support conditional on #ifdefCONFIG_X86_NUMAQto prevent the device register corruption condition without significant impact on core i386 support.
Please use cond_syscall to autogenerate the stubs, and make the compilation of /ioport.c conditional on !CONFIG_X86_NUMAQ.
Quoted 11 lines · William Lee Irwin III
Quoted 11 lines
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()andsys_ioperm()support conditional on #ifdefCONFIG_X86_NUMAQto prevent the device register corruption condition without significant impact on core i386 support.
Quoted 2 lines · Christoph Hellwig
Please use
cond_syscallto autogenerate the stubs, and make the compilation of /ioport.c conditional on !CONFIG_X86_NUMAQ.
Never heard of it before. Get a hold of me in the obvious way to fill me in.
Thanks.
-- wli