[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#999502: linux-image-5.10.0-9-amd64: read from pty does not return newline on 64-byte boundaries



Hi John,

On Thu, Nov 11, 2021 at 09:39:06PM -0500, John Bazik wrote:
> Package: src:linux
> Version: 5.10.70-1
> Severity: normal
> Tags: upstream
> 
> Dear Maintainer,
> 
> When reading from a pty, a call to read(2) always returns a string
> ending in a newline, except when the text written to the pty
> contains a multiple of 64 characters, plus the newline.  In the
> exceptional case, a second call to read returns just the newline.
> 
> In the previous debian release, buster, with kernel 4.19.0-18-amd64,
> a newline was always returned irrespective of the size of the input.
> 
> This was discovered by students on our operating systems class.  We
> include a test program that exhibits the problem.  The hardware
> referenced in this ticket is a VM, but we saw similar results on
> hardware.

I guess this should be upstream since the changes round 15ea8ae8e03f
("tty: teach n_tty line discipline about the new "cookie
continuations"")[1], cf. [2].

 [1] https://git.kernel.org/linus/15ea8ae8e03fdb845ed3ff5d9f11dd5f4f60252c
 [2] https://git.kernel.org/linux/3b830a9c34d5897be07176ce4e6f2d75e2c8cfd7

Regards,
Salvatore


Reply to: