Skip to contentSkip to conversation

patch "vcs: prevent write access to vcsu devices" added to tty-testing

PATCH [email protected] 1 participant 1 message Nov 27, 2019

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

vcs: prevent write access to vcsu devices

to my tty git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
in the tty-testing branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will be merged to the tty-next branch sometime soon, after it passes testing, and the merge window is open.

If you have any questions about this process, please let me know.

From 0c9acb1af77a3cb8707e43f45b72c95266903cee Mon Sep 17 00:00:00 2001
From: Nicolas Pitre <[email protected]>
Date: Tue, 5 Nov 2019 10:33:16 +0100
Subject: vcs: prevent write access to vcsu devices

Commit d21b0be246bf ("vt: introduce unicode mode for /dev/vcs") guarded against using devices containing attributes as this is not yet implemented. It however failed to guard against writes to any devices as this is also unimplemented.

Cc <[email protected]> # v4.19+
Cc Jiri Slaby <[email protected]>
Fixes d21b0be246bf ("vt: introduce unicode mode for /dev/vcs")
---
 drivers/tty/vt/vc_screen.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/tty/vt/vc_screen.c +3 -0
index 1f042346e722..778f83ea2249 100644
@@ -456,6 +456,9 @@ vcs_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
 	size_t ret;
 	char *con_buf;
 
+	if (use_unicode(inode))
+		return -EOPNOTSUPP;
+
 	con_buf = (char *) __get_free_page(GFP_KERNEL);
 	if (!con_buf)
 		return -ENOMEM;
Signature · 1 line
2.24.0