From: "Björn Töpel" <bjorn@kernel.org>
To: Changbin Du <changbin.du@huawei.com>, Guo Ren <guoren@kernel.org>
Cc: Conor Dooley <conor@kernel.org>,
Changbin Du <changbin.du@huawei.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Hui Wang <hw.huiwang@huawei.com>,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
Conor Dooley <conor.dooley@microchip.com>,
Zong Li <zong.li@sifive.com>
Subject: Re: [PATCH v4] riscv: patch: Fixup lockdep warning in stop_machine
Date: Wed, 15 Feb 2023 12:01:17 +0100 [thread overview]
Message-ID: <87wn4j42gy.fsf@all.your.base.are.belong.to.us> (raw)
In-Reply-To: <20230215034532.xs726l7mp6xlnkdf@M910t>
Changbin Du <changbin.du@huawei.com> writes:
> On Wed, Feb 15, 2023 at 09:24:33AM +0800, Guo Ren wrote:
>> On Wed, Feb 15, 2023 at 8:22 AM Conor Dooley <conor@kernel.org> wrote:
>> >
>> > Hey Changbin,
>> >
>> > On Thu, Feb 02, 2023 at 07:41:16PM +0800, Changbin Du wrote:
>> > > The task of ftrace_arch_code_modify(_post)_prepare() caller is
>> > > stop_machine, whose caller and work thread are of different tasks. The
>> > > lockdep checker needs the same task context, or it's wrong. That means
>> > > it's a bug here to use lockdep_assert_held because we don't guarantee
>> > > the same task context.
>> I'm trying to delete all stop_machine in riscv, from ftrace to kprobe.
>> When I have done, we needn't this patch.
>>
> Which approch would you use? I looked through the riscv-spec, but didn't find any
> description abount concurrent modification and execution.
CMODX is not specified for RISC-V yet, unfortunately.
This has been discussed here [1]. Maybe we can start with stating for
which implementations Guo's approach work?
[1] https://lore.kernel.org/all/CAJF2gTS0s4X_uwLaEeSqKAyRmxCR2vxRuHhz7-SP2w4bBqzr+Q@mail.gmail.com/
prev parent reply other threads:[~2023-02-15 11:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-02 11:41 Changbin Du
2023-02-15 0:22 ` Conor Dooley
2023-02-15 1:24 ` Guo Ren
2023-02-15 3:45 ` Changbin Du
2023-02-15 11:01 ` Björn Töpel [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=87wn4j42gy.fsf@all.your.base.are.belong.to.us \
--to=bjorn@kernel.org \
--cc=aou@eecs.berkeley.edu \
--cc=changbin.du@huawei.com \
--cc=conor.dooley@microchip.com \
--cc=conor@kernel.org \
--cc=guoren@kernel.org \
--cc=hw.huiwang@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=zong.li@sifive.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
all inboxes | Powered by JetHome®