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: Fri, 31 Jul 2026 17:04:40 +0200	[thread overview]
Message-ID: <2026073157-expend-unzip-cad7@gregkh> (raw)
In-Reply-To: <20260731143041.6400-1-22009200607@stu.xidian.edu.cn>

On Fri, Jul 31, 2026 at 10:30:41PM +0800, Xincheng Wang wrote:
> 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?

I lost all context here :(

ANyway, keeping things as-is is always good, unless you know of a way
the current stuff is broken and you can fix it without changing any
existing users.  user apis are hard...

thanks,

greg k-h

  reply	other threads:[~2026-07-31 15:04 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
2026-07-31 14:30       ` Xincheng Wang
2026-07-31 15:04         ` Greg Kroah-Hartman [this message]
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=2026073157-expend-unzip-cad7@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.