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:	Mon, 22 Aug 2011 10:27:34 +0200
From:	Thomas Renninger <trenn@...e.de>
To:	Ming Lei <tom.leiming@...il.com>
Cc:	rostedt@...dmis.org, fweisbec@...il.com, jean.pihet@...oldbits.com,
	mingo@...hat.com, linux-kernel@...r.kernel.org,
	linux-omap@...r.kernel.org, Len Brown <lenb@...nel.org>
Subject: Re: [PATCH 3/3] trace points: power: remove 'cpu_id' from trace_cpu_idle

On Saturday, August 20, 2011 04:40:09 AM Ming Lei wrote:
> Hi,
> 
> 2011/8/20 Thomas Renninger <trenn@...e.de>:
> > On Friday, August 19, 2011 05:04:04 PM tom.leiming@...il.com wrote:
> >> From: Ming Lei <tom.leiming@...il.com>
> >>
> >> This patch removes the 'cpu_id' parameter of the cpu_idle
> >> trace point, based on the ideas below:
> >>
> >> - the cpu_id which is passed to trace point is always the current
> >>   cpu
> > Are you sure this will always be true?
> 
> It is sure at least now,  the only place to pass 'dev->cpu' is inside
> cpuidle_idle_call,
It was known that cpu_id is always the current cpu with current 
implementation when this got introduced.
But the perf events API must not change back and forth for userspace 
compatibility. Therefore the cpu_id was added in case
that future implementations want to pass info where the current cpu
is not the cpu which is sent to the sleep state.

> smp_processor_id() can't be used safely in preemptible context.
I expect the only side effect that could happen is that if smp_process_id
is interrupted you get the wrong core id on a cpu idle trace event.
This only happens if cpuidle is not used and even then should happen
very rarely, nothing to worry for a debug tool like that.
And it should get fixed if these idle functions get fully integrated into
cpuidle at some point of time.

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