Date: Wed, 24 Feb 2021 18:39:00 GMT From: Toomas Soome <tsoome@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 6daafec20838 - releng/13.0 - Fix loader detection of vbefb support on !amd64 Message-ID: <202102241839.11OId0Ze091178@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch releng/13.0 has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=6daafec2083848e2da210bd2183e6fb598944bd2 commit 6daafec2083848e2da210bd2183e6fb598944bd2 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2021-01-27 21:28:43 +0000 Commit: Toomas Soome <tsoome@FreeBSD.org> CommitDate: 2021-02-23 07:41:55 +0000 Fix loader detection of vbefb support on !amd64 On i386, after 6c7a932d0b8baaaee16eca0ba061bfa6e0e57bfd, the vbefb vt driver was no longer detected by the loader, if any kernel module was loaded after the kernel itself. This was caused by the parse_vt_drv_set() function being called multiple times, resetting the detection flag. (It was called multiple times, becuase i386 .ko files are shared objects like the kernel proper, while this is not the case on amd64.) Fix this by skipping the set_vt_drv_set lookup if vbefb was already detected. (cherry picked from commit 6e26189be406a9a3799074b16925e6cd63cc703b) Reviewed by: tsoome Approved by: re (gjb) --- stand/common/load_elf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stand/common/load_elf.c b/stand/common/load_elf.c index 62fdb560ecff..8bb780ef34df 100644 --- a/stand/common/load_elf.c +++ b/stand/common/load_elf.c @@ -875,8 +875,8 @@ nosyms: ef->buckets = ef->hashtab + 2; ef->chains = ef->buckets + ef->nbuckets; - gfx_state.tg_kernel_supported = false; - if (__elfN(lookup_symbol)(ef, "__start_set_vt_drv_set", &sym, + if (!gfx_state.tg_kernel_supported && + __elfN(lookup_symbol)(ef, "__start_set_vt_drv_set", &sym, STT_NOTYPE) == 0) { p_start = sym.st_value + ef->off; if (__elfN(lookup_symbol)(ef, "__stop_set_vt_drv_set", &sym,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202102241839.11OId0Ze091178>