]> git.baikalelectronics.ru Git - kernel.git/commit
tty: keyboard, do not speculate on func_table index
authorJiri Slaby <jslaby@suse.cz>
Thu, 30 Jul 2020 10:55:46 +0000 (12:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 Jul 2020 18:22:06 +0000 (20:22 +0200)
commit613d2547a47b6e8ea7e6f6790a6d97ff46d14a39
tree99802b547781d2caf80832a8062a36a0420d1ed3
parentf606a8b7e252d0cefb882bf8d9ba9d3e6f3eced4
tty: keyboard, do not speculate on func_table index

It is very unlikely for processor to speculate on the func_table index.
The index is uchar and func_table is of size 256. So the compiler would
need to screw up and generate a really bad code.

But to stay on the safe side, forbid speculation on this user passed
index.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Jiri Kosina <jikos@kernel.org>
Link: https://lore.kernel.org/r/20200730105546.24268-1-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/vt/keyboard.c