commit:     28de17ab0edba34c093a469ad76bb3b51af116da
Author:     Mike Pagano <mpagano <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 18 17:33:16 2020 +0000
Commit:     Mike Pagano <mpagano <AT> gentoo <DOT> org>
CommitDate: Thu Jun 18 17:33:16 2020 +0000
URL:        https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=28de17ab

Linux patch 5.7.4

Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>

 0000_README            |  4 ++++
 1003_linux-5.7.4.patch | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 53 insertions(+)

diff --git a/0000_README b/0000_README
index f77851e..0cde4ba 100644
--- a/0000_README
+++ b/0000_README
@@ -55,6 +55,10 @@ Patch:  1002_linux-5.7.3.patch
 From:   http://www.kernel.org
 Desc:   Linux 5.7.3
 
+Patch:  1003_linux-5.7.4.patch
+From:   http://www.kernel.org
+Desc:   Linux 5.7.4
+
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644
 Desc:   Support for namespace user.pax.* on tmpfs.

diff --git a/1003_linux-5.7.4.patch b/1003_linux-5.7.4.patch
new file mode 100644
index 0000000..915786e
--- /dev/null
+++ b/1003_linux-5.7.4.patch
@@ -0,0 +1,49 @@
+diff --git a/Makefile b/Makefile
+index a2ce556f4347..64da771d4ac5 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: GPL-2.0
+ VERSION = 5
+ PATCHLEVEL = 7
+-SUBLEVEL = 3
++SUBLEVEL = 4
+ EXTRAVERSION =
+ NAME = Kleptomaniac Octopus
+ 
+diff --git a/lib/vdso/gettimeofday.c b/lib/vdso/gettimeofday.c
+index a2909af4b924..3bb82a6cc5aa 100644
+--- a/lib/vdso/gettimeofday.c
++++ b/lib/vdso/gettimeofday.c
+@@ -38,6 +38,13 @@ static inline bool vdso_clocksource_ok(const struct 
vdso_data *vd)
+ }
+ #endif
+ 
++#ifndef vdso_cycles_ok
++static inline bool vdso_cycles_ok(u64 cycles)
++{
++      return true;
++}
++#endif
++
+ #ifdef CONFIG_TIME_NS
+ static int do_hres_timens(const struct vdso_data *vdns, clockid_t clk,
+                         struct __kernel_timespec *ts)
+@@ -62,6 +69,8 @@ static int do_hres_timens(const struct vdso_data *vdns, 
clockid_t clk,
+                       return -1;
+ 
+               cycles = __arch_get_hw_counter(vd->clock_mode);
++              if (unlikely(!vdso_cycles_ok(cycles)))
++                      return -1;
+               ns = vdso_ts->nsec;
+               last = vd->cycle_last;
+               ns += vdso_calc_delta(cycles, last, vd->mask, vd->mult);
+@@ -130,6 +139,8 @@ static __always_inline int do_hres(const struct vdso_data 
*vd, clockid_t clk,
+                       return -1;
+ 
+               cycles = __arch_get_hw_counter(vd->clock_mode);
++              if (unlikely(!vdso_cycles_ok(cycles)))
++                      return -1;
+               ns = vdso_ts->nsec;
+               last = vd->cycle_last;
+               ns += vdso_calc_delta(cycles, last, vd->mask, vd->mult);

Reply via email to