public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: William Lee Irwin III <wli@holomorphy.com>
To: alan@lxorguk.ukuu.org.uk
Cc: linux-kernel@vger.kernel.org
Subject: NUMA-Q sys_ioperm()/sys_iopl()
Date: Wed, 30 Apr 2003 05:28:25 -0700	[thread overview]
Message-ID: <20030430122825.GL8931@holomorphy.com> (raw)

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 = &current->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

             reply	other threads:[~2003-04-30 12:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-30 12:28 William Lee Irwin III [this message]
2003-04-30 12:55 ` NUMA-Q sys_ioperm()/sys_iopl() Christoph Hellwig
2003-04-30 12:57   ` William Lee Irwin III

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=20030430122825.GL8931@holomorphy.com \
    --to=wli@holomorphy.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.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