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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 14 Jun 2019 14:41:19 +0200
From:   "Christian König" 
        <ckoenig.leichtzumerken@...il.com>
To:     daniel@...ll.ch, l.stach@...gutronix.de,
        linux+etnaviv@...linux.org.uk, christian.gmeiner@...il.com,
        yuq825@...il.com, eric@...olt.net, peterz@...radead.org,
        thellstrom@...are.com, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org, etnaviv@...ts.freedesktop.org,
        lima@...ts.freedesktop.org
Subject: ww_mutex deadlock handling cleanup

The ww_mutex implementation allows drivers to acquire locks on a set of locking
primitives with detection of deadlocks. If a deadlock happens we can then
backoff and reacquire the contended lock until we should finally be able to
acquire all necessary locks for an operation.

The problem is that handling those deadlocks was the burden of the user of
the ww_mutex implementation and at least some users didn't got that right
on the first try.

So this patch adds two macros to lock and unlock multiple ww_mutex instances
with the necessary deadlock handling. I'm not a big fan of macros, but it still
better then implementing the same logic at least halve a dozen times.

Please note that only the first two patches are more than compile tested.
And this only cleans up the tip of the iceberg, just enough to show the
potential of those two macros.

Please review and/or comment,
Christian.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ