android_kernel_motorola_sm6375/kernel/time
Repository files (latest commit first)
Filename Latest commit message Latest commit date
John Stultz 37cf4dc337 time: Verify time values in adjtimex ADJ_SETOFFSET to avoid overflow
For adjtimex()'s ADJ_SETOFFSET, make sure the tv_usec value is
sane. We might multiply them later which can cause an overflow
and undefined behavior.

This patch introduces new helper functions to simplify the
checking code and adds comments to clarify

Orginally this patch was by Sasha Levin, but I've basically
rewritten it, so he should get credit for finding the issue
and I should get the blame for any mistakes made since.

Also, credit to Richard Cochran for the phrasing used in the
comment for what is considered valid here.

Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Reported-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
2015-12-10 22:41:06 -08:00
..
alarmtimer.c alarmtimer: Avoid unexpected rtc interrupt when system resume from S3 2015-12-03 22:31:42 -08:00
clockevents.c clockevents: Remove unused set_mode() callback 2015-09-14 11:00:55 +02:00
clocksource.c clocksource: Add CPU info to clocksource watchdog reporting 2015-12-07 12:15:28 -08:00
hrtimer.c time: Fix spelling in comments 2015-09-22 12:54:23 +02:00
itimer.c
jiffies.c
Kconfig
Makefile
ntp.c time: Verify time values in adjtimex ADJ_SETOFFSET to avoid overflow 2015-12-10 22:41:06 -08:00
ntp_internal.h ntp/pps: use timespec64 for hardpps() 2015-10-01 09:57:59 -07:00
posix-clock.c
posix-cpu-timers.c posix_cpu_timer: Reduce unnecessary sighand lock contention 2015-10-15 11:23:41 +02:00
posix-timers.c
sched_clock.c
test_udelay.c
tick-broadcast-hrtimer.c
tick-broadcast.c
tick-common.c clockevents: Remove unused set_mode() callback 2015-09-14 11:00:55 +02:00
tick-internal.h
tick-oneshot.c
tick-sched.c nohz: Assert existing housekeepers when nohz full enabled 2015-09-02 10:33:22 +02:00
tick-sched.h
time.c Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-09-01 14:04:50 -07:00
timeconst.bc timeconst: Update path in comment 2015-10-26 10:06:06 +09:00
timeconv.c
timecounter.c
timekeeping.c time: Verify time values in adjtimex ADJ_SETOFFSET to avoid overflow 2015-12-10 22:41:06 -08:00
timekeeping.h
timekeeping_debug.c
timekeeping_internal.h
timer.c timers: Use proper base migration in add_timer_on() 2015-11-04 20:23:19 +01:00
timer_list.c clockevents: Remove unused set_mode() callback 2015-09-14 11:00:55 +02:00
timer_stats.c