From: Luis Chamberlain <mcgrof@kernel.org>
To: Changbin Du <changbin.du@huawei.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org,
Hui Wang <hw.huiwang@huawei.com>, Xiaoyi Su <suxiaoyi@huawei.com>,
Jeffrey Hugo <jhugo@codeaurora.org>
Subject: Re: [PATCH] modules: wait do_free_init correctly
Date: Wed, 20 Dec 2023 06:32:39 -0800 [thread overview]
Message-ID: <ZYL7B59dQ6XFtVP8@bombadil.infradead.org> (raw)
In-Reply-To: <20231220052751.3zcnsnvjk5vf5t7j@M910t>
On Wed, Dec 20, 2023 at 01:27:51PM +0800, Changbin Du wrote:
> On Tue, Dec 19, 2023 at 01:52:03PM -0800, Luis Chamberlain wrote:
> > On Tue, Dec 19, 2023 at 12:51:51PM -0800, Andrew Morton wrote:
> > > On Tue, 19 Dec 2023 22:12:31 +0800 Changbin Du <changbin.du@huawei.com> wrote:
> > >
> > > > The commit 1a7b7d922081 ("modules: Use vmalloc special flag") moves
> > > > do_free_init() into a global workqueue instead of call_rcu(). So now
> > > > we should wait it via flush_work().
> > >
> > > What are the runtime effects of this change?
> >
> > Indeed that's needed given how old this culprit commit is:
> >
> > git describe --contains 1a7b7d922081
> > v5.2-rc1~192^2~5
> >
> > Who did this work and for what reason? What triggered this itch?
> >
> Seems the waiting was introduced by commit ae646f0b9ca ("init: fix false positives
> in W+X checking").
>
> As what I have observed, mark_readonly() is only invoked by the first user mode
> thread function kernel_init(), which is before userspace /init. So is it real
> possible we have loaded modules at this point?
Are you saying we don't free any module inits at all then? I asked a lot
of questions and your answers seem slim.
How did you find this?
What actual impact does this have without the patch?
The commit must document this.
Luis
next prev parent reply other threads:[~2023-12-20 14:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-19 14:12 [PATCH] modules: wait do_free_init correctly Changbin Du
2023-12-19 20:51 ` Andrew Morton
2023-12-19 21:52 ` Luis Chamberlain
2023-12-20 5:27 ` Changbin Du
2023-12-20 14:32 ` Luis Chamberlain [this message]
2023-12-21 2:30 ` Changbin Du
2023-12-25 4:07 ` Changbin Du
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=ZYL7B59dQ6XFtVP8@bombadil.infradead.org \
--to=mcgrof@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=changbin.du@huawei.com \
--cc=hw.huiwang@huawei.com \
--cc=jhugo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=suxiaoyi@huawei.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