linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Philipp Rudo <prudo@linux.ibm.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	Arvind Sankar <nivedita@alum.mit.edu>,
	Nathan Chancellor <natechancellor@gmail.com>,
	linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org,
	Ingo Molnar <mingo@redhat.com>
Subject: Re: [RFC v2 0/1] s390/purgatory: Make sure we fail the build if purgatory has missing symbols
Date: Wed, 9 Oct 2019 11:39:17 +0200	[thread overview]
Message-ID: <20191009113917.47ef6eda@laptop-ibm> (raw)
In-Reply-To: <20191008085421.11011-1-hdegoede@redhat.com>

Hi Hans,

also adding Ingo on Cc.

I tested you patch on s390 and it does what it's supposed to do. The build now
fails with 

  LD      arch/s390/purgatory/purgatory.chk
arch/s390/purgatory/purgatory: In function `sha256_update':
(.text+0x3bc2): undefined reference to `memzero_explicit'
/home/prudo/git/linux/linux/arch/s390/purgatory/Makefile:38: recipe for target 'arch/s390/purgatory/purgatory.chk' failed
make[3]: *** [arch/s390/purgatory/purgatory.chk] Error 1

After applying Arvid's memzero_explizit fix ("[PATCH] lib/string: make
memzero_explicit inline instead of external") as well the build works again.

My only problem is how to uptream your patch. Just adding it to our branch
would cause a (intentional) build breakage until Ingo's branch is merged.

@Vasliy & Ingo: Can you please find a solution for this.

Thanks
Philipp

On Tue,  8 Oct 2019 10:54:20 +0200[PATCH] lib/string: make memzero_explicit
inline instead of external Hans de Goede <hdegoede@redhat.com> wrote:

> Hi s390 maintainers,
> 
> Here is a second RFC version of my patch for $subject, mirroring the
> changes in v2 of the x86 patch.
> 
> As last time this patch is completely UNTESTED.
> 
> Changes in v2:
> - Using 2 if_changed lines under a single rule does not work, then
>   1 of the 2 will always execute each build.
>   Instead add a new (unused) purgatory.chk intermediate which gets
>   linked from purgatory.ro without -r to do the missing symbols check
> - This also fixes the check generating an a.out file (oops)
> 
> Relevant part of the cover letter from v1:
> 
> In 5.4-rc1 the 2 different sha256 implementations for the purgatory resp.
> for crypto/sha256_generic.c have been consolidated into 1 single shared
> implementation under lib/crypto/sha256.c .
> 
> At least on x86 this was causing silent corruption of the purgatory due
> to a missing memzero_explicit symbol in the purgatory string.c/.o file.
> 
> With the x86 equivalent of this patch applied a x86 build of 5.4-rc1 now
> correctly fails:
> 
>   CHK     arch/x86/purgatory/purgatory.ro
> ld: arch/x86/purgatory/purgatory.ro: in function `sha256_transform':
> sha256.c:(.text+0x1c0c): undefined reference to `memzero_explicit'
> make[2]: *** [arch/x86/purgatory/Makefile:72:
>     arch/x86/purgatory/kexec-purgatory.c] Error 1
> make[1]: *** [scripts/Makefile.build:509: arch/x86/purgatory] Error 2
> make: *** [Makefile:1650: arch/x86] Error 2
> 
> It would be great if the s390 maintainers can test this equivalent patch
> on s390.
> 
> As for fixing the missing memzero_explicit symbol, we are currently
> discussing making memzero_explicit a static inline wrapper of memset
> in string.h, so that we do not need to implement it in multiple places.
> 
> This discussion is Cc-ed to the generic linux-kernel@vger.kernel.org list,
> it is happening in the
> "[PATCH v2 5.4 regression fix] x86/boot: Provide memzero_explicit" thread.
> 
> Regards,
> 
> Hans
> 
> 
> 


  parent reply	other threads:[~2019-10-09  9:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-08  8:54 [RFC v2 0/1] s390/purgatory: Make sure we fail the build if purgatory has missing symbols Hans de Goede
2019-10-08  8:54 ` [RFC v2] " Hans de Goede
2019-10-09  9:39 ` Philipp Rudo [this message]
2019-10-09 14:50   ` [RFC v2 0/1] " Christian Borntraeger

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=20191009113917.47ef6eda@laptop-ibm \
    --to=prudo@linux.ibm.com \
    --cc=borntraeger@de.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hdegoede@redhat.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=natechancellor@gmail.com \
    --cc=nivedita@alum.mit.edu \
    /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;
as well as URLs for NNTP newsgroup(s).