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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue,  5 May 2020 21:55:41 +0800
From:   Leo Yan <>
To:     Peter Zijlstra <>,
        Will Deacon <>, Marc Zyngier <>,
        Mark Rutland <>,
        Ingo Molnar <>,
        Arnaldo Carvalho de Melo <>,
        Alexander Shishkin <>,
        Jiri Olsa <>,
        Namhyung Kim <>,
        Catalin Marinas <>,
        Daniel Lezcano <>,
        Thomas Gleixner <>,
        Allison Randal <>,
        Alexios Zavras <>,
        Greg Kroah-Hartman <>,
        Kate Stewart <>,
        Enrico Weigelt <>,
        "Ahmed S. Darwish" <>,
        Paul Cercueil <>,
        "Ben Dooks (Codethink)" <>,,
Cc:     Leo Yan <>
Subject: [PATCH v2 0/3] arm64: perf_event: Fix time offset prior to epoch

This patch set is to fix time offset prior to epoch for Arm arch timer.
This series is mainly following on suggestions on LKML [1].

To acheive the accurate time offset for a clock source prior to epoch,
patch 01 adds a new variant sched_clock_register_epoch() which allows to
output an extra argument for time offset prior to sched clock's

Patch 02 is to add handling for time offset in Arm arch timer driver, As
Will Deacon suggested to "disable the perf userpage if sched_clock
changes clocksource too" [2], after thinking about this suggestion, the
race condition doesn't exist between sched_clock's registration and perf
userpage.  The reason is sched_clock's registration is finished in
system's initialisation phase and at this point it has no chance to use
any userpage by Perf tool.  For this reason let's keep the code simple
and don't acquire all Perf events' seqlock during sched_clock's

Patch 03 is simply to pass time offset from arch timer driver
(clocksource driver) to perf event.


Changes from v1:
- Added patch 01 to retrieve more accurate offset when sched clock
- Added patch 02 to handle time offset in arch timer driver.

Leo Yan (3):
  time/sched_clock: Add new variant sched_clock_register_epoch()
  clocksource/drivers/arm_arch_timer: Handle time offset prior to epoch
  arm64: perf_event: Fix time_offset for arch timer

 arch/arm64/kernel/perf_event.c       |  8 ++++++--
 drivers/clocksource/arm_arch_timer.c | 10 +++++++++-
 include/clocksource/arm_arch_timer.h |  6 ++++++
 include/linux/sched_clock.h          | 10 ++++++++++
 kernel/time/sched_clock.c            | 13 ++++++++++++-
 5 files changed, 43 insertions(+), 4 deletions(-)


Powered by blists - more mailing lists