linux-stable/drivers/tty/vt
Jiri Slaby 754bda9807 vc: extract detecting control characters from do_con_write
Move the control characters detection to a separate function dubbed
vc_is_control. It makes the 14 subexpressions a "bit" more readable. And
also simplifies next patches.

It moves also CTRL_ACTION and CTRL_ALWAYS to this new function, as they
are used exclusively here. While at it, these are converted to static
const variables.

And we use "& BIT()" instead of ">>" and "& 1".

Checked using symbolic execution (klee), that the old and new
behaviors are the same.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20200615074910.19267-18-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-24 17:08:32 +02:00
..
.gitignore tty: vt: move conmakehash to drivers/tty/vt/ from scripts/ 2019-12-17 14:42:46 +01:00
conmakehash.c tty: vt: move conmakehash to drivers/tty/vt/ from scripts/ 2019-12-17 14:42:46 +01:00
consolemap.c mmap locking API: convert mmap_sem comments 2020-06-09 09:39:14 -07:00
cp437.uni tty: fix up a few remaining files without SPDX identifiers 2019-04-04 18:48:43 +02:00
defkeymap.c_shipped tty: fix up a few remaining files without SPDX identifiers 2019-04-04 18:48:43 +02:00
defkeymap.map tty: fix up a few remaining files without SPDX identifiers 2019-04-04 18:48:43 +02:00
keyboard.c vt: keyboard: avoid signed integer overflow in k_ascii 2020-05-27 12:21:44 +02:00
Makefile kbuild: rename hostprogs-y/always to hostprogs/always-y 2020-02-04 01:53:07 +09:00
selection.c vt: extract selection chars storing from vc_do_selection 2020-04-16 16:14:15 +02:00
vc_screen.c vcs: prevent write access to vcsu devices 2019-11-27 07:47:17 +01:00
vt.c vc: extract detecting control characters from do_con_write 2020-06-24 17:08:32 +02:00
vt_ioctl.c vt: vt_ioctl: fix use-after-free in vt_in_use() 2020-03-27 12:35:04 +01:00