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] [day] [month] [year] [list]
Date:   Thu, 4 Oct 2018 14:09:36 -0700
From:   tip-bot for Thomas Gleixner <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     vkuznets@...hat.com, pbonzini@...hat.com, matt@...trans.com.au,
        arnd@...db.de, linux-kernel@...r.kernel.org,
        john.stultz@...aro.org, luto@...nel.org, mingo@...nel.org,
        sboyd@...nel.org, tglx@...utronix.de, kys@...rosoft.com,
        peterz@...radead.org, jgross@...e.com, fweimer@...hat.com,
        hpa@...or.com
Subject: [tip:x86/vdso] x66/vdso: Add CLOCK_TAI support

Commit-ID:  315f28fa3a7bfbbb6233d800dffa327e87f96129
Gitweb:     https://git.kernel.org/tip/315f28fa3a7bfbbb6233d800dffa327e87f96129
Author:     Thomas Gleixner <tglx@...utronix.de>
AuthorDate: Mon, 17 Sep 2018 14:45:44 +0200
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Thu, 4 Oct 2018 23:00:27 +0200

x66/vdso: Add CLOCK_TAI support

With the storage array in place it's now trivial to support CLOCK_TAI in
the vdso. Extend the base time storage array and add the update code.

Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Tested-by: Matt Rickard <matt@...trans.com.au>
Acked-by: Andy Lutomirski <luto@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Stephen Boyd <sboyd@...nel.org>
Cc: John Stultz <john.stultz@...aro.org>
Cc: Florian Weimer <fweimer@...hat.com>
Cc: "K. Y. Srinivasan" <kys@...rosoft.com>
Cc: Vitaly Kuznetsov <vkuznets@...hat.com>
Cc: devel@...uxdriverproject.org
Cc: virtualization@...ts.linux-foundation.org
Cc: Paolo Bonzini <pbonzini@...hat.com>
Cc: Arnd Bergmann <arnd@...db.de>
Cc: Juergen Gross <jgross@...e.com>
Link: https://lkml.kernel.org/r/20180917130707.823878601@linutronix.de

---
 arch/x86/entry/vsyscall/vsyscall_gtod.c | 4 ++++
 arch/x86/include/asm/vgtod.h            | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/x86/entry/vsyscall/vsyscall_gtod.c b/arch/x86/entry/vsyscall/vsyscall_gtod.c
index 31b9e5e0cfdf..cfcdba082feb 100644
--- a/arch/x86/entry/vsyscall/vsyscall_gtod.c
+++ b/arch/x86/entry/vsyscall/vsyscall_gtod.c
@@ -51,6 +51,10 @@ void update_vsyscall(struct timekeeper *tk)
 	base->sec = tk->xtime_sec;
 	base->nsec = tk->tkr_mono.xtime_nsec;
 
+	base = &vdata->basetime[CLOCK_TAI];
+	base->sec = tk->xtime_sec + (s64)tk->tai_offset;
+	base->nsec = tk->tkr_mono.xtime_nsec;
+
 	base = &vdata->basetime[CLOCK_MONOTONIC];
 	base->sec = tk->xtime_sec + tk->wall_to_monotonic.tv_sec;
 	nsec = tk->tkr_mono.xtime_nsec;
diff --git a/arch/x86/include/asm/vgtod.h b/arch/x86/include/asm/vgtod.h
index 10e534a1a51a..d17b092b9f1b 100644
--- a/arch/x86/include/asm/vgtod.h
+++ b/arch/x86/include/asm/vgtod.h
@@ -18,8 +18,8 @@ struct vgtod_ts {
 	u64		nsec;
 };
 
-#define VGTOD_BASES	(CLOCK_MONOTONIC_COARSE + 1)
-#define VGTOD_HRES	(BIT(CLOCK_REALTIME) | BIT(CLOCK_MONOTONIC))
+#define VGTOD_BASES	(CLOCK_TAI + 1)
+#define VGTOD_HRES	(BIT(CLOCK_REALTIME) | BIT(CLOCK_MONOTONIC) | BIT(CLOCK_TAI))
 #define VGTOD_COARSE	(BIT(CLOCK_REALTIME_COARSE) | BIT(CLOCK_MONOTONIC_COARSE))
 
 /*

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ