]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
loader: Relax the check in is_kernphys_relocatable()
authorMark Johnston <markj@FreeBSD.org>
Wed, 15 Jun 2022 14:47:13 +0000 (10:47 -0400)
committerMark Johnston <markj@FreeBSD.org>
Fri, 15 Jul 2022 16:33:03 +0000 (12:33 -0400)
commitd9da2f90cbec9b3c4777bd12671e2f837907ff5a
tree6ea58162a87a578551f5fef84154a9fb2c5da08a
parent7f753c0c33772dd695a39576356e3a407c4d9ad3
loader: Relax the check in is_kernphys_relocatable()

The check fails in kernels compiled with KASAN because AddressSanitizer
inserts redzones around global variables, so the size of the "kernphys"
symbol is 32 rather than 8.  Thus we fall back to copying even though
it's not necessary.

Simply remove the size check.  I didn't want to extend the symbol size
check since there's no guarantee that AddressSanitizer will always emit
32 bytes for "kernphys".

Reviewed by: kib
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 9a964ad56182740ea09b87f7e6db4197c6756e48)
stand/common/load_elf.c