Here's the output of the test program that we see under bullseye, kernel 5.10.0.-9:
$ ./rbpty TEST len 130 text [123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 ] 130 bytes read buf read: [123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 ] TEST len 129 text [12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678 ] 128 bytes read 1 bytes read buf read: [12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678 ] TEST len 128 text [1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567 ] 128 bytes read buf read: [1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567 ] TEST len 66 text [12345678901234567890123456789012345678901234567890123456789012345 ] 66 bytes read buf read: [12345678901234567890123456789012345678901234567890123456789012345 ] TEST len 65 text [1234567890123456789012345678901234567890123456789012345678901234 ] 64 bytes read 1 bytes read buf read: [1234567890123456789012345678901234567890123456789012345678901234 ] TEST len 64 text [123456789012345678901234567890123456789012345678901234567890123 ] 64 bytes read buf read: [123456789012345678901234567890123456789012345678901234567890123 ] And here is the output of the same program under buster, kernel 4.19.0-18: $ src/rbpty TEST len 130 text [123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 ] 130 bytes read buf read: [123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 ] TEST len 129 text [12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678 ] 129 bytes read buf read: [12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678 ] TEST len 128 text [1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567 ] 128 bytes read buf read: [1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567 ] TEST len 66 text [12345678901234567890123456789012345678901234567890123456789012345 ] 66 bytes read buf read: [12345678901234567890123456789012345678901234567890123456789012345 ] TEST len 65 text [1234567890123456789012345678901234567890123456789012345678901234 ] 65 bytes read buf read: [1234567890123456789012345678901234567890123456789012345678901234 ] TEST len 64 text [123456789012345678901234567890123456789012345678901234567890123 ] 64 bytes read buf read: [123456789012345678901234567890123456789012345678901234567890123 ] John