From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Fleming Subject: Re: efi: be more paranoid about available space when creating variables Date: Wed, 27 Mar 2013 09:10:42 +0000 Message-ID: <5152B792.1070104@console-pimps.org> References: <1364004995.3728.76.camel@deadeye.wl.decadent.org.uk> <1364010441.3728.82.camel@deadeye.wl.decadent.org.uk> <1364070731.2553.47.camel@x230.sbx07502.somerma.wayport.net> <514E31B0.4030305@intel.com> <20130326035600.GA6209@srcf.ucam.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-efi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Seiji Aguchi Cc: Matthew Garrett , Matt Fleming , Ben Hutchings , Josh Boyer , "stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Seth Forshee List-Id: linux-efi@vger.kernel.org On 26/03/13 23:33, Seiji Aguchi wrote: > If we can calculate the size of available variables by ourselves, > we don't need to call QueryVariableInfo(). > It makes efivars robust against buggy firmwares. > Also, this patch actually fixes a serious bug, failing boot up. > > In theory, QueryVariableInfo() should return accurate values to kernel. > But, it doesn't in practice. Exactly and this patch is *still* relying on the output of QueryVariableInfo(). I doubt DataSize will be accurate everywhere either. > I think creating blacklist will be like playing whac-a-mole, because > we can't anticipate how many buggy firmwares will appear in the future. You wouldn't need to reimplement the workaround for every broken machine, you just add the machine's identifiers to the list. And no, we can't anticipate the firmware bugs we'll see in the future which is why we need to solve this on a case-by-case basis. -- Matt Fleming, Intel Open Source Technology Center