A text cursor in the tty; LDLS sets net_device.priv_len
The virtual terminals never drew a cursor. Each now paints a steady block (the cell with its colours swapped), erased before and redrawn after every output byte, redrawn by a repaint, and hidden by ESC [ ? 25 l as curses programs ask. r8169 under LDLS on the TUF A15 got through probe and died in ndo_open on __fortify_panic. netdev_priv() is `dev->priv` now, a flexible array counted by net_device.priv_len, and rtl_open's memset of its ring bookkeeping is bounds-checked against it. The allocator left priv_len zero, so the driver saw an area of no bytes. It is set from BTF when the kernel has the member. __fortify_panic also says which check, how many bytes it had and wanted, and where from. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015f73FesGZGYPkmDvUcj6QX
This commit is contained in:
parent
a9d2e14004
commit
96389ada8f
7 changed files with 86 additions and 5 deletions
|
|
@ -112,6 +112,16 @@ struct vt {
|
|||
int esc_parm[VT_MAXPARM];
|
||||
int esc_nparm;
|
||||
int esc_private;
|
||||
int esc_qmark; // the marker was '?': a DEC private mode
|
||||
|
||||
// The text cursor, a steady block. Drawn by painting its cell inverted over
|
||||
// the grid, so the grid never holds it: curs_drawn says whether the screen
|
||||
// currently does, and where, because erasing it means repainting that cell
|
||||
// from the grid -- after the byte that moves the cursor has been consumed.
|
||||
// DECTCEM (ESC [ ? 25 l) hides it; curses programs do before drawing.
|
||||
int curs_hidden;
|
||||
int curs_drawn;
|
||||
int curs_x, curs_y;
|
||||
|
||||
// UTF-8 decoder.
|
||||
uint32 u8_cp;
|
||||
|
|
|
|||
Loading…
Reference in a new issue