mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch 0/2] sys_setitimer and sys_alarm hotfixes (take #2)
@ 2006-03-19 20:02 Thomas Gleixner
  2006-03-19 20:02 ` [patch 1/2] sys_alarm() unsigned signed conversion fixup Thomas Gleixner
  2006-03-19 20:02 ` [patch 2/2] Validate and sanitze itimer timeval from userspace Thomas Gleixner
  0 siblings, 2 replies; 5+ messages in thread
From: Thomas Gleixner @ 2006-03-19 20:02 UTC (permalink / raw)
  To: Andrew Morton; +Cc: LKML, Ingo Molnar, Tom Rini

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

--


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-03-20  6:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-19 20:02 [patch 0/2] sys_setitimer and sys_alarm hotfixes (take #2) Thomas Gleixner
2006-03-19 20:02 ` [patch 1/2] sys_alarm() unsigned signed conversion fixup Thomas Gleixner
2006-03-20  6:06   ` Andrew Morton
2006-03-19 20:02 ` [patch 2/2] Validate and sanitze itimer timeval from userspace Thomas Gleixner
2006-03-20  6:13   ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome