lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <06FAC793-ADBC-44B1-8CF4-36A8C17730AD@fb.com>
Date:   Wed, 2 May 2018 17:57:31 +0000
From:   Song Liu <songliubraving@...com>
To:     Peter Zijlstra <peterz@...radead.org>
CC:     Networking <netdev@...r.kernel.org>,
        Kernel Team <Kernel-team@...com>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>
Subject: Re: [PATCH bpf-next 1/2] bpf: enable stackmap with build_id in nmi
 context



> On May 2, 2018, at 10:30 AM, Peter Zijlstra <peterz@...radead.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ