All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Xincheng Wang <22009200607@stu.xidian.edu.cn>
Cc: Jiri Slaby <jirislaby@kernel.org>,
	linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org
Subject: Re: [PATCH] tty: limit TCSBRKP break duration
Date: Wed, 29 Jul 2026 13:50:43 +0200	[thread overview]
Message-ID: <2026072921-curled-moonlike-1207@gregkh> (raw)
In-Reply-To: <20260729111927.41154-1-22009200607@stu.xidian.edu.cn>

On Wed, Jul 29, 2026 at 07:19:27PM +0800, Xincheng Wang wrote:
> Hi Greg,
> 
> Thanks for the review.
> 
> You are right. The RCU stall I observed does not by itself justify
> clamping long break intervals in the tty core, so I will drop that
> patch.
> 
> While looking at this path, I noticed that tty_ioctl() multiplies the
> TCSBRKP argument by 100 and passes the result to send_break(), whose
> duration argument is unsigned int. Values whose product exceeds UINT_MAX
> are silently truncated to an unintended duration.
> 
> Do you think it is worth fixing that separately by rejecting TCSBRKP
> values that cannot fit in the unsigned-int millisecond duration used by
> send_break()?

Wouldn't that break userspace that is currently relying on that
truncation?

thanks,

greg k-h

  reply	other threads:[~2026-07-29 11:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-27  5:55 [PATCH] tty: limit TCSBRKP break duration Xincheng Wang
2026-07-27  6:25 ` Greg Kroah-Hartman
2026-07-29 11:19   ` Xincheng Wang
2026-07-29 11:50     ` Greg Kroah-Hartman [this message]
2026-07-31 14:30       ` Xincheng Wang
2026-07-31 15:04         ` Greg Kroah-Hartman
2026-08-01 14:23           ` Xincheng Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2026072921-curled-moonlike-1207@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=22009200607@stu.xidian.edu.cn \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.