linux/arch/x86_64/ia32
Thomas Gleixner c08b8a4910 [PATCH] sys_alarm() unsigned signed conversion fixup
alarm() calls the kernel with an unsigend int timeout in seconds.  The
value is stored in the tv_sec field of a struct timeval to setup the
itimer.  The tv_sec field of struct timeval is of type long, which causes
the tv_sec value to be negative on 32 bit machines if seconds > INT_MAX.

Before the hrtimer merge (pre 2.6.16) such a negative value was converted
to the maximum jiffies timeout by the timeval_to_jiffies conversion.  It's
not clear whether this was intended or just happened to be done by the
timeval_to_jiffies code.

hrtimers expect a timeval in canonical form and treat a negative timeout as
already expired.  This breaks the legitimate usage of alarm() with a
timeout value > INT_MAX seconds.

For 32 bit machines it is therefor necessary to limit the internal seconds
value to avoid API breakage.  Instead of doing this in all implementations
of sys_alarm the duplicated sys_alarm code is moved into a common function
in itimer.c

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-25 08:22:48 -08:00
..
fpu32.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ia32_aout.c [PATCH] x86_64: Allow modular build of ia32 aout loader 2005-11-14 19:55:16 -08:00
ia32_binfmt.c [PATCH] x86_64: Remove elf32_map in 32bit ELF loader 2006-01-16 23:18:35 -08:00
ia32_signal.c [PATCH] x86_64: fix single step handling for 32bit processes 2006-01-11 19:04:50 -08:00
ia32entry.S [PATCH] fstatat64 support 2006-02-11 21:41:10 -08:00
ipc32.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Makefile [PATCH] x86_64: Flexmap for 32bit and randomized mappings for 64bit 2006-01-16 23:18:35 -08:00
mmap32.c [PATCH] x86_64: Flexmap for 32bit and randomized mappings for 64bit 2006-01-16 23:18:35 -08:00
ptrace32.c [PATCH] amd64: task_pt_regs() 2006-01-12 09:08:51 -08:00
sys_ia32.c [PATCH] sys_alarm() unsigned signed conversion fixup 2006-03-25 08:22:48 -08:00
syscall32_syscall.S [PATCH] x86_64: Icecream has no way of detecting assembler-level includes 2005-07-28 21:46:01 -07:00
syscall32.c [PATCH] error path in setup_arg_pages() misses vm_unacct_memory() 2005-09-14 11:18:13 -07:00
tls32.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
vsyscall-sigreturn.S [PATCH] x86_64: Allow compilation on a 32bit biarch toolchain 2006-01-11 19:04:52 -08:00
vsyscall-syscall.S [PATCH] x86_64: Allow compilation on a 32bit biarch toolchain 2006-01-11 19:04:52 -08:00
vsyscall-sysenter.S [PATCH] x86_64: Allow compilation on a 32bit biarch toolchain 2006-01-11 19:04:52 -08:00
vsyscall.lds [PATCH] x86_64: fix PT_NOTE addition to IA32 vDSO 2005-04-28 22:47:29 -07:00