All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] efi: add support for non-standard capsule headers
@ 2017-04-05  9:23 Ard Biesheuvel
       [not found] ` <20170405092317.27921-1-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
  0 siblings, 1 reply; 30+ messages in thread
From: Ard Biesheuvel @ 2017-04-05  9:23 UTC (permalink / raw)
  To: linux-efi-u79uwXL29TY76Z2rM5mHXA
  Cc: matt-mF/unelCI9GS6iBeEJttW/XRex20P6io,
	andy.shevchenko-Re5JQEeQqe8AvxtiuMwx3w,
	pure.logic-SyKdqv6vbfZdzvEItQ6vdLNAH6kLmebB,
	hock.leong.kweh-ral2JQCrhuEAvxtiuMwx3w,
	bp-Gina5bIWoIWzQB+pC5nmwQ,
	sascha.weisenberger-kv7WeFo6aLtBDgjK7y7TUQ,
	jan.kiszka-kv7WeFo6aLtBDgjK7y7TUQ, Ard Biesheuvel

This is a followup to Jan's series [0] to add support for the non-standard
and awkward capsule header layout that is used by the Quark platform.

While we would prefer to adhere to the standard rigorously, the reality
(and common practice) in Linux is that we sometimes have to deal with
quirks. So while Jan's aim is to get Quark to work, the reason for my
involvement is to try and accommodate this in a flexible way without
putting any handling specific to this quirk in the common code.

Patches #1 to #4 are minor preparatory cleanups.

Patch #5 reworks the capsule loader code to use a cached copy of the
header rather than load it from memory multiple times (which may involve
a kmap/kunmap sequence if it is in highmem). This also allows some mangling
to be performed by quirks code.

Patch #6 splits up efi_capsule_setup_info() into a primary part called
__efi_capsule_setup_info(), and a __weak wrapper under the original name,
allowing it to be overridden externally.

Patch #7 changes the array of struct page pointers maintained by the capsule
loader into an array of physical addresses. This allows special versions of
efi_capsule_setup_info() to mangle the contents of the capsule (and skip
headers by moving pointers around) without putting any intimate knowledge
of the quirks handling into the common code.

Patch #8 is Jan's original patch to add the Quark specific quirk to arch/x86,
but reworked to take advantage of the facilities added in #6 and #7.

This has been tested by Jan on Quark, but this needs testing on other
platforms to ensure that the common code still works as expected on
conforming firmware implementations.

Ard Biesheuvel (3):
  efi/capsule-loader: use cached copy of capsule header
  efi/capsule-loader: indirect calls to efi_capsule_setup_info via weak
    alias
  efi/capsule-loader: use page addresses rather than struct page
    pointers

Jan Kiszka (5):
  efi/capsule: Fix return code on failing kmap/vmap
  efi/capsule: Remove pr_debug on ENOMEM or EFAULT
  efi/capsule: Clean up pr_err/info messages
  efi/capsule: Adjust return type of efi_capsule_setup_info
  efi/capsule: Add support for Quark security header

 arch/x86/platform/efi/quirks.c        | 112 ++++++++++++++++++++
 drivers/firmware/efi/Kconfig          |   9 ++
 drivers/firmware/efi/capsule-loader.c | 111 ++++++++-----------
 drivers/firmware/efi/capsule.c        |   7 +-
 include/linux/efi.h                   |  14 ++-
 5 files changed, 184 insertions(+), 69 deletions(-)

-- 
2.9.3

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2017-04-18 18:11 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-05  9:23 [PATCH 0/8] efi: add support for non-standard capsule headers Ard Biesheuvel
     [not found] ` <20170405092317.27921-1-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-04-05  9:23   ` [PATCH 1/8] efi/capsule: Fix return code on failing kmap/vmap Ard Biesheuvel
     [not found]     ` <20170405092317.27921-2-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-04-18 12:30       ` Matt Fleming
2017-04-05  9:23   ` [PATCH 2/8] efi/capsule: Remove pr_debug on ENOMEM or EFAULT Ard Biesheuvel
     [not found]     ` <20170405092317.27921-3-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-04-18 12:30       ` Matt Fleming
2017-04-05  9:23   ` [PATCH 3/8] efi/capsule: Clean up pr_err/info messages Ard Biesheuvel
     [not found]     ` <20170405092317.27921-4-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-04-18 12:32       ` Matt Fleming
2017-04-05  9:23   ` [PATCH 4/8] efi/capsule: Adjust return type of efi_capsule_setup_info Ard Biesheuvel
     [not found]     ` <20170405092317.27921-5-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-04-18 12:33       ` Matt Fleming
2017-04-05  9:23   ` [PATCH 5/8] efi/capsule-loader: use cached copy of capsule header Ard Biesheuvel
     [not found]     ` <20170405092317.27921-6-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-04-18 12:34       ` Matt Fleming
2017-04-05  9:23   ` [PATCH 6/8] efi/capsule-loader: indirect calls to efi_capsule_setup_info via weak alias Ard Biesheuvel
     [not found]     ` <20170405092317.27921-7-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-04-18 12:44       ` Matt Fleming
2017-04-05  9:23   ` [PATCH 7/8] efi/capsule-loader: use page addresses rather than struct page pointers Ard Biesheuvel
     [not found]     ` <20170405092317.27921-8-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-04-18 12:56       ` Matt Fleming
     [not found]         ` <20170418125631.GI24360-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2017-04-18 13:01           ` Ard Biesheuvel
     [not found]             ` <CAKv+Gu9kz89EVh3s0e+uaQ6AZd_5U6xzos+cXdsGvXyR4aogJQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-18 13:42               ` Matt Fleming
2017-04-05  9:23   ` [PATCH 8/8] efi/capsule: Add support for Quark security header Ard Biesheuvel
     [not found]     ` <20170405092317.27921-9-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-04-18 12:48       ` Matt Fleming
     [not found]         ` <20170418124853.GH24360-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2017-04-18 12:55           ` Andy Shevchenko
     [not found]             ` <CAHp75VdqSim86_B=h9vu6veT3t8T8FAdOBfGDov-W9B5GNENwg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-18 12:59               ` Jan Kiszka
     [not found]                 ` <4daca591-8937-8256-d7f5-a1075ad7714a-kv7WeFo6aLtBDgjK7y7TUQ@public.gmane.org>
2017-04-18 13:44                   ` Matt Fleming
     [not found]                     ` <20170418134426.GK24360-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2017-04-18 13:46                       ` Ard Biesheuvel
     [not found]                         ` <CAKv+Gu_wM-TaZn9jgOW4yCwyjh4cTbszOagKmJdrAdov+3GCsQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-18 17:10                           ` Ard Biesheuvel
     [not found]                             ` <CAKv+Gu-uXd30gcUvi_9dErj2bzvTpwVzGR7yiZMgm1KcQHz0dw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-18 18:11                               ` Jan Kiszka
2017-04-10 16:34   ` [PATCH 0/8] efi: add support for non-standard capsule headers Jan Kiszka
2017-04-18 16:26   ` Bryan O'Donoghue
     [not found]     ` <f417e914-7b95-9886-fb8f-bca79d5456a3-SyKdqv6vbfZdzvEItQ6vdLNAH6kLmebB@public.gmane.org>
2017-04-18 16:23       ` Ard Biesheuvel
     [not found]         ` <CAKv+Gu9b7ELU4RtcojrSwCmZg8p-oqXzmdTSVqzAhma1Rg+jQQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-18 16:28           ` Jan Kiszka
2017-04-18 16:31           ` Bryan O'Donoghue

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.