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, 26 Apr 2022 13:38:40 -0700
From:   John Stultz <jstultz@...gle.com>
To:     "Maciej W. Rozycki" <macro@...am.me.uk>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        Stephen Boyd <sboyd@...nel.org>,
        Russell King <linux@...linux.org.uk>,
        Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] sched_clock: Round the frequency reported to nearest
 rather than down

On Sun, Apr 24, 2022 at 4:47 AM Maciej W. Rozycki <macro@...am.me.uk> wrote:
>
> We currently round the frequency reported for clock sources down, which
> gives misleading figures, e.g.:
>
> I/O ASIC clock frequency 24999480Hz
> clocksource: dec-ioasic: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76452008078 ns
> sched_clock: 32 bits at 24MHz, resolution 40ns, wraps every 85901132779ns
> MIPS counter frequency 59998512Hz
> clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 31855130776 ns
> sched_clock: 32 bits at 59MHz, resolution 16ns, wraps every 35792281591ns
>
> Rounding to nearest seems more adequate:
>
> I/O ASIC clock frequency 24999664Hz
> clocksource: dec-ioasic: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76451445358 ns
> sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 85900499947ns
> MIPS counter frequency 59999728Hz
> clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 31854485176 ns
> sched_clock: 32 bits at 60MHz, resolution 16ns, wraps every 35791556599ns
>
> Signed-off-by: Maciej W. Rozycki <macro@...am.me.uk>
> Fixes: 112f38a4a316 ("ARM: sched_clock: provide common infrastructure for sched_clock()")
> ---

This seems sane to me.

Acked-by: John Stultz <jstultz@...gle.com>

thanks
-john

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ