From: Song Liu <songliubraving@fb.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Networking <netdev@vger.kernel.org>,
Kernel Team <Kernel-team@fb.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>
Subject: Re: [PATCH bpf-next 1/2] bpf: enable stackmap with build_id in nmi context
Date: Wed, 2 May 2018 17:57:31 +0000 [thread overview]
Message-ID: <06FAC793-ADBC-44B1-8CF4-36A8C17730AD@fb.com> (raw)
In-Reply-To: <20180502173027.GM12180@hirez.programming.kicks-ass.net>
> On May 2, 2018, at 10:30 AM, Peter Zijlstra <peterz@infradead.org> wrote:
>
> On Wed, May 02, 2018 at 04:48:32PM +0000, Song Liu wrote:
>>> It's broken though, I've bet you've never actually ran this with lockdep
>>> enabled for example.
>>
>> I am not following here. I just run the new selftest with CONFIG_LOCKDEP on,
>> and got no warning for this.
>
> Weird, I would be expecting complaints about releasing an unheld lock.
>
> nmi_enter(),nmi_exit() have lockdep_off(),lockdep_on() resp. Which means
> that the down_trylock() will not be recorded. The up, which is done from
> IRQ context, will not be so supressed and should hit
> print_unlock_imbalance_bug().
>
I am still not sure whether I am following. I guess your concern apply to
spinlock only? lock_acquire() has the following in the beginning:
if (unlikely(current->lockdep_recursion))
return;
So it will not run in nmi context?
On the other hand, semaphore and rw_semaphore should be ok in such cases?
Thanks,
Song
prev parent reply other threads:[~2018-05-02 17:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-02 0:02 [PATCH bpf-next 1/2] bpf: enable stackmap with build_id in nmi context Song Liu
2018-05-02 0:02 ` [PATCH bpf-next 2/2] bpf: add selftest for stackmap with build_id in NMI context Song Liu
2018-05-02 3:34 ` [PATCH bpf-next 1/2] bpf: enable stackmap with build_id in nmi context kbuild test robot
2018-05-02 3:34 ` [RFC PATCH] bpf: __pcpu_scope_irq_work can be static kbuild test robot
2018-05-02 9:21 ` [PATCH bpf-next 1/2] bpf: enable stackmap with build_id in nmi context Peter Zijlstra
2018-05-02 16:48 ` Song Liu
2018-05-02 17:30 ` Peter Zijlstra
2018-05-02 17:57 ` Song Liu [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=06FAC793-ADBC-44B1-8CF4-36A8C17730AD@fb.com \
--to=songliubraving@fb.com \
--cc=Kernel-team@fb.com \
--cc=ast@kernel.org \
--cc=daniel@iogearbox.net \
--cc=netdev@vger.kernel.org \
--cc=peterz@infradead.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