lkml.org 
[lkml]   [2013]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 1/2] efivars: Check max_size only if it is non-zero.
Date
> Some (broken?) EFI implementations return always a MaximumVariableSize of 0,
> check against max_size only if it is non-zero.

The spec doesn't say that zero has any special meaning - so if an implementation
returns max_size == 0 but lets you set a variable to a size > 0, then I don't think
there is a need for parentheses or a "?" in this commit comment.

But if Linux silently accepts such broken EFI, then there is no feedback loop
to let EFI implementations know that they are broken. In other areas we have
thrown out messages about firmware being broken ... perhaps:

if (max_size == 0)
printk_once("Broken EFI implementation is returning MaxVariableSize=0\n");

would help? After all there probably *is* a maximum size - but EFI isn't telling us what it is.

-Tony


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