* NUMA-Q sys_ioperm()/sys_iopl()
@ 2003-04-30 12:28 William Lee Irwin III
2003-04-30 12:55 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: William Lee Irwin III @ 2003-04-30 12:28 UTC (permalink / raw)
To: alan; +Cc: linux-kernel
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;
+}
+#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 un
set_thread_flag(TIF_IRET);
return 0;
}
+#endif
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: NUMA-Q sys_ioperm()/sys_iopl()
2003-04-30 12:28 NUMA-Q sys_ioperm()/sys_iopl() William Lee Irwin III
@ 2003-04-30 12:55 ` Christoph Hellwig
2003-04-30 12:57 ` William Lee Irwin III
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2003-04-30 12:55 UTC (permalink / raw)
To: William Lee Irwin III, alan, linux-kernel
On Wed, Apr 30, 2003 at 05:28:25AM -0700, William Lee Irwin III wrote:
> 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.
Please use cond_syscall to autogenerate the stubs, and make the compilation
of /ioport.c conditional on !CONFIG_X86_NUMAQ.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: NUMA-Q sys_ioperm()/sys_iopl()
2003-04-30 12:55 ` Christoph Hellwig
@ 2003-04-30 12:57 ` William Lee Irwin III
0 siblings, 0 replies; 3+ messages in thread
From: William Lee Irwin III @ 2003-04-30 12:57 UTC (permalink / raw)
To: Christoph Hellwig, alan, linux-kernel
On Wed, Apr 30, 2003 at 05:28:25AM -0700, William Lee Irwin III wrote:
>> 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.
On Wed, Apr 30, 2003 at 01:55:21PM +0100, Christoph Hellwig wrote:
> Please use cond_syscall to 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-04-30 12:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-30 12:28 NUMA-Q sys_ioperm()/sys_iopl() William Lee Irwin III
2003-04-30 12:55 ` Christoph Hellwig
2003-04-30 12:57 ` William Lee Irwin III
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox