From: Jan Kara <jack@suse.cz>
To: Dmitry Vyukov <dvyukov@google.com>
Cc: Jan Kara <jack@suse.cz>,
syzbot <syzbot+29143581b0ded3213e99@syzkaller.appspotmail.com>,
Amir Goldstein <amir73il@gmail.com>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
syzkaller-bugs <syzkaller-bugs@googlegroups.com>
Subject: Re: INFO: task hung in fanotify_handle_event
Date: Mon, 15 Oct 2018 14:45:52 +0200 [thread overview]
Message-ID: <20181015124552.GD30927@quack2.suse.cz> (raw)
In-Reply-To: <CACT4Y+ZabUTpP6HZQVkVDvMYbktn=gP2C-m=ueKK3NRh7teY5A@mail.gmail.com>
Hi Dmirty!
On Mon 15-10-18 14:29:14, Dmitry Vyukov wrote:
> On Mon, Oct 15, 2018 at 2:15 PM, Jan Kara <jack@suse.cz> wrote:
> > Hello,
> >
> > On Mon 15-10-18 04:32:02, syzbot wrote:
> >> syzbot found the following crash on:
> >>
> >> HEAD commit: 90ad18418c2d Merge git://git.kernel.org/pub/scm/linux/kern..
> >> git tree: upstream
> >> console output: https://syzkaller.appspot.com/x/log.txt?x=17f1776e400000
> >> kernel config: https://syzkaller.appspot.com/x/.config?x=88e9a8a39dc0be2d
> >> dashboard link: https://syzkaller.appspot.com/bug?extid=29143581b0ded3213e99
> >> compiler: gcc (GCC) 8.0.1 20180413 (experimental)
> >> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=123459d6400000
> >>
> >> IMPORTANT: if you fix the bug, please add the following tag to the commit:
> >> Reported-by: syzbot+29143581b0ded3213e99@syzkaller.appspotmail.com
> >
> > Syzbot has apparently generated fanotify watch for FAN_OPEN_PERM event and
> > then the process got stuck waiting for userspace to respond to that event -
> > which never happened. So everything works as designed here - the process
> > placing FAN_OPEN_PERM mark is responsible for replying to the generated
> > events as all opens hang waiting for responses. That's why the
> > functionality is behind CAP_SYS_ADMIN after all... Could we fix syzbot to
> > actually generate replies for these events?
>
> Is there a reliable way to kill such processes?
> Or admins are never supposed to kill any root processes and have not
> bugs whatsoever? :)
Currently the wait is not killable but yes, we want to make it killable
exactly because of userspace bugs :). But it is non-trivial because
currently the waker has also other responsibilities and all that stuff has
to be cleaned up when handling killed wait. Konstantin Khlebnikov was
working on that so I might need to prod him.
> syzkaller probably capable of generating replies in some cases, but
> unfortunately it can't work this way. It's practically not possible to
> ensure that it will always generate a proper reply and it will be
> actually delivered and the process won't be killed in the middle, or
> another thread won't crash or call exit_group concurrently, etc. The
> thing either needs to be reliable, work without any but's and be
> reliably killable, or it's not suitable for stress testing.
> If there is no reliable way to kill it, I think we need to disable
> FAN_OPEN_PERM entirely.
Understood. Then just disable FAN_OPEN_PERM & FAN_ACCESS_PERM for now.
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
next prev parent reply other threads:[~2018-10-15 20:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-15 11:32 INFO: task hung in fanotify_handle_event syzbot
2018-10-15 12:15 ` Jan Kara
2018-10-15 12:29 ` Dmitry Vyukov
2018-10-15 12:45 ` Jan Kara [this message]
2018-10-15 17:12 ` Dmitry Vyukov
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=20181015124552.GD30927@quack2.suse.cz \
--to=jack@suse.cz \
--cc=amir73il@gmail.com \
--cc=dvyukov@google.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+29143581b0ded3213e99@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).