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]
Message-ID: <f731d0ba-2f30-e9b5-5575-767663560265@oracle.com>
Date:   Mon, 9 Oct 2017 12:34:52 -0400
From:   Pavel Tatashin <pasha.tatashin@...cle.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     linux@...linux.org.uk, schwidefsky@...ibm.com,
        heiko.carstens@...ibm.com, john.stultz@...aro.org,
        sboyd@...eaurora.org, x86@...nel.org, linux-kernel@...r.kernel.org,
        mingo@...hat.com, tglx@...utronix.de, hpa@...or.com,
        douly.fnst@...fujitsu.com
Subject: Re: [PATCH v6 1/4] sched/clock: interface to allow timestamps early
 in boot

> 
> Urgh, that's horrific.
> 
> Can't we simply make sched_clock() go earlier? (we're violating "notsc"
> in any case and really should kill that option).
> 
> Then we can do something like so on top...
> 

Hi Peter,

I've been thinking about your proposal, and I have one concern: 
sched_clock() can be implemented two ways either via 
pv_time_ops.sched_clock vectors when CONFIG_PARAVIRT is defined

sched_clock()
    paravirt_sched_clock()
       PVOP_CALL0(unsigned long long, pv_time_ops.sched_clock);

Or native via alias

sched_clock()
	native_sched_clock()

Using sched_clock_early() approach makes early time stamps work with 
both cases when it is determined that tsc can be used 
simple_udelay_calibration(). (As we agreed I am going to change notsc to 
use tsc=unstable path.)

It may be not the most efficient clock for some virtualizations to use 
rdtsc directly, but since this is for early boot only, and not something 
that is going to be used after machine is booted it is OK.

Pavel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ