lkml.org 
[lkml]   [2013]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [GIT PULL] x86 fixes for 3.9

* Matthew Garrett <matthew.garrett@nebula.com> wrote:

> On Thu, 2013-04-25 at 15:20 -0700, Linus Torvalds wrote:
> > On Thu, Apr 25, 2013 at 2:44 PM, H. Peter Anvin <hpa@linux.intel.com> wrote:
> > >
> > > - if (!sys_table->runtime->query_variable_info)
> > > + if (sys_table->runtime->hdr.revision < EFI_2_00_SYSTEM_TABLE_REVISION)
> > > return EFI_UNSUPPORTED;
> >
> > Is a EFI 2.00 system table *guaranteed* to have that
> > "query_variable_info" function? The above adds the version check, but
> > removes the check for a NULL pointer.
>
> As far as the spec's concerned, yes. As far as reality's concerned - if
> anything doesn't provide it, we're already crashing when
> efi_virt_query_variable_info() gets called. Nobody's complained so far.

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.

Thanks,

Ingo


\
 
 \ /
  Last update: 2013-04-26 09:41    [W:0.081 / U:1.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site