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
F138070500: D43456.diff
Fri, Nov 28, 3:46 PM
Unknown Object (File)
Tue, Nov 11, 9:11 AM
Unknown Object (File)
Sun, Nov 9, 10:26 PM
Unknown Object (File)
Sun, Nov 2, 9:28 PM
Unknown Object (File)
Sun, Nov 2, 9:28 PM
Unknown Object (File)
Sun, Nov 2, 9:28 PM
Unknown Object (File)
Oct 14 2025, 6:14 AM
Unknown Object (File)
Oct 12 2025, 7:04 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 55442
Build 52331: arc lint + arc unit