lkml.org 
[lkml]   [2023]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/3] riscv/purgatory: do not link with string.o and its dependencies
On Wed, Jul 26, 2023 at 11:54:00AM +0200, Petr Tesarik wrote:
> From: Petr Tesarik <petr.tesarik.ext@huawei.com>
>
> Linking with this object file makes kexec_file_load(2) fail because of
> multiple unknown relocation types:
>
> - R_RISCV_ADD16, R_RISCV_SUB16: used by alternatives in strcmp()
> - R_RISCV_GOT_HI20: used to resolve _ctype in strcasecmp()
>
> All this hassle is needed for one single call to memcmp() from
> verify_sha256_digest() to compare 32 bytes of SHA256 checksum.
>
> Simply replace this memcmp() call with an explicit loop over those 32 bytes
> and remove the need to link with string.o and all the other object files
> that provide undefined symbols from that object file.
>
> Fixes: 838b3e28488f ("RISC-V: Load purgatory in kexec_file")
> Signed-off-by: Petr Tesarik <petr.tesarik.ext@huawei.com>

This version keeps the automation happy,
Acked-by: Conor Dooley <conor.dooley@microchip.com>

Thanks,
Conor.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2023-07-26 18:34    [W:0.068 / U:0.724 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site