PROBLEM: kbd busted in linux 6.10-rc1 (regression)
From: Nick Bowler
Date: Wed May 29 2024 - 00:46:07 EST
Hi,
It seems kbd utilities are all broken on linux 6.10-rc1. For example:
# loadkeys en-latin9
Couldn't get a file descriptor referring to the console.
[and it did not change the console keymap]
This is a regression from linux 6.9. If I run strace on a working
kernel, at the point of the first difference we see:
openat(AT_FDCWD, "/dev/tty0", O_RDWR) = 3
ioctl(3, TCGETS, {c_iflag=BRKINT|ICRNL|IXON|IMAXBEL|IUTF8, c_oflag=NL0|CR0|TAB0|BS0|VT0|FF0|OPOST|ONLCR, c_cflag=B38400|CS8|CREAD|HUPCL, c_lflag=, ...}) = 0
ioctl(3, KDGKBTYPE, [KB_101]) = 0
...
On a busted kernel, we get:
openat(AT_FDCWD, "/dev/tty0", O_RDWR) = 3
ioctl(3, TCGETS, {c_iflag=IUTF8, c_oflag=NL0|CR0|TAB0|BS0|VT0|FF0|OPOST|ONLCR, c_cflag=B38400|CS8|CREAD|HUPCL, c_lflag=, ...}) = 0
ioctl(3, KDGKBTYPE, 0xffceaebb) = -1 ENOTTY (Inappropriate ioctl for device)
close(3) = 0
...
A very similar problem occurs with kbd_mode, chvt, etc.
Bisection implicates the following:
8c467f3300591a206fa8dcc6988d768910799872 is the first bad commit
commit 8c467f3300591a206fa8dcc6988d768910799872
Author: Alexey Gladkov <legion@xxxxxxxxxx>
Date: Wed Apr 17 19:37:35 2024 +0200
VT: Use macros to define ioctls
All other headers use _IOC() macros to describe ioctls for a long time
now. This header is stuck in the last century.
Simply use the _IO() macro. No other changes.
Signed-off-by: Alexey Gladkov <legion@xxxxxxxxxx>
Link: https://lore.kernel.org/r/e4229fe2933a003341e338b558ab1ea8b63a51f6.1713375378.git.legion@xxxxxxxxxx
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Reverting this commit corrects the issue.
This testing was done on my sparc system in case it matters.
Let me know if you need any more info!
Thanks,
Nick