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
F108434013: D43456.id132773.diff
Fri, Jan 24, 5:54 PM
Unknown Object (File)
Mon, Jan 6, 6:32 AM
Unknown Object (File)
Dec 5 2024, 11:25 AM
Unknown Object (File)
Dec 4 2024, 9:12 PM
Unknown Object (File)
Nov 25 2024, 9:55 PM
Unknown Object (File)
Nov 25 2024, 5:45 PM
Unknown Object (File)
Nov 24 2024, 10:42 PM
Unknown Object (File)
Nov 23 2024, 6:06 PM
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