futex: Fault/error injection capabilities
authorDavidlohr Bueso <dave@stgolabs.net>
Tue, 30 Jun 2015 06:26:02 +0000 (23:26 -0700)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 20 Jul 2015 09:45:45 +0000 (11:45 +0200)
commitab51fbab39d864f3223e44a2600fd951df261f0b
treecd8106193d0d15b9690a8e80ceec85d202f8e1cb
parent767f509ca11269c2bcd92e3972a93096f2173ac0
futex: Fault/error injection capabilities

Although futexes are well known for being a royal pita,
we really have very little debugging capabilities - except
for relying on tglx's eye half the time.

By simply making use of the existing fault-injection machinery,
we can improve this situation, allowing generating artificial
uaddress faults and deadlock scenarios. Of course, when this is
disabled in production systems, the overhead for failure checks
is practically zero -- so this is very cheap at the same time.
Future work would be nice to now enhance trinity to make use of
this.

There is a special tunable 'ignore-private', which can filter
out private futexes. Given the tsk->make_it_fail filter and
this option, pi futexes can be narrowed down pretty closely.

Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Darren Hart <darren@dvhart.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Link: http://lkml.kernel.org/r/1435645562-975-3-git-send-email-dave@stgolabs.net
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Documentation/fault-injection/fault-injection.txt
kernel/futex.c
lib/Kconfig.debug