From: Andrei Borzenkov <arvidjaar@gmail.com>
To: Lennart Poettering <lennart@poettering.net>
Cc: "initramfs@vger.kernel.org" <initramfs@vger.kernel.org>,
"systemd-devel@lists.freedesktop.org"
<systemd-devel@lists.freedesktop.org>
Subject: Re: bpfilter blocks root unmount during shutdown
Date: Mon, 24 Sep 2018 19:30:02 +0300 [thread overview]
Message-ID: <d4aa5a74-d3a2-0865-5afd-7c15cef679f2@gmail.com> (raw)
In-Reply-To: <20180924132047.GD31443@gardel-login>
24.09.2018 16:20, Lennart Poettering пишет:
> On So, 23.09.18 10:38, Andrei Borzenkov (arvidjaar@gmail.com) wrote:
>
>> Dracut /shutdown script first tries to kill all processes still running
>> off old root. Unfortunately this fails for special user process that
>> runs bpfilter because it does not include reference to /oldroot in
>> places where dracut looks for in kilall_proc_mountpoint()
>
> Hmm, when we invoke the /shutdown executable we already executed our
> process killing spree as part of systemd-shutdown. How come your
> processes even survive that long?
p = procfs_file_alloca(pid, "cmdline");
f = fopen(p, "re");
if (!f)
return true; /* not really, but has the desired effect */
count = fread(&c, 1, 1, f);
/* Kernel threads have an empty cmdline */
if (count <= 0)
return true;
This process is spawned as special kernel thread, even though it is
otherwise normal user process.
net/bpfilter/bpfilter_kern.c:load_umh():
/* fork usermode process */
err = fork_usermode_blob(&bpfilter_umh_start,
&bpfilter_umh_end - &bpfilter_umh_start,
&info);
if (err)
return err;
pr_info("Loaded bpfilter_umh pid %d\n", info.pid);
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel
prev parent reply other threads:[~2018-09-24 16:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-23 7:38 bpfilter blocks root unmount during shutdown Andrei Borzenkov
2018-09-24 13:20 ` Lennart Poettering
2018-09-24 14:55 ` Olivier Brunel
2018-09-24 16:30 ` Andrei Borzenkov [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=d4aa5a74-d3a2-0865-5afd-7c15cef679f2@gmail.com \
--to=arvidjaar@gmail.com \
--cc=initramfs@vger.kernel.org \
--cc=lennart@poettering.net \
--cc=systemd-devel@lists.freedesktop.org \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).