* [PATCH] make vt_ioctl ix86isms explicit
@ 2003-05-24 17:37 Christoph Hellwig
2003-05-24 17:55 ` Linus Torvalds
0 siblings, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2003-05-24 17:37 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel
sys_ioperm is only implemented on x86 (i386/x86_64). Make the
ifdefs in vt_ioctl.c more explicit so the other architectures can
get rid of their stubs in favour of just using sys_ni_syscall in
the syscall table. (Personally I still wonder why they added it
at all but that's another question..)
--- 1.23/drivers/char/vt_ioctl.c Mon May 12 16:12:47 2003
+++ edited/drivers/char/vt_ioctl.c Fri May 23 21:27:46 2003
@@ -59,7 +59,7 @@
*/
unsigned char keyboard_type = KB_101;
-#if !defined(__alpha__) && !defined(__ia64__) && !defined(__mips__) && !defined(__arm__) && !defined(__sh__)
+#ifdef CONFIG_X86
asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int on);
#endif
@@ -424,11 +424,13 @@
ucval = keyboard_type;
goto setchar;
-#if !defined(__alpha__) && !defined(__ia64__) && !defined(__mips__) && !defined(__arm__) && !defined(__sh__)
/*
* These cannot be implemented on any machine that implements
- * ioperm() in user level (such as Alpha PCs).
+ * ioperm() in user level (such as Alpha PCs) or not at all.
+ *
+ * XXX: you should never use these, just call ioperm directly..
*/
+#ifdef CONFIG_X86
case KDADDIO:
case KDDELIO:
/*
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] make vt_ioctl ix86isms explicit
2003-05-24 17:37 [PATCH] make vt_ioctl ix86isms explicit Christoph Hellwig
@ 2003-05-24 17:55 ` Linus Torvalds
2003-05-24 18:03 ` Christoph Hellwig
2003-05-24 18:03 ` James Simmons
0 siblings, 2 replies; 5+ messages in thread
From: Linus Torvalds @ 2003-05-24 17:55 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-kernel
On Sat, 24 May 2003, Christoph Hellwig wrote:
>
> sys_ioperm is only implemented on x86 (i386/x86_64). Make the
> ifdefs in vt_ioctl.c more explicit so the other architectures can
> get rid of their stubs in favour of just using sys_ni_syscall in
> the syscall table. (Personally I still wonder why they added it
> at all but that's another question..)
They were added because this was how the X server got IO permissions a
million years ago. It comes from some random old UNIX/386 thing, it
predates Linux itself as far as I know.
I'm fairly certain that X itself no longer uses it at all, but there may
be other programs that still do (unlikely). Your patch looks sane,
although it might be equally sane to just remove the code altogether.
Linus
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] make vt_ioctl ix86isms explicit
2003-05-24 17:55 ` Linus Torvalds
@ 2003-05-24 18:03 ` Christoph Hellwig
2003-05-24 22:16 ` Andries Brouwer
2003-05-24 18:03 ` James Simmons
1 sibling, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2003-05-24 18:03 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel
On Sat, May 24, 2003 at 10:55:41AM -0700, Linus Torvalds wrote:
> They were added because this was how the X server got IO permissions a
> million years ago. It comes from some random old UNIX/386 thing, it
> predates Linux itself as far as I know.
>
> I'm fairly certain that X itself no longer uses it at all, but there may
> be other programs that still do (unlikely). Your patch looks sane,
> although it might be equally sane to just remove the code altogether.
What about this one instead? If no one sees this messages we can just
rip it out in 2.7.<early>
--- 1.23/drivers/char/vt_ioctl.c Mon May 12 16:12:47 2003
+++ edited/drivers/char/vt_ioctl.c Fri May 23 22:13:19 2003
@@ -59,7 +59,7 @@
*/
unsigned char keyboard_type = KB_101;
-#if !defined(__alpha__) && !defined(__ia64__) && !defined(__mips__) && !defined(__arm__) && !defined(__sh__)
+#ifdef CONFIG_X86
asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int on);
#endif
@@ -424,23 +424,29 @@
ucval = keyboard_type;
goto setchar;
-#if !defined(__alpha__) && !defined(__ia64__) && !defined(__mips__) && !defined(__arm__) && !defined(__sh__)
/*
* These cannot be implemented on any machine that implements
- * ioperm() in user level (such as Alpha PCs).
+ * ioperm() in user level (such as Alpha PCs) or not at all.
+ *
+ * XXX: you should never use these, just call ioperm directly..
*/
+#ifdef CONFIG_X86
case KDADDIO:
case KDDELIO:
/*
* KDADDIO and KDDELIO may be able to add ports beyond what
* we reject here, but to be safe...
*/
+ printk(KERN_INFO "[%s]: using obsolete KDADDIO/KDDELIO ioctl\n",
+ current->comm);
if (arg < GPFIRST || arg > GPLAST)
return -EINVAL;
return sys_ioperm(arg, 1, (cmd == KDADDIO)) ? -ENXIO : 0;
case KDENABIO:
case KDDISABIO:
+ printk(KERN_INFO "[%s]: using obsolete KDENABIO/KDDISABIO ioctl\n",
+ current->comm);
return sys_ioperm(GPFIRST, GPNUM,
(cmd == KDENABIO)) ? -ENXIO : 0;
#endif
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] make vt_ioctl ix86isms explicit
2003-05-24 18:03 ` Christoph Hellwig
@ 2003-05-24 22:16 ` Andries Brouwer
0 siblings, 0 replies; 5+ messages in thread
From: Andries Brouwer @ 2003-05-24 22:16 UTC (permalink / raw)
To: Christoph Hellwig, Linus Torvalds, linux-kernel
On Sat, May 24, 2003 at 08:03:17PM +0200, Christoph Hellwig wrote:
> What about this one instead? If no one sees this messages we can just
> rip it out in 2.7.<early>
I think you can just rip it out.
A grep on some random source tree shows zero occurrences.
XFree86 uses it only in DGUX and SYSV sections.
A larger search turns up one more small program dated 1990.
Andries
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] make vt_ioctl ix86isms explicit
2003-05-24 17:55 ` Linus Torvalds
2003-05-24 18:03 ` Christoph Hellwig
@ 2003-05-24 18:03 ` James Simmons
1 sibling, 0 replies; 5+ messages in thread
From: James Simmons @ 2003-05-24 18:03 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Christoph Hellwig, linux-kernel
> > sys_ioperm is only implemented on x86 (i386/x86_64). Make the
> > ifdefs in vt_ioctl.c more explicit so the other architectures can
> > get rid of their stubs in favour of just using sys_ni_syscall in
> > the syscall table. (Personally I still wonder why they added it
> > at all but that's another question..)
>
> They were added because this was how the X server got IO permissions a
> million years ago. It comes from some random old UNIX/386 thing, it
> predates Linux itself as far as I know.
>
> I'm fairly certain that X itself no longer uses it at all, but there may
> be other programs that still do (unlikely). Your patch looks sane,
> although it might be equally sane to just remove the code altogether.
I suggest we remove it. It was the old way to access the VGA register
ports.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-05-24 22:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-24 17:37 [PATCH] make vt_ioctl ix86isms explicit Christoph Hellwig
2003-05-24 17:55 ` Linus Torvalds
2003-05-24 18:03 ` Christoph Hellwig
2003-05-24 22:16 ` Andries Brouwer
2003-05-24 18:03 ` James Simmons
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.