[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180816124632.GA24061@redhat.com>
Date: Thu, 16 Aug 2018 08:46:32 -0400
From: Vivek Goyal <vgoyal@...hat.com>
To: Dave Young <dyoung@...hat.com>
Cc: Yannik Sembritzki <yannik@...britzki.me>,
Linus Torvalds <torvalds@...ux-foundation.org>,
David Howells <dhowells@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Peter Anvin <hpa@...or.com>,
the arch/x86 maintainers <x86@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Baoquan He <bhe@...hat.com>,
Justin Forbes <jforbes@...hat.com>,
Peter Jones <pjones@...hat.com>,
James Bottomley <James.Bottomley@...senpartnership.com>,
Matthew Garrett <mjg59@...gle.com>
Subject: Re: [PATCH 2/2] [FIXED v2] Replace magic for trusting the secondary
keyring with #define
On Thu, Aug 16, 2018 at 09:11:06AM +0800, Dave Young wrote:
> On 08/16/18 at 12:07am, Yannik Sembritzki wrote:
> > Signed-off-by: Yannik Sembritzki <yannik@...britzki.me>
> > ---
> > arch/x86/kernel/kexec-bzimage64.c | 2 +-
> > certs/system_keyring.c | 3 ++-
> > crypto/asymmetric_keys/pkcs7_key_type.c | 2 +-
> > include/linux/verification.h | 3 +++
> > 4 files changed, 7 insertions(+), 3 deletions(-)
> >
> > diff --git a/arch/x86/kernel/kexec-bzimage64.c
> > b/arch/x86/kernel/kexec-bzimage64.c
> > index 74628275..97d199a3 100644
> > --- a/arch/x86/kernel/kexec-bzimage64.c
> > +++ b/arch/x86/kernel/kexec-bzimage64.c
> > @@ -532,7 +532,7 @@ static int bzImage64_cleanup(void *loader_data)
> > static int bzImage64_verify_sig(const char *kernel, unsigned long
> > kernel_len)
> > {
> > return verify_pefile_signature(kernel, kernel_len,
> > - ((struct key *)1UL),
> > + TRUST_SECONDARY_KEYRING,
>
> Instead of fix your 1st patch in 2nd patch, I would suggest to
> switch the patch order. In 1st patch change the common code to use
> the new macro and in 2nd patch you can directly fix the kexec code
> with TRUST_SECONDARY_KEYRING.
I agree. It looks cleaner that first patch change the common code and
introduce the macro to replace 1UL. And second patch makes use of that
macro in kexec bzImage64 verification.
Thanks
Vivek
Powered by blists - more mailing lists