mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Arvind Sankar <nivedita@alum.mit.edu>, linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>, x86@kernel.org
Subject: Re: kexec breaks with 5.4 due to memzero_explicit
Date: Mon, 7 Oct 2019 11:10:18 +0200	[thread overview]
Message-ID: <0f083019-61e8-7ed5-dde7-99e1aa363d9c@redhat.com> (raw)
In-Reply-To: <28f3d204-47a2-8b4f-f6a7-11d73c2d87c8@redhat.com>

Hi,

On 07-10-2019 10:50, Hans de Goede wrote:
> Hi,
> 
> On 07-10-2019 05:09, Arvind Sankar wrote:
>> Hi, arch/x86/purgatory/purgatory.ro has an undefined symbol
>> memzero_explicit. This has come from commit 906a4bb97f5d ("crypto:
>> sha256 - Use get/put_unaligned_be32 to get input, memzero_explicit")
>> according to git bisect.
> 
> Hmm, it (obviously) does build for me and using kexec still also works
> for me.
> 
> But it seems that you are right and that this should not build, weird.

Ok, I understand now, it seems that the kernel will happily build with
undefined symbols in the purgatory and my kexec testing did not hit
the sha256 check path (*) so it did not crash. I can reproduce this before my patch:

[hans@shalem linux]$ ld arch/x86/purgatory/purgatory.ro
ld: warning: cannot find entry symbol _start; defaulting to 0000000000401000
ld: arch/x86/purgatory/purgatory.ro: in function `sha256_transform':
sha256.c:(.text+0x1c0c): undefined reference to `memzero_explicit'

And I can confirm that it is gone after my patch:

[hans@shalem linux]$ ld arch/x86/purgatory/purgatory.ro
ld: warning: cannot find entry symbol _start; defaulting to 0000000000401000

Regards,

Hans


*) I tried with a Fedora signed kernel, dunno how to trigger this if that does not
trigger it


  reply	other threads:[~2019-10-07  9:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-07  3:09 Arvind Sankar
2019-10-07  8:50 ` Hans de Goede
2019-10-07  9:10   ` Hans de Goede [this message]
2019-10-07 13:09     ` Ingo Molnar
2019-10-07 13:40       ` Hans de Goede
2019-10-07 13:55         ` Ingo Molnar
2019-10-07 13:53       ` Ingo Molnar
2019-10-07 14:07       ` Hans de Goede
2019-10-07 13:20     ` Arvind Sankar
2019-10-07 16:56       ` Hans de Goede

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=0f083019-61e8-7ed5-dde7-99e1aa363d9c@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=nivedita@alum.mit.edu \
    --cc=x86@kernel.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®