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: <CAFqZXNuKgbq4ZKyzWvMS7yL5D4tkZA7xMJx_LTvLUoHDJwHxvw@mail.gmail.com>
Date:   Mon, 7 Feb 2022 17:52:03 +0100
From:   Ondrej Mosnacek <omosnace@...hat.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Ingo Molnar <mingo@...hat.com>, Will Deacon <will@...nel.org>,
        Waiman Long <longman@...hat.com>,
        Linux kernel mailing list <linux-kernel@...r.kernel.org>,
        SElinux list <selinux@...r.kernel.org>
Subject: Re: Semantics vs. usage of mutex_is_locked()

On Mon, Feb 7, 2022 at 4:47 PM Peter Zijlstra <peterz@...radead.org> wrote:
> On Mon, Feb 07, 2022 at 04:15:27PM +0100, Ondrej Mosnacek wrote:
> > Also, any opinions on the name of the new helper? Perhaps
> > mutex_is_held()? Or mutex_is_locked_by_current()?
>
> lockdep_assert_held*() and friends work on mutexes just fine.

Hm, good point, although it will only work if CONFIG_LOCKDEP=y, which
is usually not enabled on production kernels... But maybe it doesn't
make sense to do the check on non-debug kernels anyway?

--
Ondrej Mosnacek
Software Engineer, Linux Security - SELinux kernel
Red Hat, Inc.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ