Re: [PATCH] tty: limit TCSBRKP break duration
From: Xincheng Wang
Date: Fri Jul 31 2026 - 10:40:54 EST
Hi Greg,
Yes, it would still be user-visible.
My concern is that tty_ioctl() first multiplies the TCSBRKP argument by
100 before passing it to send_break(), whose duration argument is
unsigned int. For values above UINT_MAX / 100, the current behavior uses
the low 32 bits of the multiplied product, which can be a duration very
different from the requested interval.
But I agree that rejecting or saturating that value would also change
current behavior. Would you be open to a fix for this, or would you
rather leave the path as-is?
Thanks,
Xincheng