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, 12 Apr 2010 11:50:18 -0700
From:	john stultz <johnstul@...ibm.com>
To:	Giuseppe CAVALLARO <peppe.cavallaro@...com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: re-adding clocksource_get_next ?

On Mon, 2010-04-12 at 08:02 +0200, Giuseppe CAVALLARO wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hello John,
> 
> john stultz wrote:
> > On Thu, Apr 8, 2010 at 11:53 PM, Giuseppe CAVALLARO
> > <peppe.cavallaro@...com> wrote:
> >> Hello!
> >> this function was removed in the past but I've not clear all the details.
> >> While testing LLTng, I wrote the patch, in attachment, that re-adds it
> >> again.
> >> The clocksource_get_next returns the first clock source available
> >> (without looking at the rating).
> >> In my environment, a clock source is a TMU channel (e.g. TMU1) and,
> >> indeed, clocksource_get_next works fine.
> > 
> > Could you provide some more details as to why you need raw access to
> > the clocksource, instead of using something like ktime_get(),
> > getrawmonotonic() or sched_clock()?
> 
> I wanted to directly read the value of the TCNT register of a TMU
> channel registered as clocksource in an SH platform.
> My idea was to get the first clocksource available and than use the read
> hook to get its raw value.
> Indeed, on SH4, the clocksource_get_next returns the TMU channel 1
> (usually registered as clocksource); the clk->reads points to
> sh_tmu_clocksource_read (drivers/clocksource/sh_tmu.c). This returns the
> value of the timer count register (TCNT).

If you specifically want the function sh_tmu_clocksource_read(), why not
call it directly instead of indirecting through the clocksource
infrastructure?

Additionally, since the clocksource code is dynamic, you might get a
different clocksource then you expect (such as jiffies) depending on
user config or user actions.

So I'd advise against using the clocksource code here.

thanks
-john




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