Re: [PROBLEM] possible divide by 0 in kernel/sched/cputime.cscale_stime()

From: Ingo Molnar
Date: Mon Nov 18 2013 - 10:39:56 EST



* Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:

> I would be tempted to say you should simply mark the tsc unstable on
> boot and live with that -- we fully assume the sched_clock stuff is
> not going backwards in an 'observable' way.

BIOS crap and actual hardware bugs do happen - so kernel code needs to
consider TSC input with a pinch of salt, assuming that it's untrusted
external data.

> That said, it might be nice to not crash either..

Indeed, not crashing on weird TSC input is absolutely required!

Thanks,

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/