Revision tags: release/14.2.0, release/13.4.0 |
|
#
c75ba319 |
| 31-Aug-2024 |
Ahmad Khalifa <ahmadkhalifa570@gmail.com> |
stand: file_loadraw: make 'type' a const char *
Reviewed by: imp, kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1394
|
#
3da56871 |
| 25-Jun-2024 |
Kyle Evans <kevans@FreeBSD.org> |
stand: module: unlink the entire tail when dependencies fail to load
Assume you have loader configured to load linux64, which has a dependency on both linux_common and mqueuefs but neither the kerne
stand: module: unlink the entire tail when dependencies fail to load
Assume you have loader configured to load linux64, which has a dependency on both linux_common and mqueuefs but neither the kernel nor kernel config in question have the mqueuefs module included.
When the load command for linux64 fails to find mqueuefs, it will free both linux64 and linux_common as they were loaded first, but only linux64 gets removed from the module list. As a result, future traversals hit an easy use-after-free with linux_common.
Fix it so that we unlink the entire tail of the list. Anything after the initially loaded module is, by definition, a dependency on the loaded module while we're still in the load command, so we can just discard the entire tail. If linux_common were loaded before linux64, it should not move to a position during this load where it would suddenly be missing from the view presented to the kernel.
Reported by: philip Reviewed by: imp, philip, tsoome MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45731
show more ...
|
Revision tags: release/14.1.0, release/13.3.0 |
|
#
3e15b01d |
| 22-Feb-2024 |
Warner Losh <imp@FreeBSD.org> |
libsa: Remove redundant sys/cdefs.h
Sponsored by: Netflix
|
#
18968b82 |
| 02-Feb-2024 |
Warner Losh <imp@FreeBSD.org> |
loader: Move build_font_module to gfx_fb.c
The font module is part and parsel of the gfx_fb support. Move it to gfx_fb.c where it can access the data it needs.
Sponsored by: Netflix
|
Revision tags: release/14.0.0 |
|
#
1d386b48 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
#
cb817907 |
| 01-May-2023 |
Warner Losh <imp@FreeBSD.org> |
stand: Fix warning about variable unused
dflag is unused when LOADER_VERIEXEC isn't defined, so move it under the ifdef.
Sponsored by: Netflix
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0 |
|
#
01b0c359 |
| 14-Feb-2022 |
Simon J. Gerraty <sjg@FreeBSD.org> |
module_verbose should also affect non-ELF modules.
|
#
01cad731 |
| 30-Dec-2021 |
Emmanuel Vadot <manu@FreeBSD.org> |
loader: tslog: Add more log for module loading
This helps mesuring what's happening when we load the kernel/modules/mfsroot.
This also adds TSENTER2 which uses the third argument of TSRAW, same as
loader: tslog: Add more log for module loading
This helps mesuring what's happening when we load the kernel/modules/mfsroot.
This also adds TSENTER2 which uses the third argument of TSRAW, same as in the kernel.
MFC after: 2 weeks Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D33699
show more ...
|
#
f0377313 |
| 16-Dec-2021 |
Warner Losh <imp@FreeBSD.org> |
stand/module: skip is only used by veriexec
Sponsored by: Netflix
|
#
aaaa5a2e |
| 14-Dec-2021 |
Warner Losh <imp@FreeBSD.org> |
loader: narrow the scope of gfx frame buffer wrt tg supported kernels
Store whether or not we found a vbefb module (eg, a tg supported kernel) in the preloaded_file structure. This automatically res
loader: narrow the scope of gfx frame buffer wrt tg supported kernels
Store whether or not we found a vbefb module (eg, a tg supported kernel) in the preloaded_file structure. This automatically resets on reload and eliminates load_elf knowing about any gfx_* interface. Restrict this to i386, which is the only place it's used. Update libi386 to check in the preloaded_file struct. Eliminate this from the teken_gfx structure. Rewrite the parsing code to be more inline. Check this from the same place we check for a relocatable amd64 kernel.
Sponsored by: Netflix Reviewed by: manu, tsoome Differential Revision: https://reviews.freebsd.org/D33427
show more ...
|
#
5c68a216 |
| 13-Dec-2021 |
Warner Losh <imp@FreeBSD.org> |
loader:prefix is only used for LOADER_VERIEXEC
Only define and set prefix when LOADER_VERIEXEC is defined. It's only used by the LOADER_VERIEXEC code.
Sponsored by: Netflix
|
Revision tags: release/12.3.0 |
|
#
4c0c353d |
| 14-Nov-2021 |
Emmanuel Vadot <manu@FreeBSD.org> |
loader: Add more bus name to pnpautoload
Add ofwbus, iicbus and spibus to pnpautoload so modules under those buses will be loaded. On my rockpro64 now : OK pnpautoload -v Autoloading modules for sim
loader: Add more bus name to pnpautoload
Add ofwbus, iicbus and spibus to pnpautoload so modules under those buses will be loaded. On my rockpro64 now : OK pnpautoload -v Autoloading modules for simplebus Using DTB provided by EFI at 0x8100000. Autoloading modules for ofwbus /boot/kernel/rk_spi.ko text=0x14b2 text=0xd4c data=0x4d0+0x8 syms=[0x8+0xa98+0x8+0x807] /boot/kernel/dwwdt.ko text=0x12e2 text=0x78c data=0x4c8+0x10 syms=[0x8+0x990+0x8+0x6e1] Autoloading modules for iicbus Autoloading modules for spibus /boot/kernel/mx25l.ko text=0x1613 text=0x114c data=0x6e8+0x8 syms=[0x8+0xa08+0x8+0x665] loading required module 'fdt_slicer' /boot/kernel/fdt_slicer.ko text=0x95e text=0x340 data=0x290 syms=[0x8+0x6c0+0x8+0x4a0]
show more ...
|
#
d4874307 |
| 14-Nov-2021 |
Emmanuel Vadot <manu@FreeBSD.org> |
loader: Fix pnpload and add some usage
pnpload needs a busname and a compat data.
|
#
544af629 |
| 14-Nov-2021 |
Emmanuel Vadot <manu@FreeBSD.org> |
loader: Fix pnpmatch and add some usage
pnpmatch needs a busname and a compat data.
|
#
60a978be |
| 30-May-2021 |
Colin Percival <cperciva@FreeBSD.org> |
stand/common: Add file_addbuf()
This provides an interface for a memory buffer to be passed from the loader to the kernel as a "preloaded module".
Reviewed by: kevans
|
Revision tags: release/13.0.0 |
|
#
9b388ac3 |
| 28-Jan-2021 |
Toomas Soome <tsoome@FreeBSD.org> |
loader: unload command should reset tg_kernel_supported in gfx_state
While loading kernel, we check if vt/vbe backend support is included in kernel and set the tg_kernel_supported flag in gfx_state.
loader: unload command should reset tg_kernel_supported in gfx_state
While loading kernel, we check if vt/vbe backend support is included in kernel and set the tg_kernel_supported flag in gfx_state. unload command needs to reset this flag to allow next load to perform this check with new kernel.
Reported by: jhb
show more ...
|
#
3630506b |
| 21-Dec-2020 |
Toomas Soome <tsoome@FreeBSD.org> |
loader: implement framebuffer console
Draw console on efi. Add vbe framebuffer for BIOS loader (vbe off, vbe on, vbe list, vbe set xxx). autoload font (/boot/fonts) based on resolution and font size
loader: implement framebuffer console
Draw console on efi. Add vbe framebuffer for BIOS loader (vbe off, vbe on, vbe list, vbe set xxx). autoload font (/boot/fonts) based on resolution and font size. Add command loadfont (set font by file) and variable screen.font (set font by size). Pass loaded font to kernel.
Export variables: screen.height screen.width screen.depth
Add gfx primitives to draw the screen and put png image on the screen. Rework menu draw to iterate list of consoles to enamble device specific output.
Probably something else I forgot...
Relnotes: yes Differential Revision: https://reviews.freebsd.org/D27420
show more ...
|
Revision tags: release/12.2.0, release/11.4.0 |
|
#
16b90565 |
| 10-Mar-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r358731 through r358831.
|
#
afc571b1 |
| 08-Mar-2020 |
Simon J. Gerraty <sjg@FreeBSD.org> |
veloader use vectx API for kernel and modules
The vectx API, computes the hash for verifying a file as it is read. This avoids the overhead of reading files twice - once to verify, then again to loa
veloader use vectx API for kernel and modules
The vectx API, computes the hash for verifying a file as it is read. This avoids the overhead of reading files twice - once to verify, then again to load.
For doing an install via loader, avoiding the need to rewind large files is critical.
This API is only used for modules, kernel and mdimage as these are the biggest files read by the loader. The reduction in boot time depends on how expensive the I/O is on any given platform. On a fast VM we see 6% improvement.
For install via loader the first file to be verified is likely to be the kernel, so some of the prep work (finding manifest etc) done by verify_file() needs to be factored so it can be reused for vectx_open().
For missing or unrecognized fingerprint entries, we fail in vectx_open() unless verifying is disabled.
Otherwise fingerprint check happens in vectx_close() and since this API is only used for files which must be verified (VE_MUST) we panic if we get an incorrect hash.
Reviewed by: imp,tsoome MFC after: 1 week Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org//D23827
show more ...
|
Revision tags: release/12.1.0, release/11.3.0 |
|
#
0269ae4c |
| 06-Jun-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @348740
Sponsored by: The FreeBSD Foundation
|
#
540a97e3 |
| 24-May-2019 |
Jung-uk Kim <jkim@FreeBSD.org> |
Initialize a variable to fix build with GCC.
|
#
fdb9b7af |
| 24-May-2019 |
Jung-uk Kim <jkim@FreeBSD.org> |
Remove yet another unused variable.
|
#
8a2ad0ae |
| 23-May-2019 |
Emmanuel Vadot <manu@FreeBSD.org> |
loader: Remove unused variable
Reported by: lwshu, ci@
|
#
32199fb3 |
| 23-May-2019 |
Emmanuel Vadot <manu@FreeBSD.org> |
loader: Add pnp functions for autoloading modules based on linker.hints
This adds some new commands to loader :
- pnpmatch This takes a pnpinfo string as argument and tries to find a kernel modu
loader: Add pnp functions for autoloading modules based on linker.hints
This adds some new commands to loader :
- pnpmatch This takes a pnpinfo string as argument and tries to find a kernel module associated with it. -v and -d option are available and are the same as in devmatch (v is verbose, d dumps the hints). - pnpload This takes a pnpinfo string as argument and tries to load a kernel module associated with it. - pnpautoload This will attempt to load every kernel module for each buses. Each buses are probed, the probe function will generate pnpinfo string and load kernel module associated with it if it exists.
Only simplebus for FDT system is implemented for now. Since we need the dtb and overlays to be applied before searching the tree fdt_devmatch_next will load and apply the dtb + overlays.
All the pnp parsing code comes from devmatch and is the same at 99%.
Reviewed by: imp, kevans Differential Revision: https://reviews.freebsd.org/D19498
show more ...
|
#
b17868a2 |
| 14-May-2019 |
Toomas Soome <tsoome@FreeBSD.org> |
loader: fix memory handling errors in module.c
file_loadraw(): check for file_alloc() and strdup() results. we leak 'name'.
mod_load() does leak 'filename'.
mod_loadkld() does not need to check fp
loader: fix memory handling errors in module.c
file_loadraw(): check for file_alloc() and strdup() results. we leak 'name'.
mod_load() does leak 'filename'.
mod_loadkld() does not need to check fp, file_discard() does check.
show more ...
|