public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC v2 0/1] s390/purgatory: Make sure we fail the build if purgatory has missing symbols
@ 2019-10-08  8:54 Hans de Goede
  2019-10-08  8:54 ` [RFC v2] " Hans de Goede
  2019-10-09  9:39 ` [RFC v2 0/1] " Philipp Rudo
  0 siblings, 2 replies; 4+ messages in thread
From: Hans de Goede @ 2019-10-08  8:54 UTC (permalink / raw)
  To: Heiko Carstens, Vasily Gorbik, Christian Borntraeger
  Cc: Hans de Goede, Arvind Sankar, Nathan Chancellor, linux-s390,
	linux-kernel

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-09 14:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [RFC v2 0/1] " Philipp Rudo
2019-10-09 14:50   ` Christian Borntraeger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox