Skip to content

sys_setitimer and sys_alarm hotfixes (take #2)

Thomas Gleixner lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2sys_alarm() unsigned signed conversion fixuparch/ia64/ia32/sys_ia32.c arch/mips/kernel/sysirix.c arch/x86_64/ia32/sys_ia32.c +3 more+43 -611 reply
2/2Validate and sanitze itimer timeval from userspaceDocumentation/feature-removal-schedule.txt kernel/itimer.c+76 -01 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [patch 0/2] sys_setitimer and sys_alarm hotfixes (take #2)

Andrew,

The hrtimer merge breaks sys_alarm() with a timeout value > INT_MAX due to a unsigned to signed conversion. Timeout values > INT_MAX are legitimate usage of alarm(), so this has to be corrected.

Due to a missing validation check of the userspace itimer values non canonical timespecs can be provided to the setitimer code. While the pre 2.6.16 code converted negative timevals to a long timeout (depending on HZ) the hrtimer code treats them as expired. Also on 32 bit machines non normalized timevals might cause random behaviour of the optimized ktime_t operations. Due to the historical behaviour we can not suddenly return -EINVAL in such cases, but we have to fixup the values to avoid random behaviour.

tglx

--