]> git.baikalelectronics.ru Git - kernel.git/commit
vt: drop old FONT ioctls
authorJiri Slaby <jslaby@suse.cz>
Tue, 5 Jan 2021 12:02:35 +0000 (13:02 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Jun 2022 06:58:44 +0000 (08:58 +0200)
commita17fd3d47f2978c812dea3bb7a6c02a1181984db
tree6459acea6a992cd2b07d7a758a1f26f371cd2951
parentbb47c4b2f554f1c1725b8990a4b60c10f575622a
vt: drop old FONT ioctls

commit cefab469c244399a867fb41cb68e23dff353608b upstream.

Drop support for these ioctls:
* PIO_FONT, PIO_FONTX
* GIO_FONT, GIO_FONTX
* PIO_FONTRESET

As was demonstrated by commit 89f558ba837c (tty: make FONTX ioctl use
the tty pointer they were actually passed), these ioctls are not used
from userspace, as:
1) they used to be broken (set up font on current console, not the open
   one) and racy (before the commit above)
2) KDFONTOP ioctl is used for years instead

Note that PIO_FONTRESET is defunct on most systems as VGA_CONSOLE is set
on them for ages. That turns on BROKEN_GRAPHICS_PROGRAMS which makes
PIO_FONTRESET just return an error.

We are removing KD_FONT_FLAG_OLD here as it was used only by these
removed ioctls. kd.h header exists both in kernel and uapi headers, so
we can remove the kernel one completely. Everyone includeing kd.h will
now automatically get the uapi one.

There are now unused definitions of the ioctl numbers and "struct
consolefontdesc" in kd.h, but as it is a uapi header, I am not touching
these.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20210105120239.28031-8-jslaby@suse.cz
Cc: guodaxing <guodaxing@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/vt/vt.c
drivers/tty/vt/vt_ioctl.c
include/linux/kd.h [deleted file]