Re: boot panic regression introduced in 3.5-rc7

From: Thomas Gleixner
Date: Wed Aug 01 2012 - 02:50:12 EST


On Mon, 30 Jul 2012, John Stultz wrote:
> On 07/29/2012 08:51 PM, CAI Qian wrote:
> Now, one of the reasons Thomas and I changed the logic was that using the
> precalculated realtime_offset was slightly more efficient then re-adding xtime
> and wall_to_monotonic's components separately. But how valuable this
> unmeasured slight efficiency is vs extra robustness for crazy time values is
> questionable.

Well, I guess it unearthed a weakness which has been there forever:

Trusting random values which are supplied by cmos or whatever.

So the right fix is:

> 2) Validate that time values we accept are smaller the ktime_t before using
> them.

I really don't like the magic workaround by nulling out the effect of
crap data with a more expensive calculation.

Thanks,

tglx
--
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/