From: Daniel Kiper <daniel.kiper@oracle.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ingo Molnar <mingo@redhat.com>,
linux-efi@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
the arch/x86 maintainers <x86@kernel.org>,
xen-devel <xen-devel@lists.xenproject.org>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
"H. Peter Anvin" <hpa@zytor.com>, Juergen Gross <jgross@suse.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH 0/4] x86/xen/efi: Initialize UEFI secure boot state during dom0 boot
Date: Fri, 12 Jan 2018 12:24:50 +0100 [thread overview]
Message-ID: <20180112112450.GD21705@olila.local.net-space.pl> (raw)
In-Reply-To: <CAKv+Gu-_SHXCkfX5d3R08nW6rc4giR1d4VhDjF8J5miaTfSDow@mail.gmail.com>
Hi Ard,
On Thu, Jan 11, 2018 at 12:51:07PM +0000, Ard Biesheuvel wrote:
> On 9 January 2018 at 14:22, Daniel Kiper <daniel.kiper@oracle.com> wrote:
> > Hi,
> >
> > Initialize UEFI secure boot state during dom0 boot. Otherwise the kernel
> > may not even know that it runs on secure boot enabled platform.
>
> Hi Daniel,
>
> I must say, I am not too thrilled with the approach you have chosen
> here. #including .c files in other .c files, and using #defines to
> override C functions or other stub functionality is rather fragile. In
TBH I do not like it too. Sadly I have not find a better solution for
that. I wish to avoid code duplication as much as possible because
otherwise it will fall out of sync sooner or later (usually sooner).
Similar thing happened in different part of Xen EFI code a few months ago.
> particular, it means we have to start caring about not breaking
> Xen/x86 code when making modifications to the EFI stub, and that code
> is already difficult enough to maintain, given that it is shared
> between ARM, arm64 and x86, and runs either from the decompressor or
> the kernel proper (arm64) but in the context of the UEFI firmware.
I understand that.
> None of the stub code currently runs in ordinary kernel context.
Yep.
> So please, could you try to find another way to do this?
I am happy to improve the situation, however, I am afraid that it is
difficult here. Stub and kernel proper are separate entities and simple
linking does not work. So, It seems to me that only play with includes
will allow us to not duplicate the code. However, if you have a better
idea I am happy to implement it.
Daniel
next prev parent reply other threads:[~2018-01-12 11:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-09 14:22 Daniel Kiper
2018-01-09 14:22 ` [PATCH 1/4] efi/stub: Extract efi_get_secureboot() to separate file Daniel Kiper
2018-01-09 14:22 ` [PATCH 2/4] x86/xen/efi: Initialize boot_params.secure_boot in xen_efi_init() Daniel Kiper
2018-01-09 14:22 ` [PATCH 3/4] efi: Tweak efi_get_secureboot() and its data section assignment Daniel Kiper
2018-01-09 14:22 ` [PATCH 4/4] efi: Rename efi_get_secureboot() to __efi_get_secureboot() and make it static Daniel Kiper
2018-01-11 12:51 ` [PATCH 0/4] x86/xen/efi: Initialize UEFI secure boot state during dom0 boot Ard Biesheuvel
2018-01-12 11:24 ` Daniel Kiper [this message]
2018-01-23 19:23 ` Ard Biesheuvel
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=20180112112450.GD21705@olila.local.net-space.pl \
--to=daniel.kiper@oracle.com \
--cc=ard.biesheuvel@linaro.org \
--cc=boris.ostrovsky@oracle.com \
--cc=hpa@zytor.com \
--cc=jgross@suse.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/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
all inboxes | Powered by JetHome®