#
68344c9c |
| 19-May-2024 |
Warner Losh <imp@FreeBSD.org> |
loader: separate lang init from scripting init
Create interp_preinit() to initialize the scripting language to run scripts. Make sure you can call it multiple times, but only the first one has effec
loader: separate lang init from scripting init
Create interp_preinit() to initialize the scripting language to run scripts. Make sure you can call it multiple times, but only the first one has effect, After it's call, you can run scripts in the scripting language. At the moment, no functional change.
Sponsored by: Netflix
show more ...
|
Revision tags: release/13.3.0 |
|
#
6faf55c8 |
| 24-Feb-2024 |
Warner Losh <imp@FreeBSD.org> |
loader: rename gfx_interp_md to gfx_interp_ref
We have the call to gfx_interp_ref to bring in the .o so that we get the linker set item to add the language bindings at the right time. Where we call
loader: rename gfx_interp_md to gfx_interp_ref
We have the call to gfx_interp_ref to bring in the .o so that we get the linker set item to add the language bindings at the right time. Where we call it is not the right time... So the _ref name is better. Change it before we have too many others like it.
Sponsored by: Netflix
show more ...
|
#
3e15b01d |
| 22-Feb-2024 |
Warner Losh <imp@FreeBSD.org> |
libsa: Remove redundant sys/cdefs.h
Sponsored by: Netflix
|
#
60e199d9 |
| 16-Feb-2024 |
Warner Losh <imp@FreeBSD.org> |
loader: Add prototype for gfx_interp_md
This function will be used to draw in the graphics bindings when the loader is compiled with graphics (gfx) support. Provide definitions for lua and the simpl
loader: Add prototype for gfx_interp_md
This function will be used to draw in the graphics bindings when the loader is compiled with graphics (gfx) support. Provide definitions for lua and the simple interpreter. 4th support is forthcoming.
Sponsored by: Netflix Reviewed by: kevans, jhb Differential Revision: https://reviews.freebsd.org/D43903
show more ...
|
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/
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0, release/13.0.0, 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
|
#
ea13a931 |
| 01-Jun-2019 |
Rebecca Cran <bcran@FreeBSD.org> |
Fix comment parsing in interp_simple.c
loader.rc has comment lines without a trailing space, which get interpreted as commands. Avoid this by only matching against the backslash character.
Reviewed
Fix comment parsing in interp_simple.c
loader.rc has comment lines without a trailing space, which get interpreted as commands. Avoid this by only matching against the backslash character.
Reviewed by: imp, tsoome Differential Revision: https://reviews.freebsd.org/D20491
show more ...
|
#
2aaf9152 |
| 18-Mar-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead@r345275
|
#
b18a4cca |
| 05-Mar-2019 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead@r344786
|
#
844fc3e9 |
| 04-Mar-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r344549 through r344775.
|
#
8df8b2d3 |
| 26-Feb-2019 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Enable veriexec for loader
This relies on libbearssl and libsecureboot to verify files read by loader in a maner equivalent to how mac_veriexec
Note: disabled by default. Use is initially expected
Enable veriexec for loader
This relies on libbearssl and libsecureboot to verify files read by loader in a maner equivalent to how mac_veriexec
Note: disabled by default. Use is initially expected to be by embeded vendors
Reviewed by: emaste, imp Sponsored by: Juniper Networks Differential Revision: D16336
show more ...
|
Revision tags: release/12.0.0 |
|
#
3af64f03 |
| 11-Sep-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r338392 through r338594.
|
#
d3d381b2 |
| 01-Sep-2018 |
Kyle Evans <kevans@FreeBSD.org> |
userboot: handle guest interpreter mismatches more intelligently
The switch to lualoader creates a problem with userboot: the host is inclined to build userboot with Lua, but the host userboot's int
userboot: handle guest interpreter mismatches more intelligently
The switch to lualoader creates a problem with userboot: the host is inclined to build userboot with Lua, but the host userboot's interpreter must match what's available on the guest. For almost all FreeBSD guests in the wild, Lua is not yet available and a Lua-based userboot will fail.
This revision updates userboot protocol to version 5, which adds a swap_interpreter callback to request a different interpreter, and tries to determine the proper interpreter to be used based on how the guest /boot/loader is compiled. This is still a bit of a guess, but it's likely the best possible guess we can make in order to get it right. The interpreter is now embedded in the resulting executable, so we can open /boot/loader on the guest and hunt that down to derive the interpreter it was built with.
Using -l with bhyveload will not allow an intepreter swap, even if the loader specified happens to be a userboot with the wrong interpreter. We'll simply complain about the mismatch and bail out.
For legacy guests without the interpreter marker, we assume they're 4th. For new guests with the interpreter marker, we'll read it and swap over to the proper interpreter if it doesn't match what the userboot we're using was compiled with.
Both flavors of userboot are installed by default, userboot_4th.so and userboot_lua.so. This fixes the build WITHOUT_FORTH as a coincidence, which was broken by userboot being forced to 4th.
Reviewed by: imp, jhb, araujo (earlier version) Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D16945
show more ...
|
Revision tags: release/11.2.0 |
|
#
86411ec1 |
| 09-Feb-2018 |
Warner Losh <imp@FreeBSD.org> |
Set script.lang in the environment to either 'forth' or 'simple' to reflect what scripting language was compiled into the loader. I anticipate that being able to find this out quickly from the OK pro
Set script.lang in the environment to either 'forth' or 'simple' to reflect what scripting language was compiled into the loader. I anticipate that being able to find this out quickly from the OK prompt will be useful in troubleshooting in the future.
show more ...
|
#
3a4a3639 |
| 08-Feb-2018 |
Warner Losh <imp@FreeBSD.org> |
Move simple interpreter 'perform' into interp.c and call it interp_builtin_cmd().
|
#
44eebfff |
| 08-Feb-2018 |
Warner Losh <imp@FreeBSD.org> |
Fix indentation to FreeBSD standard for interp files
|
#
79a6a17a |
| 31-Jan-2018 |
Warner Losh <imp@FreeBSD.org> |
Break out the interpreters (simple and forth) w/o ifdefs. This is akin to what Pedro Souza and Wojciech Koszek did in the lua GSoC with interp.h, interp_simple.c and changes to interp.c and interp_f
Break out the interpreters (simple and forth) w/o ifdefs. This is akin to what Pedro Souza and Wojciech Koszek did in the lua GSoC with interp.h, interp_simple.c and changes to interp.c and interp_forth.c, but completely redone from scratch.
This effectively restores the spirit of r326712 (my first attempt to bring in Pedro's and Wojciech's work) updated for new requirements that had silently broke their original work. This change also differs by using fixed function names instead of function pointers to simply things. Only one interpreter at a time may be compiled in.
Also of note: we take a mutable string, pass it in via a const char * pointer into intrp_forth's interp_run(). We then cast away the const to pass into ficlExec since ficl would require extensive changes to properly const-poison. See Sections 6.5.2.5 and 6.7.3 of C11 standard noting it's only UB if you modify a const object through a non-const pointer, but not char [] -> const char * -> char * as here.
show more ...
|
#
fb5af39a |
| 08-Dec-2017 |
Warner Losh <imp@FreeBSD.org> |
Create interp class.
Create an interp class. Use it to separate out the different types of interpreters: forth and simple with function pointers rather than via #ifdefs.
Obtained from: lua boot loa
Create interp class.
Create an interp class. Use it to separate out the different types of interpreters: forth and simple with function pointers rather than via #ifdefs.
Obtained from: lua boot loader project (via https://bsdimp@github.com/bsdimp/freebsd.git lua-bootloader) Sponsored by: Netflix
show more ...
|