aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/call-graph-from-sql.py
diff options
context:
space:
mode:
authorThomas Gleixner <[email protected]>2017-06-20 17:37:36 +0200
committerThomas Gleixner <[email protected]>2017-06-20 21:33:56 +0200
commit098b0e01a91c42aaaf0425605cd126b03fcb0bcf (patch)
treed936fa77c10117b58f5a47f789745bc88b093c75 /tools/perf/scripts/python/call-graph-from-sql.py
parent35eb7258c009dc478338e674a5a84d25d0929c56 (diff)
posix-cpu-timers: Make timespec to nsec conversion safe
The expiry time of a posix cpu timer is supplied through sys_timer_set() via a struct timespec. The timespec is validated for correctness. In the actual set timer implementation the timespec is converted to a scalar nanoseconds value. If the tv_sec part of the time spec is large enough the conversion to nanoseconds (sec * NSEC_PER_SEC) overflows 64bit. Mitigate that by using the timespec_to_ktime() conversion function, which checks the tv_sec part for a potential mult overflow and clamps the result to KTIME_MAX, which is about 292 years. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Xishi Qiu <[email protected]> Cc: John Stultz <[email protected]> Link: http://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-sql.py')
0 files changed, 0 insertions, 0 deletions