[lkml]   [2001]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: vt.c: unimap changes to (fg_?)console
Followup to:  <>
By author: Kurt Garloff <>
In newsgroup:
> Hi Linus, Alan, Andries,
> if you open /dev/tty4 and change the font via ioctl(KDFONTOP), it will be
> applied to the opened console, i.e. tty4. Then you set the corresponding
> unicodemap via PIO_UNIMAPCLR and PIO_UNIMAP ioctls. Those get applied to the
> current foreground console. Which is inconsistent.
> Looking at vt.c: vt_ioctl(), the situation is a bit messy: Some ioctls don't
> explicitly specify a tty (probably not needed, as some settings are global),
> some apply to fg_console, some apply to the opened console which is
> ((struct vt_struct*)tty->driver_data)->vc_num.

Okay, these should either be global or apply to the invoked (file
descriptor) tty. Anything else is completely broken. In fact, I'd
argue that using ioctl's for anything but global data (since it's
global, it has to be privileged) is in itself broken. (Note: all the
font stuff used to be global state for kernel memory reasons.)

Why do you have the following in your patch? It makes the permissions
on the console depend on whether or not it is in the foreground, which
seems like another stupid inconsistency:

> + if (!perm && fg_console !=3D console)
> + return -EPERM;
<> at work, <> in private!
"Unix gives you enough rope to shoot yourself in the foot."
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 12:52    [W:0.028 / U:0.528 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site