freebsd-nq/stand
Kyle Evans 1ee7e4ba70 loader: fix elf lookup_symbol type filtering
The existing logic doesn't seem to make much sense, as we won't filter
on the type if st_shndx != SHN_UNDEF.  In practice, this breaks booting
12.3 kernels on newer loaders, as they do have a `kernphys` symbol of
the wrong type (NOTYPE, rather than OBJECT) -- we end up deriving the
wrong value for copy_staging.

It's unclear if this version makes any more sense, but it seems to match
what rtld's matched_symbol() does.  Loader doesn't need to care about
STT_FUNC w/ UND shndx, because we won't encounter those; in kmods,
undefined (kernel) functions are NOTYPE.

Approved by:	so
Security:	FreeBSD-EN-22:27.loader
Reported by:	Christian McDonald <cmcdonald netgate com>
Reviewed by:	imp, kib, tsoome

(cherry picked from commit 0701dbda94)
(cherry picked from commit 2b31059ea7)
2022-11-01 14:03:25 -04:00
..
arm Remove tests for obsolete compilers in the build system 2020-05-12 15:22:40 +00:00
arm64 Add an loader command on arm64 to sync the cache 2022-01-04 10:08:32 +00:00
common loader: fix elf lookup_symbol type filtering 2022-11-01 14:03:25 -04:00
defaults Add support for getting early entropy from UEFI 2022-03-14 14:26:33 -07:00
efi Add support for getting early entropy from UEFI 2022-03-14 14:26:33 -07:00
fdt loader: Fix dtb loading 2022-01-14 14:44:36 +01:00
ficl ficl: Fix a typo in a comment 2021-12-03 16:53:00 +01:00
ficl32 Enable veriexec for loader 2019-02-26 06:22:10 +00:00
fonts loader: really use bold font for vga text mode 2021-01-08 01:24:30 +02:00
forth loader.4th(8): Fix a typo in the manual page 2022-04-15 15:25:48 +02:00
i386 loader: implement mount/unmount rootfs 2022-01-13 08:58:21 +01:00
images loader: implement framebuffer console 2021-01-02 21:41:36 +02:00
kshim Fix build of stand/usb . 2021-05-10 16:11:19 +02:00
liblua contrib/lua: update to 5.4.2 2021-01-13 23:56:18 -06:00
liblua32
libofw loader: implement mount/unmount rootfs 2022-01-13 08:58:21 +01:00
libsa stand: zfs: handle holes at the tail end correctly 2022-04-24 18:15:07 -05:00
libsa32 Enable veriexec for loader 2019-02-26 06:22:10 +00:00
lua Add support for getting early entropy from UEFI 2022-03-14 14:26:33 -07:00
man loader: Set twiddle globaldiv to 16 by default 2021-12-29 14:53:19 -08:00
mips Disable PIE for MIPS ubldr 2022-01-23 11:09:53 +01:00
powerpc powerpc64: fix loader regression 2022-03-04 19:18:22 -03:00
uboot loader: implement mount/unmount rootfs 2022-01-13 08:58:21 +01:00
usb Fix build of stand/usb . 2020-01-23 10:40:34 +00:00
userboot loader: implement mount/unmount rootfs 2022-01-13 08:58:21 +01:00
defs.mk powerpc64le: stand fixes 2021-11-05 11:29:40 -03:00
fdt.mk
ficl.mk loader: implement framebuffer console 2021-01-02 21:41:36 +02:00
loader.mk MFC loader+userland TSLOG support 2021-12-29 14:53:18 -08:00
lua.mk
Makefile stand: ensure that the efi directory's dependencies are correct 2021-01-29 23:46:17 -06:00
Makefile.amd64 stand: properly declare subdir deps or .WAIT, do parallel build 2020-12-31 11:15:45 -06:00
Makefile.inc stand: properly declare subdir deps or .WAIT, do parallel build 2020-12-31 11:15:45 -06:00
uboot.mk