Re: [GIT PULL] x86 fixes for 3.9

From: Matt Fleming
Date: Fri Apr 26 2013 - 05:01:44 EST


On 26/04/13 08:29, Ingo Molnar wrote:
> I'm worried about the fragility of this code - this is firmware code ...
>
> I think firmware code should be fundamentally paranoid and robust, and in
> this case treat all EFI-provided data as hostile and do a much sanity
> checking of it as possible - and provide an actionable error message if
> the checks fail, not just 'crash'.
>
> Even if no-one complained, yet.

I'm not sure how much more robust checking for NULL makes it, it's not
going to save us from garbage pointers, etc. Instead of the pointer
being NULL a more likely bug is that query_variable_info() exists (for
those firmware that implement the relevant spec version), but doesn't
work correctly. That's the kind of bug we've been seeing in other
functions.

To be fair to Josh, his original submission did include the NULL check,
but I asked him to remove it. If someone really wants to re-add the
check for a NULL pointer, I'm not super opposed to it.
--
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/