From: Oleg Nesterov <oleg@redhat.com>
To: Jamie Iles <jamie.iles@oracle.com>
Cc: "Dmitry Vyukov" <dvyukov@google.com>,
syzbot
<bot+c9f0eb0d2a5576ece331a767528e6b52b4ff1815@syzkaller.appspotmail.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Arvind Yadav" <arvind.yadav.cs@gmail.com>,
"Mark Brown" <broonie@kernel.org>,
"Eric W. Biederman" <ebiederm@xmission.com>,
"Frédéric Weisbecker" <fweisbec@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
mchehab@kernel.org, "Ingo Molnar" <mingo@kernel.org>,
mpe@ellerman.id.au, syzkaller-bugs@googlegroups.com,
"Al Viro" <viro@zeniv.linux.org.uk>,
"Kyle Huey" <me@kylehuey.com>,
"Kees Cook" <keescook@chromium.org>
Subject: Re: WARNING in task_participate_group_stop
Date: Mon, 6 Nov 2017 15:31:38 +0100 [thread overview]
Message-ID: <20171106143138.GA17423@redhat.com> (raw)
In-Reply-To: <20171106112508.lun6eftpj5icnvdy@cedar>
On 11/06, Jamie Iles wrote:
>
> I'm unable to reproduce the warning in qemu with SMP (on a 32 CPU VM).
Neither me. Perhaps because I tried this test-case on the minimal system
with /bin/sh running as init process.
> Instead I get the following instant traceback which is different to what
> you report when run as root:
>
> [ 45.018469] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000013
> [ 45.018469]
> [ 45.019669] CPU: 19 PID: 1 Comm: systemd Not tainted 4.14.0-rc8 #7
> [ 45.021094] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.1-1ubuntu1 04/01/2014
> [ 45.022768] Call Trace:
> [ 45.023076] dump_stack+0x12e/0x188
> [ 45.023481] panic+0x1e4/0x417
This is fine and hopefully confirms the theory. let me quote my previous email:
line 111 r[8] = syscall(__NR_ptrace, 0x10ul, r[7]);
this is PTRACE_ATTACH
line 115 syscall(__NR_ptrace, 0x4200ul, r[7], 0x40000012ul, 0x100012ul);
this is PTRACE_SETOPTIONS and "data" includes PTRACE_O_EXITKILL.
r[7] is initialized at
line 110 r[7] = *(uint32_t*)0x20f9cffc;
so if it is eq to 1 then it can attach to init and in this case the problem
can be explained by the wrong SIGNAL_UNKILLABLE/SIGKILL logic.
So, if it is eq to 1 then init will be killed after the child process created
by loop() function exits (see PTRACE_O_EXITKILL above).
This is correct, only the warning is not.
For example, this command does ptrace(PTRACE_SEIZE, 1,0, PTRACE_O_EXITKILL)
# perl -e 'syscall 101, 0x4206, 1, 0, 0x100000'
and crashes the kernel the same way, this is correct.
Oleg.
next prev parent reply other threads:[~2017-11-06 14:31 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-30 19:12 WARNING in task_participate_group_stop syzbot
2017-10-30 19:20 ` Dmitry Vyukov
2017-10-31 16:34 ` Oleg Nesterov
2017-11-01 5:55 ` Dmitry Vyukov
2017-11-02 17:01 ` Oleg Nesterov
2017-11-06 11:02 ` Dmitry Vyukov
2017-11-06 11:25 ` Jamie Iles
2017-11-06 11:56 ` Dmitry Vyukov
2017-11-06 12:26 ` Jamie Iles
2017-11-06 14:31 ` Oleg Nesterov [this message]
2017-11-07 17:31 ` Dmitry Vyukov
-- strict thread matches above, loose matches on Subject: below --
2015-11-02 13:25 Dmitry Vyukov
2015-11-02 15:13 ` Oleg Nesterov
2015-11-02 14:21 ` Dmitry Vyukov
2015-11-02 15:33 ` Oleg Nesterov
2015-11-02 16:36 ` Oleg Nesterov
2015-11-02 18:06 ` Oleg Nesterov
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=20171106143138.GA17423@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=arvind.yadav.cs@gmail.com \
--cc=bot+c9f0eb0d2a5576ece331a767528e6b52b4ff1815@syzkaller.appspotmail.com \
--cc=broonie@kernel.org \
--cc=dvyukov@google.com \
--cc=ebiederm@xmission.com \
--cc=fweisbec@gmail.com \
--cc=jamie.iles@oracle.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mchehab@kernel.org \
--cc=me@kylehuey.com \
--cc=mingo@kernel.org \
--cc=mpe@ellerman.id.au \
--cc=syzkaller-bugs@googlegroups.com \
--cc=viro@zeniv.linux.org.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.