From: Will Deacon <will.deacon@arm.com>
To: Jia He <hejianet@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
broonie@kernel.org, mhocko@suse.cz, sfr@canb.auug.org.au,
linux-next@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
mm-commits@vger.kernel.org,
Catalin Marinas <catalin.marinas@arm.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: mmotm 2018-08-23-17-26 uploaded
Date: Thu, 30 Aug 2018 10:22:20 +0100 [thread overview]
Message-ID: <20180830092219.GA5352@arm.com> (raw)
In-Reply-To: <cf4acbb6-2815-56e2-829c-4e4c3a549e21@gmail.com>
On Thu, Aug 30, 2018 at 02:26:51PM +0800, Jia He wrote:
> On 8/30/2018 9:00 AM, Jia He Wrote:
> > On 8/30/2018 7:22 AM, Andrew Morton Wrote:
> >> On Tue, 28 Aug 2018 12:20:46 +0800 Jia He <hejianet@gmail.com> wrote:
> >>> FYI,I watched a lockdep warning based on your mmotm master branch[1]
> >>
> >> Thanks. We'll need help from ARM peeps on this please.
> >>
> >>> [ 6.692731] ------------[ cut here ]------------
> >>> [ 6.696391] DEBUG_LOCKS_WARN_ON(!current->hardirqs_enabled)
[...]
> >>> I thought the root cause might be at [2] which seems not in your branch yet.
> >>>
> >>> [1] http://git.cmpxchg.org/cgit.cgi/linux-mmotm.git
> >>> [2]
> >>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=efd112
> >>
> >> I agree, that doesn't look like the culprit. But something may well
> >> have gone wrong in "the recent conversion of the syscall entry/exit
> >> code to C".
> > Sorry for my unclearly previously description.
> > 1. no such lockdep warning in latest mainline kernel git tree.
> > 2. there is a 100% producible warning based on your latest mmotm tree
> > 3. after applying the commit efd112 based on your mmotm tree, the warning
> > disappearred
> >
> > I will do some further digging to answer your question if no other experts' help
> >
> 1. in el0_svc->el0_svc_common, without commit efd112
> local_daif_mask(); //disable the irq and trace irq off
> flags = current_thread_info()->flags;
> if (!has_syscall_work(flags))
> ------------ //1
> return;
> If el0_svc_common enters the logic at line 1, the irq is disabled and
> current->hardirqs_enabled is 0.
>
> 2. then it goes to el0_da
> in el0_da, it enables the irq without changing current->hardirqs_enabled to 1
>
> 3. goes to el0_da->do_mem_abort->... the lockdep warning happens
>
> The commit efd112 fixes it by invoking trace_hardirqs_off at line 1.
> It closes the inconsistency window.
Right, we fixed this last month in commit efd112353bf7 ("arm64: svc: Ensure
hardirq tracing is updated before return"). Is there anything more you need
from us on the Arm side?
Will
prev parent reply other threads:[~2018-08-30 9:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-24 0:27 mmotm 2018-08-23-17-26 uploaded akpm
2018-08-24 15:23 ` mmotm 2018-08-23-17-26 uploaded (netfilter: undefined reference) Randy Dunlap
2018-08-28 4:20 ` mmotm 2018-08-23-17-26 uploaded Jia He
2018-08-29 23:22 ` Andrew Morton
2018-08-30 1:00 ` Jia He
2018-08-30 6:26 ` Jia He
2018-08-30 9:22 ` Will Deacon [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=20180830092219.GA5352@arm.com \
--to=will.deacon@arm.com \
--cc=akpm@linux-foundation.org \
--cc=broonie@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=hejianet@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-next@vger.kernel.org \
--cc=mhocko@suse.cz \
--cc=mm-commits@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/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).