<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/include/linux/efi.h, branch linux-3.10.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.10.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.10.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-03-16T15:41:37Z</updated>
<entry>
<title>efi: Make efivarfs entries immutable by default</title>
<updated>2016-03-16T15:41:37Z</updated>
<author>
<name>Peter Jones</name>
</author>
<published>2016-02-08T19:48:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7b35014c77e1ba732617c83ab6705298302bd09f'/>
<id>urn:sha1:7b35014c77e1ba732617c83ab6705298302bd09f</id>
<content type='text'>
commit ed8b0de5a33d2a2557dce7f9429dca8cb5bc5879 upstream.

"rm -rf" is bricking some peoples' laptops because of variables being
used to store non-reinitializable firmware driver data that's required
to POST the hardware.

These are 100% bugs, and they need to be fixed, but in the mean time it
shouldn't be easy to *accidentally* brick machines.

We have to have delete working, and picking which variables do and don't
work for deletion is quite intractable, so instead make everything
immutable by default (except for a whitelist), and make tools that
aren't quite so broad-spectrum unset the immutable flag.

Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
Tested-by: Lee, Chun-Yi &lt;jlee@suse.com&gt;
Acked-by: Matthew Garrett &lt;mjg59@coreos.com&gt;
Signed-off-by: Matt Fleming &lt;matt@codeblueprint.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>efi: Make our variable validation list include the guid</title>
<updated>2016-03-16T15:41:37Z</updated>
<author>
<name>Peter Jones</name>
</author>
<published>2016-02-08T19:48:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d591b6da723e6b09b57a2b2386d00fe095bf034b'/>
<id>urn:sha1:d591b6da723e6b09b57a2b2386d00fe095bf034b</id>
<content type='text'>
commit 8282f5d9c17fe15a9e658c06e3f343efae1a2a2f upstream.

All the variables in this list so far are defined to be in the global
namespace in the UEFI spec, so this just further ensures we're
validating the variables we think we are.

Including the guid for entries will become more important in future
patches when we decide whether or not to allow deletion of variables
based on presence in this list.

Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
Tested-by: Lee, Chun-Yi &lt;jlee@suse.com&gt;
Acked-by: Matthew Garrett &lt;mjg59@coreos.com&gt;
Signed-off-by: Matt Fleming &lt;matt@codeblueprint.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>efi: Do variable name validation tests in utf8</title>
<updated>2016-03-16T15:41:37Z</updated>
<author>
<name>Peter Jones</name>
</author>
<published>2016-02-08T19:48:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=44f21ed11c92f28b44fe283b8d0fd7899bc35430'/>
<id>urn:sha1:44f21ed11c92f28b44fe283b8d0fd7899bc35430</id>
<content type='text'>
commit 3dcb1f55dfc7631695e69df4a0d589ce5274bd07 upstream.

Actually translate from ucs2 to utf8 before doing the test, and then
test against our other utf8 data, instead of fudging it.

Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
Acked-by: Matthew Garrett &lt;mjg59@coreos.com&gt;
Tested-by: Lee, Chun-Yi &lt;jlee@suse.com&gt;
Signed-off-by: Matt Fleming &lt;matt@codeblueprint.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>efi, pstore: Read data from variable store before memcpy()</title>
<updated>2013-04-30T15:03:10Z</updated>
<author>
<name>Matt Fleming</name>
</author>
<published>2013-04-29T19:08:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8a415b8c05f261a52f45f2271b6c4731376fd5b5'/>
<id>urn:sha1:8a415b8c05f261a52f45f2271b6c4731376fd5b5</id>
<content type='text'>
Seiji reported getting empty dmesg-* files, because the data was never
actually read in efi_pstore_read_func(), and so the memcpy() was copying
garbage data.

This patch necessitated adding __efivar_entry_get() which is callable
between efivar_entry_iter_{begin,end}(). We can also delete
__efivar_entry_size() because efi_pstore_read_func() was the only
caller.

Reported-by: Seiji Aguchi &lt;seiji.aguchi@hds.com&gt;
Tested-by: Seiji Aguchi &lt;seiji.aguchi@hds.com&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: Matthew Garrett &lt;matthew.garrett@nebula.com&gt;
Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'v3.9' into efi-for-tip2</title>
<updated>2013-04-30T10:42:13Z</updated>
<author>
<name>Matt Fleming</name>
</author>
<published>2013-04-30T10:30:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a614e1923d5389d01f3545ee4a90e39a04d0c90d'/>
<id>urn:sha1:a614e1923d5389d01f3545ee4a90e39a04d0c90d</id>
<content type='text'>
Resolve conflicts for Ingo.

Conflicts:
	drivers/firmware/Kconfig
	drivers/firmware/efivars.c

Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</content>
</entry>
<entry>
<title>efi: split efisubsystem from efivars</title>
<updated>2013-04-17T12:27:06Z</updated>
<author>
<name>Tom Gundersen</name>
</author>
<published>2013-02-08T15:37:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a9499fa7cd3fd4824a7202d00c766b269fa3bda6'/>
<id>urn:sha1:a9499fa7cd3fd4824a7202d00c766b269fa3bda6</id>
<content type='text'>
This registers /sys/firmware/efi/{,systab,efivars/} whenever EFI is enabled
and the system is booted with EFI.

This allows
 *) userspace to check for the existence of /sys/firmware/efi as a way
    to determine whether or it is running on an EFI system.
 *) 'mount -t efivarfs none /sys/firmware/efi/efivars' without manually
    loading any modules.

[ Also, move the efivar API into vars.c and unconditionally compile it.
  This allows us to move efivars.c, which now only contains the sysfs
  variable code, into the firmware/efi directory. Note that the efivars.c
  filename is kept to maintain backwards compatability with the old
  efivars.ko module. With this patch it is now possible for efivarfs
  to be built without CONFIG_EFI_VARS - Matt ]

Cc: Seiji Aguchi &lt;seiji.aguchi@hds.com&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: Mike Waychison &lt;mikew@google.com&gt;
Cc: Kay Sievers &lt;kay@vrfy.org&gt;
Cc: Jeremy Kerr &lt;jk@ozlabs.org&gt;
Cc: Matthew Garrett &lt;mjg59@srcf.ucam.org&gt;
Cc: Chun-Yi Lee &lt;jlee@suse.com&gt;
Cc: Andy Whitcroft &lt;apw@canonical.com&gt;
Cc: Tobias Powalowski &lt;tpowa@archlinux.org&gt;
Signed-off-by: Tom Gundersen &lt;teg@jklm.no&gt;
Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</content>
</entry>
<entry>
<title>efivars: Move pstore code into the new EFI directory</title>
<updated>2013-04-17T12:24:01Z</updated>
<author>
<name>Matt Fleming</name>
</author>
<published>2013-02-08T15:48:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=048517722cde2595a7366d0c3c72b8b1ec142a9c'/>
<id>urn:sha1:048517722cde2595a7366d0c3c72b8b1ec142a9c</id>
<content type='text'>
efivars.c has grown far too large and needs to be divided up. Create a
new directory and move the persistence storage code to efi-pstore.c now
that it uses the new efivar API. This helps us to greatly reduce the
size of efivars.c and paves the way for moving other code out of
efivars.c.

Note that because CONFIG_EFI_VARS can be built as a module efi-pstore
must also include support for building as a module.

Reviewed-by: Tom Gundersen &lt;teg@jklm.no&gt;
Tested-by: Tom Gundersen &lt;teg@jklm.no&gt;
Cc: Seiji Aguchi &lt;seiji.aguchi@hds.com&gt;
Cc: Anton Vorontsov &lt;cbouatmailru@gmail.com&gt;
Cc: Colin Cross &lt;ccross@android.com&gt;
Cc: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Matthew Garrett &lt;mjg59@srcf.ucam.org&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</content>
</entry>
<entry>
<title>efivars: efivar_entry API</title>
<updated>2013-04-17T12:23:59Z</updated>
<author>
<name>Matt Fleming</name>
</author>
<published>2013-02-03T20:16:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e14ab23dde12b80db4c94b684a2e485b72b16af3'/>
<id>urn:sha1:e14ab23dde12b80db4c94b684a2e485b72b16af3</id>
<content type='text'>
There isn't really a formal interface for dealing with EFI variables
or struct efivar_entry. Historically, this has led to various bits of
code directly accessing the generic EFI variable ops, which inherently
ties it to specific EFI variable operations instead of indirectly
using whatever ops were registered with register_efivars(). This lead
to the efivarfs code only working with the generic EFI variable ops
and not CONFIG_GOOGLE_SMI.

Encapsulate everything that needs to access '__efivars' inside an
efivar_entry_* API and use the new API in the pstore, sysfs and
efivarfs code.

Much of the efivars code had to be rewritten to use this new API. For
instance, it is now up to the users of the API to build the initial
list of EFI variables in their efivar_init() callback function. The
variable list needs to be passed to efivar_init() which allows us to
keep work arounds for things like implementation bugs in
GetNextVariable() in a central location.

Allowing users of the API to use a callback function to build the list
greatly benefits the efivarfs code which needs to allocate inodes and
dentries for every variable.  It previously did this in a racy way
because the code ran without holding the variable spinlock. Both the
sysfs and efivarfs code maintain their own lists which means the two
interfaces can be running simultaneously without interference, though
it should be noted that because no synchronisation is performed it is
very easy to create inconsistencies. efibootmgr doesn't currently use
efivarfs and users are likely to also require the old sysfs interface,
so it makes sense to allow both to be built.

Reviewed-by: Tom Gundersen &lt;teg@jklm.no&gt;
Tested-by: Tom Gundersen &lt;teg@jklm.no&gt;
Cc: Seiji Aguchi &lt;seiji.aguchi@hds.com&gt;
Cc: Matthew Garrett &lt;mjg59@srcf.ucam.org&gt;
Cc: Jeremy Kerr &lt;jk@ozlabs.org&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: Mike Waychison &lt;mikew@google.com&gt;
Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</content>
</entry>
<entry>
<title>efi: move utf16 string functions to efi.h</title>
<updated>2013-04-17T07:28:21Z</updated>
<author>
<name>Matt Fleming</name>
</author>
<published>2013-02-03T19:53:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d5abc7c1050ab2b9556a4bf21626cd74e83cd086'/>
<id>urn:sha1:d5abc7c1050ab2b9556a4bf21626cd74e83cd086</id>
<content type='text'>
There are currently two implementations of the utf16 string functions.
Somewhat confusingly, they've got different names.

Centralise the functions in efi.h.

Reviewed-by: Tom Gundersen &lt;teg@jklm.no&gt;
Tested-by: Tom Gundersen &lt;teg@jklm.no&gt;
Reviewed-by: Mike Waychison &lt;mikew@google.com&gt;
Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</content>
</entry>
<entry>
<title>x86, efivars: firmware bug workarounds should be in platform code</title>
<updated>2013-04-09T10:34:05Z</updated>
<author>
<name>Matt Fleming</name>
</author>
<published>2013-03-25T09:14:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a6e4d5a03e9e3587e88aba687d8f225f4f04c792'/>
<id>urn:sha1:a6e4d5a03e9e3587e88aba687d8f225f4f04c792</id>
<content type='text'>
Let's not burden ia64 with checks in the common efivars code that we're not
writing too much data to the variable store. That kind of thing is an x86
firmware bug, plain and simple.

efi_query_variable_store() provides platforms with a wrapper in which they can
perform checks and workarounds for EFI variable storage bugs.

Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Matthew Garrett &lt;mjg59@srcf.ucam.org&gt;
Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</content>
</entry>
</feed>
