Re: [PATCH] tty: limit TCSBRKP break duration

Xincheng Wang <[email protected]> Fri, 31 Jul 2026 22:30:41 +0800
Newsgroups gmane.linux.kernel,gmane.linux.serial
Message-ID <[email protected]>
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