<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/tty/vt, branch master</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>Merge tag 'tty-7.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty</title>
<updated>2026-11-16T15:59:28+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-11-16T15:59:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b6793a9e2a3c280bb7c6c7d39be271e2f57aa2bb'/>
<id>b6793a9e2a3c280bb7c6c7d39be271e2f57aa2bb</id>
<content type='text'>
Pull tty/serial driver fixes from Greg KH:
 "Here are some small tty and serial driver fixes for reported problems
  for 7.4-rc4. Included in here are:

   - tty driver and vt fixes reported and fixed by Josef Bacik and Chris
     Mason

   - some serial driver fixes by Jiri for found problems

  All of these have been in linux-next for almost 2 weeks now, with no
  reported issues"

* tag 'tty-7.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  serial: samsung: put the previous baud clock
  serial: samsung: don't leak the tty on an RX IRQ
  serial: rda: free the interrupt on shutdown
  serial: imx: fix the tty reference of the wakeup event
  serial: fsl_lpuart: fix tty ref of wakeup event
  serial: 8250_mxpcie: handle hangup during break
  serial: 8250_lpss: don't divide by 0 above 6.25 Mbaud
  serial: core: respect runtime PM when sending x_char
  vt: serialise the producers of the flip buffer
  tty: fix misapplied compat_ptr() in tty_compat_ioctl()
  serial: 8250_hp300: reorder HPDCA code
  serial: 8250_exar: check priv-&gt;gpio properly
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull tty/serial driver fixes from Greg KH:
 "Here are some small tty and serial driver fixes for reported problems
  for 7.4-rc4. Included in here are:

   - tty driver and vt fixes reported and fixed by Josef Bacik and Chris
     Mason

   - some serial driver fixes by Jiri for found problems

  All of these have been in linux-next for almost 2 weeks now, with no
  reported issues"

* tag 'tty-7.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  serial: samsung: put the previous baud clock
  serial: samsung: don't leak the tty on an RX IRQ
  serial: rda: free the interrupt on shutdown
  serial: imx: fix the tty reference of the wakeup event
  serial: fsl_lpuart: fix tty ref of wakeup event
  serial: 8250_mxpcie: handle hangup during break
  serial: 8250_lpss: don't divide by 0 above 6.25 Mbaud
  serial: core: respect runtime PM when sending x_char
  vt: serialise the producers of the flip buffer
  tty: fix misapplied compat_ptr() in tty_compat_ioctl()
  serial: 8250_hp300: reorder HPDCA code
  serial: 8250_exar: check priv-&gt;gpio properly
</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: refresh kmalloc_obj() conversions</title>
<updated>2026-11-06T05:55:37+00:00</updated>
<author>
<name>Kees Cook</name>
<email>kees+treewide@kernel.org</email>
</author>
<published>2026-10-29T06:08:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0af298e62e5cff4ebf9bec47b8711177a7e2f115'/>
<id>0af298e62e5cff4ebf9bec47b8711177a7e2f115</id>
<content type='text'>
Refresh the tree with run of the existing Coccinelle rules in
scripts/coccinelle/api/kmalloc_objs.cocci, now that they also convert
arrays of multi-byte integers.

The conversions break down as:

	435	kzalloc_objs()
	169	kmalloc_objs()
	 52	kvzalloc_objs()
	 47	kzalloc_obj()
	 42	kvmalloc_objs()
	  8	kmalloc_obj()
	  2	kzalloc_flex()
	  2	kvmalloc_flex()

and 37 existing kmalloc_obj() family calls drop a redundant GFP_KERNEL.

Build tested with allmodconfig on x86_64 with GCC 16.2.0, and, together
with the devm_kmalloc_obj() conversion that follows, on x86_64, arm64,
i386, arm, riscv, s390, m68k, mips, parisc, sparc, loongarch, arc,
xtensa, and openrisc with GCC 16.2.0 with no new warnings.

Signed-off-by: Kees Cook &lt;kees+treewide@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Refresh the tree with run of the existing Coccinelle rules in
scripts/coccinelle/api/kmalloc_objs.cocci, now that they also convert
arrays of multi-byte integers.

The conversions break down as:

	435	kzalloc_objs()
	169	kmalloc_objs()
	 52	kvzalloc_objs()
	 47	kzalloc_obj()
	 42	kvmalloc_objs()
	  8	kmalloc_obj()
	  2	kzalloc_flex()
	  2	kvmalloc_flex()

and 37 existing kmalloc_obj() family calls drop a redundant GFP_KERNEL.

Build tested with allmodconfig on x86_64 with GCC 16.2.0, and, together
with the devm_kmalloc_obj() conversion that follows, on x86_64, arm64,
i386, arm, riscv, s390, m68k, mips, parisc, sparc, loongarch, arc,
xtensa, and openrisc with GCC 16.2.0 with no new warnings.

Signed-off-by: Kees Cook &lt;kees+treewide@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vt: serialise the producers of the flip buffer</title>
<updated>2026-11-03T12:28:52+00:00</updated>
<author>
<name>Chris Mason</name>
<email>mason@kernel.org</email>
</author>
<published>2026-10-27T11:06:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5d1d814408c1c8e797031eac8ddd40de1a9e8e93'/>
<id>5d1d814408c1c8e797031eac8ddd40de1a9e8e93</id>
<content type='text'>
Typing on a virtual console while the console replies to an escape
sequence can make the kernel write past the end of a buffer. A user who
can write to the foreground console can cause this on purpose if they
can also inject key events, through /dev/uinput or by writing to the
/dev/input/event* node of a keyboard.

Input for a tty goes through the flip buffer of its port. A driver
inserts the data with tty_insert_flip_*() and then calls
tty_flip_buffer_push() to pass it on to the line discipline. The insert
functions take no lock: they check that the current struct tty_buffer
has room, copy the data to offset -&gt;used, and then advance -&gt;used. So a
flip buffer supports only one producer at a time, and a driver that has
several must serialise them.

Four functions feed the flip buffer of a virtual console:

- put_queue(), puts_queue() and fn_send_intr() insert typed characters
  and breaks for the keyboard handler. They run under kbd_event_lock.
- respond_string() inserts the reply when a program writes an escape
  sequence that requests one, such as a cursor position report. It runs
  under the console lock.

The keyboard handler gets its events from the input layer and feeds the
foreground console. Key events that a program writes to /dev/uinput or
to an event node reach it in the same way as typed keys.

The keyboard handler and respond_string() share no lock, so they can
interleave:

    keyboard handler                respond_string()
    ================                ================
    room check passes
                                    room check passes
    memcpy() to offset used
    used += len
                                    memcpy() to offset used
                                    used += len
                                      /* used &gt; size of the buffer */

The room check subtracts -&gt;used from the size, and both are unsigned.
Once -&gt;used exceeds the size, the result wraps, so the check always
passes, and each later insert lands further past the buffer.

Reproduced as root, with keys from a uinput keyboard and cursor position
reports on the same console: KFENCE reported an out-of-bounds write
1,024 bytes past the buffer in under 10 s.

Fix this by taking port-&gt;lock, with interrupts disabled, around the
insert and the push in these four functions. kbd_keycode() already takes
port-&gt;lock under kbd_event_lock, so this lock ordering is not new.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable &lt;stable@kernel.org&gt;
Cc: Jiri Slaby &lt;jirislaby@kernel.org&gt;
Cc: Nicolas Pitre &lt;npitre@baylibre.com&gt;
Cc: Kees Cook &lt;kees+treewide@kernel.org&gt;
Cc: Joshua Rogers &lt;linux@joshua.hu&gt;
Cc: Chris Mason &lt;mason@kernel.org&gt;
Cc: Helge Deller &lt;deller@gmx.de&gt;
Cc: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Cc: Mingyu Wang &lt;25181214217@stu.xidian.edu.cn&gt;
Cc: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Ronan Pigott &lt;ronan@rjp.ie&gt;
Cc: Liav Mordouch &lt;liavmordouch@gmail.com&gt;
Signed-off-by: Chris Mason &lt;mason@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://patch.msgid.link/20261027-tty-llm-v1-1-99b0202ae546@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Typing on a virtual console while the console replies to an escape
sequence can make the kernel write past the end of a buffer. A user who
can write to the foreground console can cause this on purpose if they
can also inject key events, through /dev/uinput or by writing to the
/dev/input/event* node of a keyboard.

Input for a tty goes through the flip buffer of its port. A driver
inserts the data with tty_insert_flip_*() and then calls
tty_flip_buffer_push() to pass it on to the line discipline. The insert
functions take no lock: they check that the current struct tty_buffer
has room, copy the data to offset -&gt;used, and then advance -&gt;used. So a
flip buffer supports only one producer at a time, and a driver that has
several must serialise them.

Four functions feed the flip buffer of a virtual console:

- put_queue(), puts_queue() and fn_send_intr() insert typed characters
  and breaks for the keyboard handler. They run under kbd_event_lock.
- respond_string() inserts the reply when a program writes an escape
  sequence that requests one, such as a cursor position report. It runs
  under the console lock.

The keyboard handler gets its events from the input layer and feeds the
foreground console. Key events that a program writes to /dev/uinput or
to an event node reach it in the same way as typed keys.

The keyboard handler and respond_string() share no lock, so they can
interleave:

    keyboard handler                respond_string()
    ================                ================
    room check passes
                                    room check passes
    memcpy() to offset used
    used += len
                                    memcpy() to offset used
                                    used += len
                                      /* used &gt; size of the buffer */

The room check subtracts -&gt;used from the size, and both are unsigned.
Once -&gt;used exceeds the size, the result wraps, so the check always
passes, and each later insert lands further past the buffer.

Reproduced as root, with keys from a uinput keyboard and cursor position
reports on the same console: KFENCE reported an out-of-bounds write
1,024 bytes past the buffer in under 10 s.

Fix this by taking port-&gt;lock, with interrupts disabled, around the
insert and the push in these four functions. kbd_keycode() already takes
port-&gt;lock under kbd_event_lock, so this lock ordering is not new.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable &lt;stable@kernel.org&gt;
Cc: Jiri Slaby &lt;jirislaby@kernel.org&gt;
Cc: Nicolas Pitre &lt;npitre@baylibre.com&gt;
Cc: Kees Cook &lt;kees+treewide@kernel.org&gt;
Cc: Joshua Rogers &lt;linux@joshua.hu&gt;
Cc: Chris Mason &lt;mason@kernel.org&gt;
Cc: Helge Deller &lt;deller@gmx.de&gt;
Cc: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Cc: Mingyu Wang &lt;25181214217@stu.xidian.edu.cn&gt;
Cc: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Ronan Pigott &lt;ronan@rjp.ie&gt;
Cc: Liav Mordouch &lt;liavmordouch@gmail.com&gt;
Signed-off-by: Chris Mason &lt;mason@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://patch.msgid.link/20261027-tty-llm-v1-1-99b0202ae546@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vt: Remove old-style con_blank</title>
<updated>2026-10-25T07:36:08+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2026-10-23T13:16:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e220f288b76b734e749c0035cc79a98b920a24d5'/>
<id>e220f288b76b734e749c0035cc79a98b920a24d5</id>
<content type='text'>
All consoles implement the new con_blank plus con_unblank. Remove
the old semantics from con_blank. Always pass a VESA blank mode to
the blank parameter.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All consoles implement the new con_blank plus con_unblank. Remove
the old semantics from con_blank. Always pass a VESA blank mode to
the blank parameter.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vt: Add con_unblank callback to struct consw</title>
<updated>2026-10-25T07:36:07+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2026-10-23T13:16:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=dc2f8fbbe8f1cc657b814ddc3e854bdd8dbbc63f'/>
<id>dc2f8fbbe8f1cc657b814ddc3e854bdd8dbbc63f</id>
<content type='text'>
Add struct consw.con_unblank as inverse operation to con_blank.

If implemented invoke con_blank to turn the console from blanked to
unblanked. Also update the semantics of con_blank in this case: The
blank parameter of con_blank receives a VESA blank mode from enum
vesa_blank_mode instead of the hybrid unblank/blank values it has
used so far.

With con_unblank not implemented, invoke con_blank for blanking and
unblanking as before.

The old semantics of con_blank will be removed when all consoles
implement con_unblank.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add struct consw.con_unblank as inverse operation to con_blank.

If implemented invoke con_blank to turn the console from blanked to
unblanked. Also update the semantics of con_blank in this case: The
blank parameter of con_blank receives a VESA blank mode from enum
vesa_blank_mode instead of the hybrid unblank/blank values it has
used so far.

With con_unblank not implemented, invoke con_blank for blanking and
unblanking as before.

The old semantics of con_blank will be removed when all consoles
implement con_unblank.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'fbdev-for-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev</title>
<updated>2026-10-25T05:11:27+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-10-25T05:11:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0dfc0090b925243490b5b71bc9a229517cda499a'/>
<id>0dfc0090b925243490b5b71bc9a229517cda499a</id>
<content type='text'>
Pull fbdev updates from Helge Deller:
 "A whole lot of small fixes all over many drivers, but the majority of
  changes are related to code cleanups regarding the cursor handling in
  vt and fbcon.

  Fixes:
   - core: initialize modelist in framebuffer_alloc()
   - core: bitblit: fix glyph clipping when fbcon pans
   - fbcon: restore font geometry if font rotation fails
   - sh_mobile_lcdcfb: restore the per-overlay sysfs attributes
   - udlfb: don't rebuild the mode list while the framebuffer is in use
   - atmel_lcdfb: prevent FIFO work after removal

  Cleanups:
   - vt, fbcon, vgacon: cursor code rework &amp; cleanups
   - MAINTAINERS: name the deller/linux-fbdev for-next branch
   - drop unused FB_IOMEM_HELPERS_DEFERRED Kconfig option
   - acornfb: remove unused code
   - atafb: fix sparse warnings and avoid casts
   - sstfb: use managed PCI device enable
   - gxt4500, kyro, nvidia: release write-combining handle on probe failure
   - various drivers: typo fixes in comments
   - various drivers: fix error path on fb_deferred_io_init() failure
   - various drivers: use FB blanking constants instead of VESA constants"

* tag 'fbdev-for-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: (53 commits)
  fbdev: xilinxfb: Use FB blanking constants
  fbdev: platinumfb: Use FB blanking constants
  fbdev: sa1100fb: Remove comment on VESA DPMS modes
  fbdev: i810fb: Use FB blanking constants
  fbdev: au1100fb: Use FB blanking constants
  fbcon: Retry rotated font allocation after failure
  fbcon: Rebuild rotated font buffer on font change
  fbcon: Include font geometry in the rotated font cache
  fbdev: bitblit: Fix glyph clipping when fbcon pans
  fbcon: Replace fbcon_fill_cursor_mask() with fbcon_cursor_glyph()
  lib/fonts: Add font_glyph_cursor() helper
  vgacon: Use vt_cursor_{start,end}()
  vgacon: Remove trailing whitespaces
  vt: Add cursor-size helpers
  MAINTAINERS: name the deller/linux-fbdev for-next branch
  fbdev: atafb: avoid cast when assigning buffer address pointer
  fbdev: atafb: fix sparse warnings
  fbdev: atyfb_base: fix typos in comments
  fbdev: aty128fb: fix typos in comments
  fbdev: mach64: fix typos in comments
  ...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull fbdev updates from Helge Deller:
 "A whole lot of small fixes all over many drivers, but the majority of
  changes are related to code cleanups regarding the cursor handling in
  vt and fbcon.

  Fixes:
   - core: initialize modelist in framebuffer_alloc()
   - core: bitblit: fix glyph clipping when fbcon pans
   - fbcon: restore font geometry if font rotation fails
   - sh_mobile_lcdcfb: restore the per-overlay sysfs attributes
   - udlfb: don't rebuild the mode list while the framebuffer is in use
   - atmel_lcdfb: prevent FIFO work after removal

  Cleanups:
   - vt, fbcon, vgacon: cursor code rework &amp; cleanups
   - MAINTAINERS: name the deller/linux-fbdev for-next branch
   - drop unused FB_IOMEM_HELPERS_DEFERRED Kconfig option
   - acornfb: remove unused code
   - atafb: fix sparse warnings and avoid casts
   - sstfb: use managed PCI device enable
   - gxt4500, kyro, nvidia: release write-combining handle on probe failure
   - various drivers: typo fixes in comments
   - various drivers: fix error path on fb_deferred_io_init() failure
   - various drivers: use FB blanking constants instead of VESA constants"

* tag 'fbdev-for-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: (53 commits)
  fbdev: xilinxfb: Use FB blanking constants
  fbdev: platinumfb: Use FB blanking constants
  fbdev: sa1100fb: Remove comment on VESA DPMS modes
  fbdev: i810fb: Use FB blanking constants
  fbdev: au1100fb: Use FB blanking constants
  fbcon: Retry rotated font allocation after failure
  fbcon: Rebuild rotated font buffer on font change
  fbcon: Include font geometry in the rotated font cache
  fbdev: bitblit: Fix glyph clipping when fbcon pans
  fbcon: Replace fbcon_fill_cursor_mask() with fbcon_cursor_glyph()
  lib/fonts: Add font_glyph_cursor() helper
  vgacon: Use vt_cursor_{start,end}()
  vgacon: Remove trailing whitespaces
  vt: Add cursor-size helpers
  MAINTAINERS: name the deller/linux-fbdev for-next branch
  fbdev: atafb: avoid cast when assigning buffer address pointer
  fbdev: atafb: fix sparse warnings
  fbdev: atyfb_base: fix typos in comments
  fbdev: aty128fb: fix typos in comments
  fbdev: mach64: fix typos in comments
  ...
</pre>
</div>
</content>
</entry>
<entry>
<title>vt: Add cursor-size helpers</title>
<updated>2026-10-19T11:56:00+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2026-10-05T13:30:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1438d00569c4c3d19ac46147b2791a3e9284fc47'/>
<id>1438d00569c4c3d19ac46147b2791a3e9284fc47</id>
<content type='text'>
Cursors in the VT subsystem are blocks within a character cell that are
filled with the foreground color. The new helpers vc_cursor_start() and
vc_cursor_end() return the scanlines in which the cursor block starts rsp.
ends. This is compatible with VGA hardware.

In terms of cursor design, the new cursor-size helpers follow established
styles in fbcon. The only exception is in underline cursors for fonts with
a size larger than 10. The underlining dash is now one pixel closer to
the font-glyph data, so that the cursor looks less detached. This follows
the style used by vgacon.

Users control the cursor size with the vt module's parameter cur_default
or with the ESC sequence \e[?Nc, where N is the cursor-size constant. In
case of an invalid setting, the new helpers fall back to cur_default and
then underline cursors; in this order.

Similar code in vgacon and fbcon ignores the cursor's default size stored
in vt.cur_default. The consoles default to full-block cursors, while vt
defaults to underline cursors. VGA BIOSes also tend to use underline by.
default. Upon initialization vt applies its default to the console, but
each console might fall back to it own default. For example, running the
ESC code from above with the invalid constant of 8 magically flips the
cursor from underline to block size on vgacon. Another call with N set
to 0 (i.e., default) magically flips it back to underlyine. Making
underline the new default everywhere harmonizes vt, fbcon and most VGA
BIOSes.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Helge Deller &lt;deller@gmx.de&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Cursors in the VT subsystem are blocks within a character cell that are
filled with the foreground color. The new helpers vc_cursor_start() and
vc_cursor_end() return the scanlines in which the cursor block starts rsp.
ends. This is compatible with VGA hardware.

In terms of cursor design, the new cursor-size helpers follow established
styles in fbcon. The only exception is in underline cursors for fonts with
a size larger than 10. The underlining dash is now one pixel closer to
the font-glyph data, so that the cursor looks less detached. This follows
the style used by vgacon.

Users control the cursor size with the vt module's parameter cur_default
or with the ESC sequence \e[?Nc, where N is the cursor-size constant. In
case of an invalid setting, the new helpers fall back to cur_default and
then underline cursors; in this order.

Similar code in vgacon and fbcon ignores the cursor's default size stored
in vt.cur_default. The consoles default to full-block cursors, while vt
defaults to underline cursors. VGA BIOSes also tend to use underline by.
default. Upon initialization vt applies its default to the console, but
each console might fall back to it own default. For example, running the
ESC code from above with the invalid constant of 8 magically flips the
cursor from underline to block size on vgacon. Another call with N set
to 0 (i.e., default) magically flips it back to underlyine. Making
underline the new default everywhere harmonizes vt, fbcon and most VGA
BIOSes.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Helge Deller &lt;deller@gmx.de&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge 7.3-rc6 into tty-next</title>
<updated>2026-10-05T07:40:08+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2026-10-05T07:40:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=36844ea19656fb41278799ef3d5cd52120d89149'/>
<id>36844ea19656fb41278799ef3d5cd52120d89149</id>
<content type='text'>
Resolves a bunch of merge conflicts with serial driver changes and we
need the fixes in here for testing and future patches.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Resolves a bunch of merge conflicts with serial driver changes and we
need the fixes in here for testing and future patches.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vt: selection: Fix unsigned underflow and slab-out-of-bounds read in paste_selection()</title>
<updated>2026-10-01T09:15:46+00:00</updated>
<author>
<name>Hui Peng</name>
<email>benquike@gmail.com</email>
</author>
<published>2026-09-19T11:00:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=39495ef5d6f8019e62d65807f217a7ca8232727a'/>
<id>39495ef5d6f8019e62d65807f217a7ca8232727a</id>
<content type='text'>
In paste_selection(), the loop copies min_t(unsigned int,
vc_sel.buf_len - pasted,tty-&gt;receive_room) bytes per iteration into
tty_ldisc_receive_buf() and increments pasted += count.

Because the selection mutex (vc_sel.lock) is dropped inside the loop
Whenever the line discipline buffer fills up and paste_selection()
sleeps on tty-&gt;write_wait, a concurrent TIOCLINUX (TIOCL_SETSEL) ioctl
can replace vc_sel.buffer with a shorter selection and reduce
vc_sel.buf_len below pasted.

When paste_selection() resumes, vc_sel.buf_len - pasted underflows as an
unsigned integer to a large positive value, causing
tty_ldisc_receive_buf(ld, vc_sel.buffer + pasted, NULL, count) to read
up to 4094 bytes out-of-bounds past the newly allocated vc_sel.buffer.

Fix this by terminating the loop when pasted &gt;= vc_sel.buf_len.

Kernel stack trace (Linux 7.3.0-rc3):
 ==================================================================
 BUG: KASAN: slab-out-of-bounds in n_tty_receive_buf_common+0xa01/0x1650
 Read of size 4094 at addr ffff888101c58010 by task kworker/u17:1/65
 Workqueue: events_unbound flush_to_ldisc
 Call Trace:
  &lt;TASK&gt;
  dump_stack_lvl+0x70/0xa0
  print_report+0x153/0x4c6
  kasan_report+0xf1/0x120
  kasan_check_range+0x11c/0x200
  __asan_memcpy+0x29/0x70
  n_tty_receive_buf_common+0xa01/0x1650
  tty_ldisc_receive_buf+0x66/0x110
  tty_port_default_receive_buf+0x6b/0xb0
  flush_to_ldisc+0x1b4/0x410
  process_one_work+0x6ff/0x1110
  worker_thread+0x4a8/0xb70
  kthread+0x307/0x3e0
  ret_from_fork+0x3ed/0x680
  &lt;/TASK&gt;
 ==================================================================

Fixes: e8c75a30a23c ("vt: selection, push sel_lock up")
Cc: stable &lt;stable@kernel.org&gt;
Assisted-by: LLM
Signed-off-by: Hui Peng &lt;benquike@gmail.com&gt;
Link: https://patch.msgid.link/20260919110041.3763078-1-benquike@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In paste_selection(), the loop copies min_t(unsigned int,
vc_sel.buf_len - pasted,tty-&gt;receive_room) bytes per iteration into
tty_ldisc_receive_buf() and increments pasted += count.

Because the selection mutex (vc_sel.lock) is dropped inside the loop
Whenever the line discipline buffer fills up and paste_selection()
sleeps on tty-&gt;write_wait, a concurrent TIOCLINUX (TIOCL_SETSEL) ioctl
can replace vc_sel.buffer with a shorter selection and reduce
vc_sel.buf_len below pasted.

When paste_selection() resumes, vc_sel.buf_len - pasted underflows as an
unsigned integer to a large positive value, causing
tty_ldisc_receive_buf(ld, vc_sel.buffer + pasted, NULL, count) to read
up to 4094 bytes out-of-bounds past the newly allocated vc_sel.buffer.

Fix this by terminating the loop when pasted &gt;= vc_sel.buf_len.

Kernel stack trace (Linux 7.3.0-rc3):
 ==================================================================
 BUG: KASAN: slab-out-of-bounds in n_tty_receive_buf_common+0xa01/0x1650
 Read of size 4094 at addr ffff888101c58010 by task kworker/u17:1/65
 Workqueue: events_unbound flush_to_ldisc
 Call Trace:
  &lt;TASK&gt;
  dump_stack_lvl+0x70/0xa0
  print_report+0x153/0x4c6
  kasan_report+0xf1/0x120
  kasan_check_range+0x11c/0x200
  __asan_memcpy+0x29/0x70
  n_tty_receive_buf_common+0xa01/0x1650
  tty_ldisc_receive_buf+0x66/0x110
  tty_port_default_receive_buf+0x6b/0xb0
  flush_to_ldisc+0x1b4/0x410
  process_one_work+0x6ff/0x1110
  worker_thread+0x4a8/0xb70
  kthread+0x307/0x3e0
  ret_from_fork+0x3ed/0x680
  &lt;/TASK&gt;
 ==================================================================

Fixes: e8c75a30a23c ("vt: selection, push sel_lock up")
Cc: stable &lt;stable@kernel.org&gt;
Assisted-by: LLM
Signed-off-by: Hui Peng &lt;benquike@gmail.com&gt;
Link: https://patch.msgid.link/20260919110041.3763078-1-benquike@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vt: skip screen update for DEC alignment test on backgroup consoles</title>
<updated>2026-10-01T09:15:34+00:00</updated>
<author>
<name>Zizhi Wo</name>
<email>wozizhi@huawei.com</email>
</author>
<published>2026-09-05T06:43:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0928ed9bd7946baee911efa401088697836e3b1e'/>
<id>0928ed9bd7946baee911efa401088697836e3b1e</id>
<content type='text'>
[BUG]
Recently, we encountered a KASAN warning as follows:

BUG: KASAN: slab-out-of-bounds in fb_pad_aligned_buffer+0x11f/0x140
Read of size 1 at addr ff1100015fd9f6a4 by task tty_fbcon_oob/1239
CPU: 7 UID: 0 PID: 1239 Comm: tty_fbcon_oob Not tainted 7.3.0-rc1 #100 PREEMPT(full)
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.17.0-4.fc41 04/01/2014
Call Trace:
 &lt;TASK&gt;
 ...
 kasan_report+0xf0/0x120
 fb_pad_aligned_buffer+0x11f/0x140
 ccw_putcs+0x86c/0xa80
 fbcon_putcs+0x338/0x410
 do_update_region+0x21d/0x450
 do_con_write+0x1e0e/0x4880
 con_write+0x13/0x80
 n_tty_write+0x374/0x1010
 file_tty_write.isra.0+0x404/0x7a0
 ...

reproduce:
1) open /dev/tty0, set a KDFONTOP ioctl with op.op = KD_FONT_OP_SET,
op.width = 8 and op.height = 16 (visible VC1)
2) open /dev/tty1, set a KDFONTOP ioctl with op.op = KD_FONT_OP_SET,
op.width = 28 and op.height = 24 (invisible VC2)
3) echo 3 &gt; /sys/devices/virtual/graphics/fbcon/rotate_all
4) write EShash8(esc hash8) to tty1

[CAUSE]
All VCs render to the framebuffer. setfont only modifies the target VC's
font without resizing the framebuffer backing buffer (par-&gt;rotated.buf);
the buffer is only resized for the visible VC
(fbcon_do_set_font -&gt; ... -&gt; vc_do_resize -&gt; update_screen). This relies on
the con_should_update() check performed before every update_region().

However, the ESC # 8 path (do_con_trol -&gt; do_update_region) omits the
con_should_update() check. After changing the font size of an invisible VC,
do_update_region() fills using the new font size against a buffer that was
never resized, causing an out-of-bounds access.

[FIX]
Only push the update when the console is visible and not blanked, add
the con_should_update() check in the do_con_trol() like every other call
site of do_update_region() (update_region(), invert_screen(), ...).

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Zizhi Wo &lt;wozizhi@huawei.com&gt;
Link: https://patch.msgid.link/20260905064337.3083103-1-wozizhi@huaweicloud.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[BUG]
Recently, we encountered a KASAN warning as follows:

BUG: KASAN: slab-out-of-bounds in fb_pad_aligned_buffer+0x11f/0x140
Read of size 1 at addr ff1100015fd9f6a4 by task tty_fbcon_oob/1239
CPU: 7 UID: 0 PID: 1239 Comm: tty_fbcon_oob Not tainted 7.3.0-rc1 #100 PREEMPT(full)
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.17.0-4.fc41 04/01/2014
Call Trace:
 &lt;TASK&gt;
 ...
 kasan_report+0xf0/0x120
 fb_pad_aligned_buffer+0x11f/0x140
 ccw_putcs+0x86c/0xa80
 fbcon_putcs+0x338/0x410
 do_update_region+0x21d/0x450
 do_con_write+0x1e0e/0x4880
 con_write+0x13/0x80
 n_tty_write+0x374/0x1010
 file_tty_write.isra.0+0x404/0x7a0
 ...

reproduce:
1) open /dev/tty0, set a KDFONTOP ioctl with op.op = KD_FONT_OP_SET,
op.width = 8 and op.height = 16 (visible VC1)
2) open /dev/tty1, set a KDFONTOP ioctl with op.op = KD_FONT_OP_SET,
op.width = 28 and op.height = 24 (invisible VC2)
3) echo 3 &gt; /sys/devices/virtual/graphics/fbcon/rotate_all
4) write EShash8(esc hash8) to tty1

[CAUSE]
All VCs render to the framebuffer. setfont only modifies the target VC's
font without resizing the framebuffer backing buffer (par-&gt;rotated.buf);
the buffer is only resized for the visible VC
(fbcon_do_set_font -&gt; ... -&gt; vc_do_resize -&gt; update_screen). This relies on
the con_should_update() check performed before every update_region().

However, the ESC # 8 path (do_con_trol -&gt; do_update_region) omits the
con_should_update() check. After changing the font size of an invisible VC,
do_update_region() fills using the new font size against a buffer that was
never resized, causing an out-of-bounds access.

[FIX]
Only push the update when the console is visible and not blanked, add
the con_should_update() check in the do_con_trol() like every other call
site of do_update_region() (update_region(), invert_screen(), ...).

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Zizhi Wo &lt;wozizhi@huawei.com&gt;
Link: https://patch.msgid.link/20260905064337.3083103-1-wozizhi@huaweicloud.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
