summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorHungyu Lin <dennylin0707@gmail.com>2026-10-20 21:01:57 +0000
committerAndrew Morton <akpm@linux-foundation.org>2026-10-24 00:46:49 -0700
commit6b30c39a5e333cfb1475acf0f73de6ef954eea8a (patch)
treed9345dd0d9b8a790d6ab36be4788e6b7dad0121a /scripts/Makefile.thinlto
parent26d7e34b4226709084461a07bf28d9066fa96d8c (diff)
downloadlinux-next-6b30c39a5e333cfb1475acf0f73de6ef954eea8a.tar.gz
linux-next-6b30c39a5e333cfb1475acf0f73de6ef954eea8a.zip
compat: avoid double rounding in times()
do_sys_times() already converts CPU time to USER_HZ ticks. The compat path converts each value back to jiffies before converting it to COMPAT_USER_HZ. This round trip can lose precision even when the two userspace rates match. With HZ=250 and USER_HZ=COMPAT_USER_HZ=100, one user tick becomes two jiffies and then zero compat ticks. Every odd tick count loses one tick, so any of the four tms fields can underreport CPU time by an additional 10 ms. Return the value directly when the native and compat units match. Keep the existing conversion for differing rates. Link: https://lore.kernel.org/20261020210157.52057-1-dennylin0707@gmail.com Fixes: f06febc96ba8 ("timers: fix itimer/many thread hang") Signed-off-by: Hungyu Lin <dennylin0707@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Thomas Gleixner <tglx@kernel.org> Cc: <stable@vger.kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions