diff for duplicates of <202602111941.PIhubgrb-lkp@intel.com> diff --git a/a/1.txt b/N1/1.txt index 17cae8d..104cd48 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,15 +1,6 @@ -BCC: lkp@intel.com -CC: oe-kbuild-all@lists.linux.dev -CC: linux-kernel@vger.kernel.org -TO: "H. Peter Anvin" <hpa@zytor.com> -CC: Dave Hansen <dave.hansen@linux.intel.com> - tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 192c0159402e6bfbe13de6f8379546943297783d commit: 693c819fedcdcabfda7488e2d5e355a84c2fd1b0 x86/entry/vdso: Refactor the vdso build -date: 4 weeks ago -:::::: branch date: 5 hours ago -:::::: commit date: 4 weeks ago config: x86_64-randconfig-161-20260210 (https://download.01.org/0day-ci/archive/20260211/202602111941.PIhubgrb-lkp@intel.com/config) compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261) rustc: rustc 1.88.0 (6b00bc388 2025-06-23) @@ -18,7 +9,7 @@ smatch version: v0.5.0-8994-gd50c5a4c If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> -| Reported-by: Dan Carpenter <error27@gmail.com> +| Reported-by: Dan Carpenter <dan.carpenter@linaro.org> | Closes: https://lore.kernel.org/r/202602111941.PIhubgrb-lkp@intel.com/ smatch warnings: @@ -29,7 +20,6 @@ arch/x86/include/uapi/../../../../lib/vdso/gettimeofday.c:454 __cvdso_clock_getr vim +308 arch/x86/include/uapi/../../../../lib/vdso/gettimeofday.c -cd3557a7618bf5 Thomas Weißschuh 2025-07-01 286 fb61bdb27fd730 Thomas Weißschuh 2025-07-01 287 static __always_inline bool ac1a42f4e4e296 Thomas Weißschuh 2025-02-04 288 __cvdso_clock_gettime_common(const struct vdso_time_data *vd, clockid_t clock, e876f0b69dc993 Christophe Leroy 2020-02-07 289 struct __kernel_timespec *ts) @@ -52,171 +42,15 @@ cddb82d1c4de56 Anna-Maria Behnsen 2025-03-03 303 vc = &vc[CS_HRES_COARSE]; 8463cf80529d0f Christophe Leroy 2019-12-23 306 else if (msk & VDSO_RAW) cddb82d1c4de56 Anna-Maria Behnsen 2025-03-03 307 vc = &vc[CS_RAW]; cd3557a7618bf5 Thomas Weißschuh 2025-07-01 @308 else if (msk & VDSO_AUX) + +This code is built with -m32 when we build +arch/x86/entry/vdso/vdso32/vclock_gettime.c so VDSO_AUX is zero +and we never call do_aux(). Presumably that's intentional. I +don't know this code at all. + cd3557a7618bf5 Thomas Weißschuh 2025-07-01 309 return do_aux(vd, clock, ts); c966533f8c6c45 Andrei Vagin 2019-11-12 310 else fb61bdb27fd730 Thomas Weißschuh 2025-07-01 311 return false; c966533f8c6c45 Andrei Vagin 2019-11-12 312 64c3613ce31a1a Anna-Maria Behnsen 2025-03-03 313 return do_hres(vd, vc, clock, ts); 502a590a170b3b Thomas Gleixner 2019-07-28 314 } -00b26474c2f161 Vincenzo Frascino 2019-06-21 315 -502a590a170b3b Thomas Gleixner 2019-07-28 316 static __maybe_unused int -ac1a42f4e4e296 Thomas Weißschuh 2025-02-04 317 __cvdso_clock_gettime_data(const struct vdso_time_data *vd, clockid_t clock, -e876f0b69dc993 Christophe Leroy 2020-02-07 318 struct __kernel_timespec *ts) -502a590a170b3b Thomas Gleixner 2019-07-28 319 { -fb61bdb27fd730 Thomas Weißschuh 2025-07-01 320 bool ok; -502a590a170b3b Thomas Gleixner 2019-07-28 321 -fb61bdb27fd730 Thomas Weißschuh 2025-07-01 322 ok = __cvdso_clock_gettime_common(vd, clock, ts); -fb61bdb27fd730 Thomas Weißschuh 2025-07-01 323 -fb61bdb27fd730 Thomas Weißschuh 2025-07-01 324 if (unlikely(!ok)) -00b26474c2f161 Vincenzo Frascino 2019-06-21 325 return clock_gettime_fallback(clock, ts); -502a590a170b3b Thomas Gleixner 2019-07-28 326 return 0; -00b26474c2f161 Vincenzo Frascino 2019-06-21 327 } -00b26474c2f161 Vincenzo Frascino 2019-06-21 328 -e876f0b69dc993 Christophe Leroy 2020-02-07 329 static __maybe_unused int -e876f0b69dc993 Christophe Leroy 2020-02-07 330 __cvdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts) -e876f0b69dc993 Christophe Leroy 2020-02-07 331 { -df7fcbefa71090 Thomas Weißschuh 2025-02-04 332 return __cvdso_clock_gettime_data(__arch_get_vdso_u_time_data(), clock, ts); -e876f0b69dc993 Christophe Leroy 2020-02-07 333 } -e876f0b69dc993 Christophe Leroy 2020-02-07 334 -bf279849ad5953 Vincenzo Frascino 2019-08-30 335 #ifdef BUILD_VDSO32 -00b26474c2f161 Vincenzo Frascino 2019-06-21 336 static __maybe_unused int -ac1a42f4e4e296 Thomas Weißschuh 2025-02-04 337 __cvdso_clock_gettime32_data(const struct vdso_time_data *vd, clockid_t clock, -e876f0b69dc993 Christophe Leroy 2020-02-07 338 struct old_timespec32 *res) -00b26474c2f161 Vincenzo Frascino 2019-06-21 339 { -00b26474c2f161 Vincenzo Frascino 2019-06-21 340 struct __kernel_timespec ts; -fb61bdb27fd730 Thomas Weißschuh 2025-07-01 341 bool ok; -00b26474c2f161 Vincenzo Frascino 2019-06-21 342 -fb61bdb27fd730 Thomas Weißschuh 2025-07-01 343 ok = __cvdso_clock_gettime_common(vd, clock, &ts); -00b26474c2f161 Vincenzo Frascino 2019-06-21 344 -fb61bdb27fd730 Thomas Weißschuh 2025-07-01 345 if (unlikely(!ok)) -c60a32ea4f459f Thomas Gleixner 2019-07-30 346 return clock_gettime32_fallback(clock, res); -502a590a170b3b Thomas Gleixner 2019-07-28 347 -fb61bdb27fd730 Thomas Weißschuh 2025-07-01 348 /* For ok == true */ -00b26474c2f161 Vincenzo Frascino 2019-06-21 349 res->tv_sec = ts.tv_sec; -00b26474c2f161 Vincenzo Frascino 2019-06-21 350 res->tv_nsec = ts.tv_nsec; -a279235ddbe975 Vincenzo Frascino 2019-08-30 351 -fb61bdb27fd730 Thomas Weißschuh 2025-07-01 352 return 0; -00b26474c2f161 Vincenzo Frascino 2019-06-21 353 } -e876f0b69dc993 Christophe Leroy 2020-02-07 354 -e876f0b69dc993 Christophe Leroy 2020-02-07 355 static __maybe_unused int -e876f0b69dc993 Christophe Leroy 2020-02-07 356 __cvdso_clock_gettime32(clockid_t clock, struct old_timespec32 *res) -e876f0b69dc993 Christophe Leroy 2020-02-07 357 { -df7fcbefa71090 Thomas Weißschuh 2025-02-04 358 return __cvdso_clock_gettime32_data(__arch_get_vdso_u_time_data(), clock, res); -e876f0b69dc993 Christophe Leroy 2020-02-07 359 } -bf279849ad5953 Vincenzo Frascino 2019-08-30 360 #endif /* BUILD_VDSO32 */ -00b26474c2f161 Vincenzo Frascino 2019-06-21 361 -00b26474c2f161 Vincenzo Frascino 2019-06-21 362 static __maybe_unused int -ac1a42f4e4e296 Thomas Weißschuh 2025-02-04 363 __cvdso_gettimeofday_data(const struct vdso_time_data *vd, -e876f0b69dc993 Christophe Leroy 2020-02-07 364 struct __kernel_old_timeval *tv, struct timezone *tz) -00b26474c2f161 Vincenzo Frascino 2019-06-21 365 { -886653e3663917 Anna-Maria Behnsen 2025-03-03 366 const struct vdso_clock *vc = vd->clock_data; -00b26474c2f161 Vincenzo Frascino 2019-06-21 367 -00b26474c2f161 Vincenzo Frascino 2019-06-21 368 if (likely(tv != NULL)) { -00b26474c2f161 Vincenzo Frascino 2019-06-21 369 struct __kernel_timespec ts; -00b26474c2f161 Vincenzo Frascino 2019-06-21 370 -fb61bdb27fd730 Thomas Weißschuh 2025-07-01 371 if (!do_hres(vd, &vc[CS_HRES_COARSE], CLOCK_REALTIME, &ts)) -00b26474c2f161 Vincenzo Frascino 2019-06-21 372 return gettimeofday_fallback(tv, tz); -00b26474c2f161 Vincenzo Frascino 2019-06-21 373 -00b26474c2f161 Vincenzo Frascino 2019-06-21 374 tv->tv_sec = ts.tv_sec; -00b26474c2f161 Vincenzo Frascino 2019-06-21 375 tv->tv_usec = (u32)ts.tv_nsec / NSEC_PER_USEC; -00b26474c2f161 Vincenzo Frascino 2019-06-21 376 } -00b26474c2f161 Vincenzo Frascino 2019-06-21 377 -00b26474c2f161 Vincenzo Frascino 2019-06-21 378 if (unlikely(tz != NULL)) { -660fd04f931717 Thomas Gleixner 2019-11-12 379 if (IS_ENABLED(CONFIG_TIME_NS) && -cddb82d1c4de56 Anna-Maria Behnsen 2025-03-03 380 vc->clock_mode == VDSO_CLOCKMODE_TIMENS) -ac1a42f4e4e296 Thomas Weißschuh 2025-02-04 381 vd = __arch_get_vdso_u_timens_data(vd); -660fd04f931717 Thomas Gleixner 2019-11-12 382 -00b26474c2f161 Vincenzo Frascino 2019-06-21 383 tz->tz_minuteswest = vd[CS_HRES_COARSE].tz_minuteswest; -00b26474c2f161 Vincenzo Frascino 2019-06-21 384 tz->tz_dsttime = vd[CS_HRES_COARSE].tz_dsttime; -00b26474c2f161 Vincenzo Frascino 2019-06-21 385 } -00b26474c2f161 Vincenzo Frascino 2019-06-21 386 -00b26474c2f161 Vincenzo Frascino 2019-06-21 387 return 0; -00b26474c2f161 Vincenzo Frascino 2019-06-21 388 } -00b26474c2f161 Vincenzo Frascino 2019-06-21 389 -e876f0b69dc993 Christophe Leroy 2020-02-07 390 static __maybe_unused int -e876f0b69dc993 Christophe Leroy 2020-02-07 391 __cvdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz) -e876f0b69dc993 Christophe Leroy 2020-02-07 392 { -df7fcbefa71090 Thomas Weißschuh 2025-02-04 393 return __cvdso_gettimeofday_data(__arch_get_vdso_u_time_data(), tv, tz); -e876f0b69dc993 Christophe Leroy 2020-02-07 394 } -e876f0b69dc993 Christophe Leroy 2020-02-07 395 -00b26474c2f161 Vincenzo Frascino 2019-06-21 396 #ifdef VDSO_HAS_TIME -e876f0b69dc993 Christophe Leroy 2020-02-07 397 static __maybe_unused __kernel_old_time_t -ac1a42f4e4e296 Thomas Weißschuh 2025-02-04 398 __cvdso_time_data(const struct vdso_time_data *vd, __kernel_old_time_t *time) -00b26474c2f161 Vincenzo Frascino 2019-06-21 399 { -886653e3663917 Anna-Maria Behnsen 2025-03-03 400 const struct vdso_clock *vc = vd->clock_data; -660fd04f931717 Thomas Gleixner 2019-11-12 401 __kernel_old_time_t t; -660fd04f931717 Thomas Gleixner 2019-11-12 402 -2d6b01bd88ccab Thomas Gleixner 2020-02-07 403 if (IS_ENABLED(CONFIG_TIME_NS) && -cddb82d1c4de56 Anna-Maria Behnsen 2025-03-03 404 vc->clock_mode == VDSO_CLOCKMODE_TIMENS) { -ac1a42f4e4e296 Thomas Weißschuh 2025-02-04 405 vd = __arch_get_vdso_u_timens_data(vd); -886653e3663917 Anna-Maria Behnsen 2025-03-03 406 vc = vd->clock_data; -cddb82d1c4de56 Anna-Maria Behnsen 2025-03-03 407 } -660fd04f931717 Thomas Gleixner 2019-11-12 408 -cddb82d1c4de56 Anna-Maria Behnsen 2025-03-03 409 t = READ_ONCE(vc[CS_HRES_COARSE].basetime[CLOCK_REALTIME].sec); -00b26474c2f161 Vincenzo Frascino 2019-06-21 410 -00b26474c2f161 Vincenzo Frascino 2019-06-21 411 if (time) -00b26474c2f161 Vincenzo Frascino 2019-06-21 412 *time = t; -00b26474c2f161 Vincenzo Frascino 2019-06-21 413 -00b26474c2f161 Vincenzo Frascino 2019-06-21 414 return t; -00b26474c2f161 Vincenzo Frascino 2019-06-21 415 } -e876f0b69dc993 Christophe Leroy 2020-02-07 416 -e876f0b69dc993 Christophe Leroy 2020-02-07 417 static __maybe_unused __kernel_old_time_t __cvdso_time(__kernel_old_time_t *time) -e876f0b69dc993 Christophe Leroy 2020-02-07 418 { -df7fcbefa71090 Thomas Weißschuh 2025-02-04 419 return __cvdso_time_data(__arch_get_vdso_u_time_data(), time); -e876f0b69dc993 Christophe Leroy 2020-02-07 420 } -00b26474c2f161 Vincenzo Frascino 2019-06-21 421 #endif /* VDSO_HAS_TIME */ -00b26474c2f161 Vincenzo Frascino 2019-06-21 422 -00b26474c2f161 Vincenzo Frascino 2019-06-21 423 #ifdef VDSO_HAS_CLOCK_GETRES -00b26474c2f161 Vincenzo Frascino 2019-06-21 424 static __maybe_unused -34f888e3405ace Thomas Weißschuh 2025-07-01 425 bool __cvdso_clock_getres_common(const struct vdso_time_data *vd, clockid_t clock, -e876f0b69dc993 Christophe Leroy 2020-02-07 426 struct __kernel_timespec *res) -00b26474c2f161 Vincenzo Frascino 2019-06-21 427 { -886653e3663917 Anna-Maria Behnsen 2025-03-03 428 const struct vdso_clock *vc = vd->clock_data; -00b26474c2f161 Vincenzo Frascino 2019-06-21 429 u32 msk; -502a590a170b3b Thomas Gleixner 2019-07-28 430 u64 ns; -00b26474c2f161 Vincenzo Frascino 2019-06-21 431 -1a1cd5fe881fdf Thomas Weißschuh 2025-07-01 432 if (!vdso_clockid_valid(clock)) -34f888e3405ace Thomas Weißschuh 2025-07-01 433 return false; -00b26474c2f161 Vincenzo Frascino 2019-06-21 434 -2d6b01bd88ccab Thomas Gleixner 2020-02-07 435 if (IS_ENABLED(CONFIG_TIME_NS) && -cddb82d1c4de56 Anna-Maria Behnsen 2025-03-03 436 vc->clock_mode == VDSO_CLOCKMODE_TIMENS) -ac1a42f4e4e296 Thomas Weißschuh 2025-02-04 437 vd = __arch_get_vdso_u_timens_data(vd); -660fd04f931717 Thomas Gleixner 2019-11-12 438 -00b26474c2f161 Vincenzo Frascino 2019-06-21 439 /* -00b26474c2f161 Vincenzo Frascino 2019-06-21 440 * Convert the clockid to a bitmask and use it to check which -00b26474c2f161 Vincenzo Frascino 2019-06-21 441 * clocks are handled in the VDSO directly. -00b26474c2f161 Vincenzo Frascino 2019-06-21 442 */ -00b26474c2f161 Vincenzo Frascino 2019-06-21 443 msk = 1U << clock; -cdb7c5a9c897ab Christophe Leroy 2019-12-23 444 if (msk & (VDSO_HRES | VDSO_RAW)) { -00b26474c2f161 Vincenzo Frascino 2019-06-21 445 /* -00b26474c2f161 Vincenzo Frascino 2019-06-21 446 * Preserves the behaviour of posix_get_hrtimer_res(). -00b26474c2f161 Vincenzo Frascino 2019-06-21 447 */ -886653e3663917 Anna-Maria Behnsen 2025-03-03 448 ns = READ_ONCE(vd->hrtimer_res); -00b26474c2f161 Vincenzo Frascino 2019-06-21 449 } else if (msk & VDSO_COARSE) { -00b26474c2f161 Vincenzo Frascino 2019-06-21 450 /* -00b26474c2f161 Vincenzo Frascino 2019-06-21 451 * Preserves the behaviour of posix_get_coarse_res(). -00b26474c2f161 Vincenzo Frascino 2019-06-21 452 */ -00b26474c2f161 Vincenzo Frascino 2019-06-21 453 ns = LOW_RES_NSEC; -cd3557a7618bf5 Thomas Weißschuh 2025-07-01 @454 } else if (msk & VDSO_AUX) { -cd3557a7618bf5 Thomas Weißschuh 2025-07-01 455 ns = aux_clock_resolution_ns(); -00b26474c2f161 Vincenzo Frascino 2019-06-21 456 } else { -34f888e3405ace Thomas Weißschuh 2025-07-01 457 return false; -00b26474c2f161 Vincenzo Frascino 2019-06-21 458 } -00b26474c2f161 Vincenzo Frascino 2019-06-21 459 -1638b8f096ca16 Thomas Gleixner 2019-10-21 460 if (likely(res)) { -00b26474c2f161 Vincenzo Frascino 2019-06-21 461 res->tv_sec = 0; -00b26474c2f161 Vincenzo Frascino 2019-06-21 462 res->tv_nsec = ns; -1638b8f096ca16 Thomas Gleixner 2019-10-21 463 } -34f888e3405ace Thomas Weißschuh 2025-07-01 464 return true; -502a590a170b3b Thomas Gleixner 2019-07-28 465 } -502a590a170b3b Thomas Gleixner 2019-07-28 466 - -:::::: The code at line 308 was first introduced by commit -:::::: cd3557a7618bf5c1935e9f66b58a329f1f1f4b27 vdso/gettimeofday: Add support for auxiliary clocks - -:::::: TO: Thomas Weißschuh <thomas.weissschuh@linutronix.de> -:::::: CC: Thomas Gleixner <tglx@linutronix.de> - --- -0-DAY CI Kernel Test Service -https://github.com/intel/lkp-tests/wiki diff --git a/a/content_digest b/N1/content_digest index 55caa16..fbb6c85 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,23 +1,17 @@ - "From\0kernel test robot <lkp@intel.com>\0" + "From\0Dan Carpenter <dan.carpenter@linaro.org>\0" "Subject\0arch/x86/include/uapi/../../../../lib/vdso/gettimeofday.c:308 __cvdso_clock_gettime_common() warn: right shifting more than type allows 32 vs 40\0" - "Date\0Wed, 11 Feb 2026 19:09:28 +0800\0" - "To\0oe-kbuild@lists.linux.dev\0" + "Date\0Wed, 11 Feb 2026 15:13:34 +0300\0" + "To\0oe-kbuild@lists.linux.dev" + " H. Peter Anvin <hpa@zytor.com>\0" "Cc\0lkp@intel.com" - " Dan Carpenter <error27@gmail.com>\0" + oe-kbuild-all@lists.linux.dev + linux-kernel@vger.kernel.org + " Dave Hansen <dave.hansen@linux.intel.com>\0" "\00:1\0" "b\0" - "BCC: lkp@intel.com\n" - "CC: oe-kbuild-all@lists.linux.dev\n" - "CC: linux-kernel@vger.kernel.org\n" - "TO: \"H. Peter Anvin\" <hpa@zytor.com>\n" - "CC: Dave Hansen <dave.hansen@linux.intel.com>\n" - "\n" "tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master\n" "head: 192c0159402e6bfbe13de6f8379546943297783d\n" "commit: 693c819fedcdcabfda7488e2d5e355a84c2fd1b0 x86/entry/vdso: Refactor the vdso build\n" - "date: 4 weeks ago\n" - ":::::: branch date: 5 hours ago\n" - ":::::: commit date: 4 weeks ago\n" "config: x86_64-randconfig-161-20260210 (https://download.01.org/0day-ci/archive/20260211/202602111941.PIhubgrb-lkp@intel.com/config)\n" "compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)\n" "rustc: rustc 1.88.0 (6b00bc388 2025-06-23)\n" @@ -26,7 +20,7 @@ "If you fix the issue in a separate patch/commit (i.e. not just a new version of\n" "the same patch/commit), kindly add following tags\n" "| Reported-by: kernel test robot <lkp@intel.com>\n" - "| Reported-by: Dan Carpenter <error27@gmail.com>\n" + "| Reported-by: Dan Carpenter <dan.carpenter@linaro.org>\n" "| Closes: https://lore.kernel.org/r/202602111941.PIhubgrb-lkp@intel.com/\n" "\n" "smatch warnings:\n" @@ -37,7 +31,6 @@ "\n" "vim +308 arch/x86/include/uapi/../../../../lib/vdso/gettimeofday.c\n" "\n" - "cd3557a7618bf5 Thomas Wei\303\237schuh 2025-07-01 286 \n" "fb61bdb27fd730 Thomas Wei\303\237schuh 2025-07-01 287 static __always_inline bool\n" "ac1a42f4e4e296 Thomas Wei\303\237schuh 2025-02-04 288 __cvdso_clock_gettime_common(const struct vdso_time_data *vd, clockid_t clock,\n" "e876f0b69dc993 Christophe Leroy 2020-02-07 289 \t\t\t struct __kernel_timespec *ts)\n" @@ -60,173 +53,17 @@ "8463cf80529d0f Christophe Leroy 2019-12-23 306 \telse if (msk & VDSO_RAW)\n" "cddb82d1c4de56 Anna-Maria Behnsen 2025-03-03 307 \t\tvc = &vc[CS_RAW];\n" "cd3557a7618bf5 Thomas Wei\303\237schuh 2025-07-01 @308 \telse if (msk & VDSO_AUX)\n" + "\n" + "This code is built with -m32 when we build\n" + "arch/x86/entry/vdso/vdso32/vclock_gettime.c so VDSO_AUX is zero\n" + "and we never call do_aux(). Presumably that's intentional. I\n" + "don't know this code at all.\n" + "\n" "cd3557a7618bf5 Thomas Wei\303\237schuh 2025-07-01 309 \t\treturn do_aux(vd, clock, ts);\n" "c966533f8c6c45 Andrei Vagin 2019-11-12 310 \telse\n" "fb61bdb27fd730 Thomas Wei\303\237schuh 2025-07-01 311 \t\treturn false;\n" "c966533f8c6c45 Andrei Vagin 2019-11-12 312 \n" "64c3613ce31a1a Anna-Maria Behnsen 2025-03-03 313 \treturn do_hres(vd, vc, clock, ts);\n" - "502a590a170b3b Thomas Gleixner 2019-07-28 314 }\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 315 \n" - "502a590a170b3b Thomas Gleixner 2019-07-28 316 static __maybe_unused int\n" - "ac1a42f4e4e296 Thomas Wei\303\237schuh 2025-02-04 317 __cvdso_clock_gettime_data(const struct vdso_time_data *vd, clockid_t clock,\n" - "e876f0b69dc993 Christophe Leroy 2020-02-07 318 \t\t\t struct __kernel_timespec *ts)\n" - "502a590a170b3b Thomas Gleixner 2019-07-28 319 {\n" - "fb61bdb27fd730 Thomas Wei\303\237schuh 2025-07-01 320 \tbool ok;\n" - "502a590a170b3b Thomas Gleixner 2019-07-28 321 \n" - "fb61bdb27fd730 Thomas Wei\303\237schuh 2025-07-01 322 \tok = __cvdso_clock_gettime_common(vd, clock, ts);\n" - "fb61bdb27fd730 Thomas Wei\303\237schuh 2025-07-01 323 \n" - "fb61bdb27fd730 Thomas Wei\303\237schuh 2025-07-01 324 \tif (unlikely(!ok))\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 325 \t\treturn clock_gettime_fallback(clock, ts);\n" - "502a590a170b3b Thomas Gleixner 2019-07-28 326 \treturn 0;\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 327 }\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 328 \n" - "e876f0b69dc993 Christophe Leroy 2020-02-07 329 static __maybe_unused int\n" - "e876f0b69dc993 Christophe Leroy 2020-02-07 330 __cvdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts)\n" - "e876f0b69dc993 Christophe Leroy 2020-02-07 331 {\n" - "df7fcbefa71090 Thomas Wei\303\237schuh 2025-02-04 332 \treturn __cvdso_clock_gettime_data(__arch_get_vdso_u_time_data(), clock, ts);\n" - "e876f0b69dc993 Christophe Leroy 2020-02-07 333 }\n" - "e876f0b69dc993 Christophe Leroy 2020-02-07 334 \n" - "bf279849ad5953 Vincenzo Frascino 2019-08-30 335 #ifdef BUILD_VDSO32\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 336 static __maybe_unused int\n" - "ac1a42f4e4e296 Thomas Wei\303\237schuh 2025-02-04 337 __cvdso_clock_gettime32_data(const struct vdso_time_data *vd, clockid_t clock,\n" - "e876f0b69dc993 Christophe Leroy 2020-02-07 338 \t\t\t struct old_timespec32 *res)\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 339 {\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 340 \tstruct __kernel_timespec ts;\n" - "fb61bdb27fd730 Thomas Wei\303\237schuh 2025-07-01 341 \tbool ok;\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 342 \n" - "fb61bdb27fd730 Thomas Wei\303\237schuh 2025-07-01 343 \tok = __cvdso_clock_gettime_common(vd, clock, &ts);\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 344 \n" - "fb61bdb27fd730 Thomas Wei\303\237schuh 2025-07-01 345 \tif (unlikely(!ok))\n" - "c60a32ea4f459f Thomas Gleixner 2019-07-30 346 \t\treturn clock_gettime32_fallback(clock, res);\n" - "502a590a170b3b Thomas Gleixner 2019-07-28 347 \n" - "fb61bdb27fd730 Thomas Wei\303\237schuh 2025-07-01 348 \t/* For ok == true */\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 349 \tres->tv_sec = ts.tv_sec;\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 350 \tres->tv_nsec = ts.tv_nsec;\n" - "a279235ddbe975 Vincenzo Frascino 2019-08-30 351 \n" - "fb61bdb27fd730 Thomas Wei\303\237schuh 2025-07-01 352 \treturn 0;\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 353 }\n" - "e876f0b69dc993 Christophe Leroy 2020-02-07 354 \n" - "e876f0b69dc993 Christophe Leroy 2020-02-07 355 static __maybe_unused int\n" - "e876f0b69dc993 Christophe Leroy 2020-02-07 356 __cvdso_clock_gettime32(clockid_t clock, struct old_timespec32 *res)\n" - "e876f0b69dc993 Christophe Leroy 2020-02-07 357 {\n" - "df7fcbefa71090 Thomas Wei\303\237schuh 2025-02-04 358 \treturn __cvdso_clock_gettime32_data(__arch_get_vdso_u_time_data(), clock, res);\n" - "e876f0b69dc993 Christophe Leroy 2020-02-07 359 }\n" - "bf279849ad5953 Vincenzo Frascino 2019-08-30 360 #endif /* BUILD_VDSO32 */\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 361 \n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 362 static __maybe_unused int\n" - "ac1a42f4e4e296 Thomas Wei\303\237schuh 2025-02-04 363 __cvdso_gettimeofday_data(const struct vdso_time_data *vd,\n" - "e876f0b69dc993 Christophe Leroy 2020-02-07 364 \t\t\t struct __kernel_old_timeval *tv, struct timezone *tz)\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 365 {\n" - "886653e3663917 Anna-Maria Behnsen 2025-03-03 366 \tconst struct vdso_clock *vc = vd->clock_data;\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 367 \n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 368 \tif (likely(tv != NULL)) {\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 369 \t\tstruct __kernel_timespec ts;\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 370 \n" - "fb61bdb27fd730 Thomas Wei\303\237schuh 2025-07-01 371 \t\tif (!do_hres(vd, &vc[CS_HRES_COARSE], CLOCK_REALTIME, &ts))\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 372 \t\t\treturn gettimeofday_fallback(tv, tz);\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 373 \n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 374 \t\ttv->tv_sec = ts.tv_sec;\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 375 \t\ttv->tv_usec = (u32)ts.tv_nsec / NSEC_PER_USEC;\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 376 \t}\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 377 \n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 378 \tif (unlikely(tz != NULL)) {\n" - "660fd04f931717 Thomas Gleixner 2019-11-12 379 \t\tif (IS_ENABLED(CONFIG_TIME_NS) &&\n" - "cddb82d1c4de56 Anna-Maria Behnsen 2025-03-03 380 \t\t vc->clock_mode == VDSO_CLOCKMODE_TIMENS)\n" - "ac1a42f4e4e296 Thomas Wei\303\237schuh 2025-02-04 381 \t\t\tvd = __arch_get_vdso_u_timens_data(vd);\n" - "660fd04f931717 Thomas Gleixner 2019-11-12 382 \n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 383 \t\ttz->tz_minuteswest = vd[CS_HRES_COARSE].tz_minuteswest;\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 384 \t\ttz->tz_dsttime = vd[CS_HRES_COARSE].tz_dsttime;\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 385 \t}\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 386 \n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 387 \treturn 0;\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 388 }\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 389 \n" - "e876f0b69dc993 Christophe Leroy 2020-02-07 390 static __maybe_unused int\n" - "e876f0b69dc993 Christophe Leroy 2020-02-07 391 __cvdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)\n" - "e876f0b69dc993 Christophe Leroy 2020-02-07 392 {\n" - "df7fcbefa71090 Thomas Wei\303\237schuh 2025-02-04 393 \treturn __cvdso_gettimeofday_data(__arch_get_vdso_u_time_data(), tv, tz);\n" - "e876f0b69dc993 Christophe Leroy 2020-02-07 394 }\n" - "e876f0b69dc993 Christophe Leroy 2020-02-07 395 \n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 396 #ifdef VDSO_HAS_TIME\n" - "e876f0b69dc993 Christophe Leroy 2020-02-07 397 static __maybe_unused __kernel_old_time_t\n" - "ac1a42f4e4e296 Thomas Wei\303\237schuh 2025-02-04 398 __cvdso_time_data(const struct vdso_time_data *vd, __kernel_old_time_t *time)\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 399 {\n" - "886653e3663917 Anna-Maria Behnsen 2025-03-03 400 \tconst struct vdso_clock *vc = vd->clock_data;\n" - "660fd04f931717 Thomas Gleixner 2019-11-12 401 \t__kernel_old_time_t t;\n" - "660fd04f931717 Thomas Gleixner 2019-11-12 402 \n" - "2d6b01bd88ccab Thomas Gleixner 2020-02-07 403 \tif (IS_ENABLED(CONFIG_TIME_NS) &&\n" - "cddb82d1c4de56 Anna-Maria Behnsen 2025-03-03 404 \t vc->clock_mode == VDSO_CLOCKMODE_TIMENS) {\n" - "ac1a42f4e4e296 Thomas Wei\303\237schuh 2025-02-04 405 \t\tvd = __arch_get_vdso_u_timens_data(vd);\n" - "886653e3663917 Anna-Maria Behnsen 2025-03-03 406 \t\tvc = vd->clock_data;\n" - "cddb82d1c4de56 Anna-Maria Behnsen 2025-03-03 407 \t}\n" - "660fd04f931717 Thomas Gleixner 2019-11-12 408 \n" - "cddb82d1c4de56 Anna-Maria Behnsen 2025-03-03 409 \tt = READ_ONCE(vc[CS_HRES_COARSE].basetime[CLOCK_REALTIME].sec);\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 410 \n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 411 \tif (time)\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 412 \t\t*time = t;\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 413 \n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 414 \treturn t;\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 415 }\n" - "e876f0b69dc993 Christophe Leroy 2020-02-07 416 \n" - "e876f0b69dc993 Christophe Leroy 2020-02-07 417 static __maybe_unused __kernel_old_time_t __cvdso_time(__kernel_old_time_t *time)\n" - "e876f0b69dc993 Christophe Leroy 2020-02-07 418 {\n" - "df7fcbefa71090 Thomas Wei\303\237schuh 2025-02-04 419 \treturn __cvdso_time_data(__arch_get_vdso_u_time_data(), time);\n" - "e876f0b69dc993 Christophe Leroy 2020-02-07 420 }\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 421 #endif /* VDSO_HAS_TIME */\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 422 \n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 423 #ifdef VDSO_HAS_CLOCK_GETRES\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 424 static __maybe_unused\n" - "34f888e3405ace Thomas Wei\303\237schuh 2025-07-01 425 bool __cvdso_clock_getres_common(const struct vdso_time_data *vd, clockid_t clock,\n" - "e876f0b69dc993 Christophe Leroy 2020-02-07 426 \t\t\t\t struct __kernel_timespec *res)\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 427 {\n" - "886653e3663917 Anna-Maria Behnsen 2025-03-03 428 \tconst struct vdso_clock *vc = vd->clock_data;\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 429 \tu32 msk;\n" - "502a590a170b3b Thomas Gleixner 2019-07-28 430 \tu64 ns;\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 431 \n" - "1a1cd5fe881fdf Thomas Wei\303\237schuh 2025-07-01 432 \tif (!vdso_clockid_valid(clock))\n" - "34f888e3405ace Thomas Wei\303\237schuh 2025-07-01 433 \t\treturn false;\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 434 \n" - "2d6b01bd88ccab Thomas Gleixner 2020-02-07 435 \tif (IS_ENABLED(CONFIG_TIME_NS) &&\n" - "cddb82d1c4de56 Anna-Maria Behnsen 2025-03-03 436 \t vc->clock_mode == VDSO_CLOCKMODE_TIMENS)\n" - "ac1a42f4e4e296 Thomas Wei\303\237schuh 2025-02-04 437 \t\tvd = __arch_get_vdso_u_timens_data(vd);\n" - "660fd04f931717 Thomas Gleixner 2019-11-12 438 \n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 439 \t/*\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 440 \t * Convert the clockid to a bitmask and use it to check which\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 441 \t * clocks are handled in the VDSO directly.\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 442 \t */\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 443 \tmsk = 1U << clock;\n" - "cdb7c5a9c897ab Christophe Leroy 2019-12-23 444 \tif (msk & (VDSO_HRES | VDSO_RAW)) {\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 445 \t\t/*\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 446 \t\t * Preserves the behaviour of posix_get_hrtimer_res().\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 447 \t\t */\n" - "886653e3663917 Anna-Maria Behnsen 2025-03-03 448 \t\tns = READ_ONCE(vd->hrtimer_res);\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 449 \t} else if (msk & VDSO_COARSE) {\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 450 \t\t/*\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 451 \t\t * Preserves the behaviour of posix_get_coarse_res().\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 452 \t\t */\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 453 \t\tns = LOW_RES_NSEC;\n" - "cd3557a7618bf5 Thomas Wei\303\237schuh 2025-07-01 @454 \t} else if (msk & VDSO_AUX) {\n" - "cd3557a7618bf5 Thomas Wei\303\237schuh 2025-07-01 455 \t\tns = aux_clock_resolution_ns();\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 456 \t} else {\n" - "34f888e3405ace Thomas Wei\303\237schuh 2025-07-01 457 \t\treturn false;\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 458 \t}\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 459 \n" - "1638b8f096ca16 Thomas Gleixner 2019-10-21 460 \tif (likely(res)) {\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 461 \t\tres->tv_sec = 0;\n" - "00b26474c2f161 Vincenzo Frascino 2019-06-21 462 \t\tres->tv_nsec = ns;\n" - "1638b8f096ca16 Thomas Gleixner 2019-10-21 463 \t}\n" - "34f888e3405ace Thomas Wei\303\237schuh 2025-07-01 464 \treturn true;\n" - "502a590a170b3b Thomas Gleixner 2019-07-28 465 }\n" - "502a590a170b3b Thomas Gleixner 2019-07-28 466 \n" - "\n" - ":::::: The code at line 308 was first introduced by commit\n" - ":::::: cd3557a7618bf5c1935e9f66b58a329f1f1f4b27 vdso/gettimeofday: Add support for auxiliary clocks\n" - "\n" - ":::::: TO: Thomas Wei\303\237schuh <thomas.weissschuh@linutronix.de>\n" - ":::::: CC: Thomas Gleixner <tglx@linutronix.de>\n" - "\n" - "-- \n" - "0-DAY CI Kernel Test Service\n" - https://github.com/intel/lkp-tests/wiki + 502a590a170b3b Thomas Gleixner 2019-07-28 314 } -5ea048dcdd5b58de0c7e654f409e843a77a7067b57683b0c701b59df7f7d52e6 +0d7fe1755e4f29ab5f9a0d652d87b14c8db83788d4fd98c39fadeb14792ed761
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.