aboutsummaryrefslogtreecommitdiff
path: root/include/linux/console.h
diff options
context:
space:
mode:
authorJiri Slaby (SUSE) <jirislaby@kernel.org>2024-01-22 12:03:40 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-01-27 18:08:54 -0800
commitbfd7de49d7444ce46a48e92ce7cb11266ce79905 (patch)
treee3038953eb00832fa40da36f1b3723ffc8f2aba1 /include/linux/console.h
parent338c28107b51083846afdc5fe8f7830cc8abd893 (diff)
tty: vt: sanitize consw::con_putcs() parameters
Similar to con_putc() in the previous patch: * make the pointer to charattr a pointer to u16, and * make x, y, and count unsigned as they are strictly non-negative. And again, document that hook. Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org> Tested-by: Helge Deller <deller@gmx.de> # parisc STI console Link: https://lore.kernel.org/r/20240122110401.7289-27-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/console.h')
-rw-r--r--include/linux/console.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/console.h b/include/linux/console.h
index 92d57e5b3009..82d55764a66f 100644
--- a/include/linux/console.h
+++ b/include/linux/console.h
@@ -41,6 +41,7 @@ enum vc_intensity;
* @con_clear: erase @count characters at [@x, @y] on @vc. @count >= 1.
* @con_putc: emit one character with attributes @ca to [@x, @y] on @vc.
* (optional -- @con_putcs would be called instead)
+ * @con_putcs: emit @count characters with attributes @s to [@x, @y] on @vc.
* @con_scroll: move lines from @top to @bottom in direction @dir by @lines.
* Return true if no generic handling should be done.
* Invoked by csi_M and printing to the console.
@@ -57,8 +58,9 @@ struct consw {
unsigned int x, unsigned int count);
void (*con_putc)(struct vc_data *vc, u16 ca, unsigned int y,
unsigned int x);
- void (*con_putcs)(struct vc_data *vc, const unsigned short *s,
- int count, int ypos, int xpos);
+ void (*con_putcs)(struct vc_data *vc, const u16 *s,
+ unsigned int count, unsigned int ypos,
+ unsigned int xpos);
void (*con_cursor)(struct vc_data *vc, int mode);
bool (*con_scroll)(struct vc_data *vc, unsigned int top,
unsigned int bottom, enum con_scroll dir,