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:	Fri, 01 Jul 2011 09:53:31 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Cc:	linux-kernel@...r.kernel.org,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	yrl.pp-manager.tt@...achi.com
Subject: Re: [RFC PATCH -tip ] [BUGFIX] x86: Remove preempt disabling from
 kprobes

On Fri, 2011-07-01 at 09:43 -0400, Steven Rostedt wrote:

> I applied it to v3.0-rc5. And not surprisingly it works. But the
> question I have is, when we return from the trap, and NEED_RECHED is
> set, will it schedule? My test placed the probe within the scheduler
> where preemption is already disabled. Let me do this in places that has
> preemption and interrupts enabled.
> 
> I'll also try a kernel mod that adds a probe handler that does a
> udelay() loop, forcing the timer interrupt to be set on return of the
> trap, and see what happens there.

I didn't need to do the above. Just adding a probe at the beginning of
schedule() should do the trick. As I see from the latency-format option
set, that NEED_RESCHED is enabled when we enter the path. If interrupts
are enabled on single step, I would think that the code would go into an
infinite loop if it had issues there.

Thus I think we can say that removing preempt_disable() from kprobes in
x86_64 (and probably 32) is safe. I'll go and test this on my PPC64 and
mips (if I can get that compiled).

-- Steve


--
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