Could you please compile and run the attached program as root on the affected system, and post the results?
In the course of investigating, I've discovered locally that ioctl(fd, KDGKBMODE), despite taking an unsigned long * as an argument, doesn't fully clear the address here on xenial x86_64. So if this program returns sensible results on your system, we may be looking at a memory initialization bug.
Thanks, this strace shows that src/getfd. c:getfd_ keymap( ) is unable to find any VTs not in raw mode:
int sizeof( "/dev/ttyNN" )] = "/dev/tty";
getfd_keymap(void) {
int fd, bestfd = -1;
char ttyname[
int i;
#define CHECK_FD_KEYMAP do { \
long mode = kbmode(fd); \
if (bestfd != -1) \
close( bestfd) ; \
return fd; \
bestfd = fd; \
else \
close( fd); \
close( fd); \
if (is_a_console(fd)) { \
if (mode == K_UNICODE) { \
} else if (mode == K_XLATE && bestfd == -1) \
} else \
} while (0)
[...]
for (i = 1; i <= 12; ++i) {
snprintf( ttyname + sizeof("/dev/tty") - 1, 3, "%d", i); console( ttyname) ) >= 0)
CHECK_ FD_KEYMAP;
if ((fd = open_a_
}
/* total failure */
exit(1);
}
is_a_console() checks KDGKBTYPE, kbmode() checks KDGKBMODE.
Could you please compile and run the attached program as root on the affected system, and post the results?
In the course of investigating, I've discovered locally that ioctl(fd, KDGKBMODE), despite taking an unsigned long * as an argument, doesn't fully clear the address here on xenial x86_64. So if this program returns sensible results on your system, we may be looking at a memory initialization bug.