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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 1 Dec 2009 11:33:51 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Sripathi Kodi <sripathik@...ibm.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Fr??d??ric Weisbecker <fweisbec@...il.com>,
	Thomas Gleixner <tglx@...utronix.de>
Cc:	linux-kernel@...r.kernel.org, Darren Hart <dvhltc@...ibm.com>
Subject: Re: [RFC] [PATCH 0/2] Futex fault injection


* Sripathi Kodi <sripathik@...ibm.com> wrote:

> Hi,
> 
> This patch set adds fault injection for futex subsystem. It adds 
> faults at places where reading/writing from user space can return 
> EFAULT. This will be useful in testing any significant change to futex 
> subsystem.

Instead of this unacceptably ugly and special-purpose debugfs interface, 
please extend perf events to allow event injection. Some other places in 
the kernel (which deal with rare events) want/need this capability too.

A good way to do it would be to define tracepoints in these places via a 
new kind of TRACE_EVENT(), which would also define an event_injected_*() 
callback to use.

So, for example, instead of:

                if (futex_should_fail(&fail_futex_efault, 1))
                        return -EFAULT;

                if (unlikely(!access_ok(rw, uaddr, sizeof(u32)))) {
			trace_get_futex_key_efault(uaddr);
                        return -EFAULT;
		}

We'd have something like:

                if (unlikely(!access_ok(rw, uaddr, sizeof(u32))) ||
				event_injected_get_futex_key_efault()) {

			trace_get_futex_key_efault(uaddr);
                        return -EFAULT;
		}

And each separate event injection point could thus be triggered 
individually.

To use this there would be a separate facility to inject events - via 
the perf events ioctl for example.

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ