lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 1 Jun 2013 01:03:11 +0100
From:	Matthew Garrett <mjg59@...f.ucam.org>
To:	Russ Anderson <rja@....com>
Cc:	James Bottomley <James.Bottomley@...senPartnership.com>,
	Ingo Molnar <mingo@...nel.org>, Borislav Petkov <bp@...en8.de>,
	Jiri Kosina <jkosina@...e.cz>, joeyli <jlee@...e.com>,
	Matt Fleming <matt@...sole-pimps.org>, matt.fleming@...el.com,
	linux-efi@...r.kernel.org, x86@...nel.org,
	linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...ux.intel.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [regression, bisected] x86: efi: Pass boot services variable
 info to runtime code

On Fri, May 31, 2013 at 05:57:31PM -0500, Russ Anderson wrote:
> On Fri, May 31, 2013 at 05:28:16PM +0100, Matthew Garrett wrote:
> >                                           If nvram becaomes full, some 
> > systems crash during firmware initialisation. So we can't let nvram 
> > become full. The obvious thing to do here is to look at the values from 
> > QueryVariableInfo, but many systems won't perform any garbage collection 
> > until they're almost out of space and so variables that have been 
> > deleted still show up as used space.
> 
> OK.  I get nvram looks full due to lack of garbage collection
> on some systems.  Does QueryVariableInfo (at runtime) tell you
> it is full?  Is the problem that it says it is full when it
> is not, or does not tell you it is full when it is?

QueryVariableInfo reports the amount used *including garbage*. This 
makes it useless for determining how much space is available for the 
firmware to use.

> >                                       We can work around that by adding 
> > up the size of the variables ourselves, but that only gives us the value 
> > for runtime-visible variables. We also need to know how much space is 
> > used by variables that are only visible during boot,
> 
> Is it valid to assume that only the kernel writes to nvram at
> runtime?  Can bios log error information to nvram on an SMM
> interrupt (for example)?

There's a limited number of situations where the firmware can write to 
nvram, but they're basically uninteresting. Practically speaking, it's 
always via the kernel once ExitBootServices() has been called.

> >                                                      hence calling 
> > QueryVariableInfo before ExitBootServices.
> 
> Correct me if I am wrong, but that is called from EFI stubs,
> which is only used by some bootloaders (sometimes grub2).
> Does that mean EFI/grub and EFI/elilo will not hit the problem,
> or will not have your fix?

Will not have the fix. Boot EFI systems via the EFI stub.

-- 
Matthew Garrett | mjg59@...f.ucam.org
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ