Messages in this thread | | | Date | Fri, 26 Apr 2013 10:01:32 +0100 | From | Matt Fleming <> | Subject | Re: [GIT PULL] x86 fixes for 3.9 |
| |
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.
| |