public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: David Howells <dhowells@redhat.com>
Cc: lukas@wunner.de, linux-efi@vger.kernel.org,
	linux-security-module@vger.kernel.org, keyrings@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/6] arm/efi: Allow invocation of arbitrary runtime services [ver #2]
Date: Wed, 23 Nov 2016 10:27:48 +0000	[thread overview]
Message-ID: <20161123102747.GD24624@leverpostej> (raw)
In-Reply-To: <147986056324.13790.12670822944798392730.stgit@warthog.procyon.org.uk>

Hi,

Any reason to not Cc LAKML?

On Wed, Nov 23, 2016 at 12:22:43AM +0000, David Howells wrote:
> Provide the ability to perform mixed-mode runtime service calls for arm in
> the same way that commit 0a637ee61247bd4bed9b2a07568ef7a1cfc76187
> ("x86/efi: Allow invocation of arbitrary boot services") provides the
> ability to invoke arbitrary boot services.

I'm not sure I understand. On arm/arm64, "mixed-mode" simply isn't possible.

I see we already call runtime services directly in efi_get_secureboot()
in drivers/firmware/efi/libstub/arm-stub.c.

If this is just to provide a consistent API for the stub, please note
that.

> Suggested-by: Lukas Wunner <lukas@wunner.de>
> Signed-off-by: David Howells <dhowells@redhat.com>
> ---
> 
>  arch/arm/include/asm/efi.h   |    1 +
>  arch/arm64/include/asm/efi.h |    1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/arch/arm/include/asm/efi.h b/arch/arm/include/asm/efi.h
> index 0b06f5341b45..e4e6a9d6a825 100644
> --- a/arch/arm/include/asm/efi.h
> +++ b/arch/arm/include/asm/efi.h
> @@ -55,6 +55,7 @@ void efi_virtmap_unload(void);
>  
>  #define efi_call_early(f, ...)		sys_table_arg->boottime->f(__VA_ARGS__)
>  #define __efi_call_early(f, ...)	f(__VA_ARGS__)
> +#define efi_call_runtime(f, ...)	sys_table_arg->runtime->f(__VA_ARGS__)
>  #define efi_is_64bit()			(false)
>  
>  #define efi_call_proto(protocol, f, instance, ...)			\
> diff --git a/arch/arm64/include/asm/efi.h b/arch/arm64/include/asm/efi.h
> index 771b3f0bc757..d74ae223d89f 100644
> --- a/arch/arm64/include/asm/efi.h
> +++ b/arch/arm64/include/asm/efi.h
> @@ -49,6 +49,7 @@ int efi_set_mapping_permissions(struct mm_struct *mm, efi_memory_desc_t *md);
>  
>  #define efi_call_early(f, ...)		sys_table_arg->boottime->f(__VA_ARGS__)
>  #define __efi_call_early(f, ...)	f(__VA_ARGS__)
> +#define efi_call_runtime(f, ...)	sys_table_arg->runtime->f(__VA_ARGS__)

Given this can only work in the stub, the name is somewhat unfortunate,
as it sounds like it's expected to be used at runtime (i.e. in the
kernel). But I guess that's not a big problem.

Other than the casting issue you noted, I think this should work,
though.

Thanks,
Mark.

  parent reply	other threads:[~2016-11-23 10:29 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-23  0:22 [PATCH 0/6] efi: Pass secure boot mode to kernel [ver #2] David Howells
2016-11-23  0:22 ` [PATCH 1/6] x86/efi: Allow invocation of arbitrary runtime services " David Howells
2016-11-23  0:22 ` [PATCH 2/6] arm/efi: " David Howells
2016-11-23  9:34   ` David Howells
2016-11-23 10:35     ` Ard Biesheuvel
2016-11-23 11:51       ` David Howells
2016-11-23 10:27   ` Mark Rutland [this message]
2016-11-23 11:46     ` David Howells
2016-11-23 13:38       ` Mark Rutland
2016-11-23  0:22 ` [PATCH 3/6] efi: Add SHIM and image security database GUID definitions " David Howells
2016-11-23  0:22 ` [PATCH 4/6] efi: Get the secure boot status " David Howells
2016-11-23  9:31   ` Lukas Wunner
2016-11-23  9:53     ` David Howells
2016-11-23 10:10       ` Lukas Wunner
2016-11-23 10:47   ` Mark Rutland
2016-11-23 11:25     ` David Howells
2016-11-23 13:42       ` Mark Rutland
2016-11-23 14:13         ` David Howells
2016-11-23 14:24           ` Mark Rutland
2016-11-23 14:55             ` David Howells
2016-11-29 18:11               ` Matthew Garrett
2016-11-30 16:51     ` David Howells
2016-11-23  0:23 ` [PATCH 5/6] efi: Disable secure boot if shim is in insecure mode " David Howells
2016-11-23 13:38   ` Mark Rutland
2016-11-23  0:23 ` [PATCH 6/6] efi: Add EFI_SECURE_BOOT bit " David Howells
2016-11-23  9:27   ` Lukas Wunner
2016-11-23 10:07     ` David Howells
2016-11-23 10:09       ` David Howells

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161123102747.GD24624@leverpostej \
    --to=mark.rutland@arm.com \
    --cc=dhowells@redhat.com \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=lukas@wunner.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox