On Mon, Jan 18, 2021 at 2:03 PM Linus Torvalds <torva...@linux-foundation.org> wrote: > > I'll have a third patch in a moment, but while it's ready I want to > actually reboot and confirm it first.
Here. This is an actually usable and tested starting point for this all. Again - it doesn't handle HDLC correctly, because it will chop all reads up into 32-byte chunks. And some other apps that think they'll get whole lines might end up being confused too. So it's not a "real" patch, but with improved buffer handling in tty_read(), I think this is actually quite close. NOTE: due to security reasons (ie password data), we do want to clear that buffer after we've copied the data to user space. Again, not something I did in my patch, so it would be part of that "improved buffer handling" Linus
patch
Description: Binary data