fix several places where calculating ticks could overflow.
authortedu <tedu@openbsd.org>
Wed, 6 Jul 2016 15:53:01 +0000 (15:53 +0000)
committertedu <tedu@openbsd.org>
Wed, 6 Jul 2016 15:53:01 +0000 (15:53 +0000)
commitade4dc82a7d10bf06baa32184f39c3f5b1e1ac9e
treef3c055307e431b79d541118d066f2743ff46177e
parentba38042c814083c47f69c49291e73d645ce244d1
fix several places where calculating ticks could overflow.
it's not enough to assign to an unsigned type because if the arithmetic
overflows the compiler may decide to do anything. so change all the
long long casts to uint64_t so that we start with the right type.
reported by Tim Newsham of NCC.
ok deraadt
sys/kern/kern_sig.c
sys/kern/kern_synch.c
sys/kern/kern_tc.c
sys/kern/kern_timeout.c