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] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 21 Mar 2016 10:27:46 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Ingo Molnar <mingo@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH] sched: Add preempt checks in preempt_schedule() code

On Fri, Mar 18, 2016 at 01:06:02PM -0400, Steven Rostedt wrote:
> Now by breaking out the preempt off/on tracing into their own code:
> preempt_disable_check() and preempt_enable_check(), we can add these to
> the preempt_schedule() code. As preemption would then be disabled, even
> if they were to be traced by the function tracer, the disabled
> preemption would prevent the recursion.

> +static inline void preempt_disable_check(int val)
> +{
> +	if (preempt_count() == val) {
> +		unsigned long ip = get_parent_ip(CALLER_ADDR1);
> +#ifdef CONFIG_DEBUG_PREEMPT
> +		current->preempt_disable_ip = ip;
> +#endif
> +		trace_preempt_off(CALLER_ADDR0, ip);
> +	}
> +}

> +static inline void preempt_enable_check(int val)
> +{
> +	if (preempt_count() == val)
> +		trace_preempt_on(CALLER_ADDR0, get_parent_ip(CALLER_ADDR1));
> +}

So no real objection to the patch except this naming.

It doesn't 'check', it does preempt-latency tracing. So could we rename
this to something like:

	preempt_{dis,en}able_latency()

or somesuch?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ