Re: WARNING in iov_iter_revert (2)

2021-02-21 Thread Linus Torvalds
On Sat, Feb 20, 2021 at 4:45 PM Linus Torvalds wrote: > > I don't think the ttyprintk weirdness was intentional. I'd fix that, > but in the meantime clearly we should make do_tty_write() protect > against this insanity, and do something like > >--- a/drivers/tty/tty_io.c >+++

Re: WARNING in iov_iter_revert (2)

2021-02-21 Thread Sabyrzhan Tasbolatov
>--- a/drivers/tty/tty_io.c >+++ b/drivers/tty/tty_io.c >@@ -961,6 +961,9 @@ static inline ssize_t do_tty_write( > ret = write(tty, file, tty->write_buf, size); > if (ret <= 0) > break; >+/* ttyprintk historical

Re: WARNING in iov_iter_revert (2)

2021-02-20 Thread Linus Torvalds
[ Let's see how long this lasts, but I've got a generator for the laptop, and hopefully I'll be able to start doing pulls tonight, and get "real" power tomorrow ] On Sat, Feb 20, 2021 at 11:30 AM Al Viro wrote: > > IOW, it's not iov_iter_revert() being weird or do_tty_write() misuing it - > it's

Re: WARNING in iov_iter_revert (2)

2021-02-20 Thread Al Viro
On Sat, Feb 20, 2021 at 07:29:57PM +, Al Viro wrote: > And then you notice that it has reports > successful write of amount other than what you'd passed and tries > to pull back. Sorry, half-edited sentence has escaped ;-/ Should be "And there the caller notices that callback has reported

Re: WARNING in iov_iter_revert (2)

2021-02-20 Thread Al Viro
On Sat, Feb 20, 2021 at 05:38:49PM +, Al Viro wrote: > On Sat, Feb 20, 2021 at 08:56:40AM -0800, Linus Torvalds wrote: > > Al, > > This is the "FIXME! Have Al check this!" case in do_tty_write(). You were > > in on that whole discussion, but we never did get to that issue... > > > > There

Re: WARNING in iov_iter_revert (2)

2021-02-20 Thread Al Viro
On Sat, Feb 20, 2021 at 08:56:40AM -0800, Linus Torvalds wrote: > Al, > This is the "FIXME! Have Al check this!" case in do_tty_write(). You were > in on that whole discussion, but we never did get to that issue... > > There are some subtle rules about doing the iov_iter_revert(), but what's >

Re: WARNING in iov_iter_revert (2)

2021-02-20 Thread syzbot
syzbot has bisected this issue to: commit 9bb48c82aced07698a2d08ee0f1475a6c4f6b266 Author: Linus Torvalds Date: Tue Jan 19 19:41:16 2021 + tty: implement write_iter bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1009a9f2d0 start commit: dcc0b490 Merge tag

WARNING in iov_iter_revert (2)

2021-02-16 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:dcc0b490 Merge tag 'powerpc-5.11-8' of git://git.kernel.or.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=162f2d02d0 kernel config: https://syzkaller.appspot.com/x/.config?x=1106b4b91e8dfab8