Page MenuHomeFreeBSD

kern: tty: recanonicalize the buffer on ICANON/VEOF/VEOL changes
ClosedPublic

Authored by kevans on Jan 15 2024, 5:53 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Mar 28, 1:51 PM
Unknown Object (File)
Tue, Mar 17, 11:04 PM
Unknown Object (File)
Sun, Mar 15, 4:23 AM
Unknown Object (File)
Sun, Mar 8, 6:00 PM
Unknown Object (File)
Mar 3 2026, 2:10 PM
Unknown Object (File)
Mar 2 2026, 3:28 PM
Unknown Object (File)
Mar 1 2026, 11:04 PM
Unknown Object (File)
Mar 1 2026, 9:37 AM
Subscribers
None

Details

Summary

Before this change, we would canonicalize any partial input if the new
local mode is not ICANON, but that's about it. If we were switching
from -ICANON -> ICANON, or if VEOF/VEOL changes, then our internal canon
accounting would be wrong.

The main consequence of this is that in ICANON mode, we would potentially
hang a read(2) longer if the new VEOF/VEOL appears later in the buffer,
and FIONREAD would be similarly wrong as a result.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable