All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mimi Zohar <zohar@linux.ibm.com>
To: Scott Wood <swood@redhat.com>,
	Dmitry Kasatkin <dmitry.kasatkin@gmail.com>
Cc: linux-integrity@vger.kernel.org, linux-rt-users@vger.kernel.org
Subject: Re: [PATCH] x86/ima: Check EFI_RUNTIME_SERVICES before using
Date: Thu, 25 Apr 2019 08:17:27 -0400	[thread overview]
Message-ID: <1556194647.3894.106.camel@linux.ibm.com> (raw)
In-Reply-To: <20190423224807.4008-1-swood@redhat.com>

On Tue, 2019-04-23 at 17:48 -0500, Scott Wood wrote:
> Checking efi_enabled(EFI_BOOT) is not sufficient to ensure that
> EFI runtime services are available, e.g. if efi=noruntime is used.
> 
> Without this, I get an oops on a PREEMPT_RT kernel where efi=noruntime is
> the default.
> 
> Fixes: 399574c64eaf94e8 ("x86/ima: retry detecting secure boot mode")
> Signed-off-by: Scott Wood <swood@redhat.com>

Thanks!

> ---
>  arch/x86/kernel/ima_arch.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/arch/x86/kernel/ima_arch.c b/arch/x86/kernel/ima_arch.c
> index e47cd9390ab4..2a2e87717bad 100644
> --- a/arch/x86/kernel/ima_arch.c
> +++ b/arch/x86/kernel/ima_arch.c
> @@ -17,6 +17,11 @@ static enum efi_secureboot_mode get_sb_mode(void)
>  
>  	size = sizeof(secboot);
>  
> +	if (!efi_enabled(EFI_RUNTIME_SERVICES)) {
> +		pr_info("ima: secureboot mode unknown, no efi\n");
> +		return efi_secureboot_mode_unknown;
> +	}
> +
>  	/* Get variable contents into buffer */
>  	status = efi.get_variable(efi_SecureBoot_name, &efi_variable_guid,
>  				  NULL, &size, &secboot);


      reply	other threads:[~2019-04-25 12:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-23 22:48 [PATCH] x86/ima: Check EFI_RUNTIME_SERVICES before using Scott Wood
2019-04-25 12:17 ` Mimi Zohar [this message]

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=1556194647.3894.106.camel@linux.ibm.com \
    --to=zohar@linux.ibm.com \
    --cc=dmitry.kasatkin@gmail.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=swood@redhat.com \
    /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 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.