lkml.org 
[lkml]   [2019]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[RFC PATCH 0/2] add ktime_sub_safe() to avoid undefined behaviour
Date
When I ran Syzkaller testsuite, I got some UBSAN warnings with
ktime_sub().

Instead of putting overflow checks into each place, add a function
which does the sanity checking and convert all affected callers to use
it.

Hongbo Yao (2):
ktime: add ktime_sub_safe() to avoid undefined behaviour
hrtimer: Prevent overflow for relative refrences

include/linux/ktime.h | 8 ++++++++
kernel/time/hrtimer.c | 21 +++++++++++++++++++--
2 files changed, 27 insertions(+), 2 deletions(-)

--
2.20.1

\
 
 \ /
  Last update: 2019-03-06 14:01    [W:0.033 / U:3.968 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site