linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Zhang, Qiang" <Qiang.Zhang@windriver.com>
To: Thomas Gleixner <tglx@linutronix.de>,
	"keescook@chromium.org" <keescook@chromium.org>,
	Ingo Molnar <mingo@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: 转发: upstream test error: WARNING in do_epoll_wait
Date: Fri, 7 Aug 2020 03:11:58 +0000	[thread overview]
Message-ID: <BYAPR11MB26328A938028DD73AC6C3CF7FF490@BYAPR11MB2632.namprd11.prod.outlook.com> (raw)
In-Reply-To: <00000000000080940e05ac1c301e@google.com>



>________________________________________
>发件人: linux-kernel-owner@vger.kernel.org <linux-kernel-owner@vger.kernel.org> >代表 syzbot <syzbot+4429670d8213f5f26352@syzkaller.appspotmail.com>
>发送时间: 2020年8月5日 15:19
>收件人: linux-fsdevel@vger.kernel.org; linux-kernel@vger.kernel.org; >syzkaller->bugs@googlegroups.com; viro@zeniv.linux.org.uk
>主题: upstream test error: WARNING in do_epoll_wait

>Hello,

>syzbot found the following issue on:

>HEAD commit:    4f30a60a Merge tag 'close-range-v5.9' of git://git.kernel...
>git tree:       upstream
>console output: https://syzkaller.appspot.com/x/log.txt?x=14c5a7da900000
>kernel config:  https://syzkaller.appspot.com/x/.config?x=8bdd9944dedf0f16
>dashboard link: https://syzkaller.appspot.com/bug?extid=4429670d8213f5f26352
>compiler:       clang version 11.0.0 (https://github.com/llvm/llvm-project.git >ca2dcbd030eadbf0aa9b660efe864ff08af6e18b)

>IMPORTANT: if you fix the issue, please add the following tag to the commit:
>Reported-by: syzbot+4429670d8213f5f26352@syzkaller.appspotmail.com

>------------[ cut here ]------------
>WARNING: CPU: 1 PID: 8728 at fs/eventpoll.c:1828 ep_poll fs/eventpoll.c:1828 [inline]
>WARNING: CPU: 1 PID: 8728 at fs/eventpoll.c:1828 do_epoll_wait+0x337/0x920 >fs/eventpoll.c:2333
>Kernel panic - not syncing: panic_on_warn set ...
>CPU: 1 PID: 8728 Comm: syz-fuzzer Not tainted 5.8.0-syzkaller #0
>Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS >Google 01/01/2011
>Call Trace:
 >__dump_stack lib/dump_stack.c:77 [inline]
 >dump_stack+0x16e/0x25d lib/dump_stack.c:118
 >panic+0x20c/0x69a kernel/panic.c:231
 >__warn+0x211/0x240 kernel/panic.c:600
 >report_bug+0x153/0x1d0 lib/bug.c:198
 >handle_bug+0x4d/0x90 arch/x86/kernel/traps.c:235
 >exc_invalid_op+0x16/0x70 arch/x86/kernel/traps.c:255
 >asm_exc_invalid_op+0x12/0x20 arch/x86/include/asm/idtentry.h:547
>RIP: 0010:ep_poll fs/eventpoll.c:1828 [inline]
>RIP: 0010:do_epoll_wait+0x337/0x920 fs/eventpoll.c:2333
>Code: 41 be 01 00 00 00 31 c0 48 89 44 24 20 45 31 e4 e9 7f 01 00 00 e8 59 ab c6 ff 41 bc f2 >ff ff ff e9 c8 03 00 00 e8 49 ab c6 ff <0f> 0b e9 58 fe ff ff 49 bf ff ff ff ff ff ff ff 7f e9 f0 fe ff >ff
>RSP: 0018:ffffc90000e1fe28 EFLAGS: 00010293
>RAX: ffffffff81856297 RBX: ffff888120fafa00 RCX: ffff88811e196400
>RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
>RBP: 0000000000000000 R08: ffffffff818560d8 R09: 0000ffff88619eb7
>R10: 0000ffffffffffff R11: 0000000000000000 R12: 00007ffffffff000
>R13: 0000000000000080 R14: 0000000000000001 R15: 0000000000000003
 >__do_sys_epoll_pwait fs/eventpoll.c:2364 [inline]
 >__se_sys_epoll_pwait fs/eventpoll.c:2350 [inline]
 >__x64_sys_epoll_pwait+0x92/0x150 fs/eventpoll.c:2350
 >do_syscall_64+0x6a/0xe0 arch/x86/entry/common.c:384
 >entry_SYSCALL_64_after_hwframe+0x44/0xa9
>RIP: 0033:0x469240
>Code: 0f 05 89 44 24 20 c3 cc cc cc 8b 7c 24 08 48 8b 74 24 10 8b 54 24 18 44 8b 54 24 1c >49 c7 c0 00 00 00 00 b8 19 01 00 00 0f 05 <89> 44 24 20 c3 cc cc cc cc cc cc cc cc cc cc cc >8b 7c 24 08 48 c7
>RSP: 002b:000000c00004b7f0 EFLAGS: 00000246 ORIG_RAX: 0000000000000119
>RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 0000000000469240
>RDX: 0000000000000080 RSI: 000000c00004b840 RDI: 0000000000000003
>RBP: 000000c00004be40 R08: 0000000000000000 R09: 0000000000000000
>R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000003
>R13: 000000c00009cc00 R14: 000000c00032c180 R15: 0000000000000000
>Kernel Offset: disabled
>Rebooting in 86400 seconds..

In "ep_poll" func the lockdep_assert_irqs_enabled detected
 interrupt status, although before enter "ep_poll" func, irq
  is already enabled, but it was missed lockdep irq status set.

--- a/kernel/entry/common.c
+++ b/kernel/entry/common.c
@@ -76,6 +76,7 @@ noinstr long syscall_enter_from_user_mode(struct pt_regs *regs, long syscall)
        instrumentation_begin();
 
        local_irq_enable();
+       lockdep_hardirqs_on(CALLER_ADDR0);
        ti_work = READ_ONCE(current_thread_info()->flags);
        if (ti_work & SYSCALL_ENTER_WORK)
                syscall = syscall_trace_enter(regs, syscall, ti_work);
-- 
Can we should add lockdep_hardirqs_on?


>---
>This report is generated by a bot. It may contain errors.
>See https://goo.gl/tpsmEJ for more information about syzbot.
>syzbot engineers can be reached at syzkaller@googlegroups.com.

>syzbot will keep track of this issue. See:
>https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

      reply	other threads:[~2020-08-07  3:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-05  7:19 upstream test error: WARNING in do_epoll_wait syzbot
2020-08-07  3:11 ` Zhang, Qiang [this message]

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=BYAPR11MB26328A938028DD73AC6C3CF7FF490@BYAPR11MB2632.namprd11.prod.outlook.com \
    --to=qiang.zhang@windriver.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    /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).