Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 08 Feb 2022 19:16:57 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 261781] vdso: Time calculation integer overflow
Message-ID:  <bug-261781-227-qvALloFbtN@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-261781-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-261781-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D261781

--- Comment #3 from Konstantin Belousov <kib@FreeBSD.org> ---
I see, do you mean the following:
diff --git a/lib/libc/sys/__vdso_gettimeofday.c
b/lib/libc/sys/__vdso_gettimeofday.c
index c1457a54d37e..cf1400cdf291 100644
--- a/lib/libc/sys/__vdso_gettimeofday.c
+++ b/lib/libc/sys/__vdso_gettimeofday.c
@@ -83,9 +83,9 @@ binuptime(struct bintime *bt, struct vdso_timekeep *tk, b=
ool
abs)
         return (error);
      scale =3D th->th_scale;
 #ifdef _LP64
-    scale_bits =3D ffsl(scale);
+     scale_bits =3D flsl(scale);
 #else
-    scale_bits =3D ffsll(scale);
+     scale_bits =3D flsll(scale);
 #endif
      if (__predict_false(scale_bits + fls(delta) > 63)) {
         x =3D (scale >> 32) * delta;

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-261781-227-qvALloFbtN>