#
58ec2d0d |
| 18-Sep-2024 |
Colin Percival <cperciva@FreeBSD.org> |
loader: Add TSLOG to interpreter built-ins
Wrap each call to a built-in command with TSENTER/TSEXIT to make it easier to see where time is going in the loader.
MFC after: 1 week Sponsored by: Amazo
loader: Add TSLOG to interpreter built-ins
Wrap each call to a built-in command with TSENTER/TSEXIT to make it easier to see where time is going in the loader.
MFC after: 1 week Sponsored by: Amazon Differential Revision: https://reviews.freebsd.org/D46630
show more ...
|
Revision tags: release/13.4.0, release/14.1.0 |
|
#
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 |
|
#
3e15b01d |
| 22-Feb-2024 |
Warner Losh <imp@FreeBSD.org> |
libsa: Remove redundant sys/cdefs.h
Sponsored by: Netflix
|
#
f616d61a |
| 12-Feb-2024 |
Simon J. Gerraty <sjg@FreeBSD.org> |
libsecureboot do not report expected unverified files
By default only report unverified files at severity VE_WANT and above. This inlcudes *.conf but not *.hints, *.cookie or *.tgz which get VE_TRY
libsecureboot do not report expected unverified files
By default only report unverified files at severity VE_WANT and above. This inlcudes *.conf but not *.hints, *.cookie or *.tgz which get VE_TRY as their severity.
If Verbose is set to 0, then VerifyFlags should default to 0 too. Thus the combination of
module_verbose=0 VE_VEBOSE=0
is sufficient to make the loader almost totally silent.
When verify_prep has to find_manifest and it is verified ok return VE_NOT_CHECKED to verify_file so that it can skip repeating verify_fd
Also add better debugging output for is_verified and add_verify_status.
vectx handle compressed modules
When verifying a compressed module (.ko.gz or .ko.bz2) stat() reports the size as -1 (unknown). vectx_lseek needs to spot this during closing - and just read until EOF is hit.
Note: because of the way libsa's open() works, verify_prep will see the path to be verified as module.ko not module.ko.bz2 etc. This is actually ok, because we need a separate module.ko.bz2 entry so that the package can be verified, and the hash for module.ko is of the uncompressed file which is what vectx will see.
Re-work local.trust.mk so site.trust.mk need only set VE_SIGN_URL_LIST (if using the mentioned signing server)
interp.c: restrict interactive input
Apply the same restrictions to interactive input as for unverified conf and hints files.
Use version.veriexec when LOADER_VERIEXEC is yes
Reviewed by: kevans Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D43810
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 |
|
#
a5948d40 |
| 01-Sep-2022 |
Warner Losh <imp@FreeBSD.org> |
stand: Add interp_has_builtin_cmd to see if we have a command
interp_has_builtin_cmd() will try to lookup the passed in command and returns true if it was found, false otherwise.
Sponsored by: Net
stand: Add interp_has_builtin_cmd to see if we have a command
interp_has_builtin_cmd() will try to lookup the passed in command and returns true if it was found, false otherwise.
Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D36364
show more ...
|
#
113dfadd |
| 01-Sep-2022 |
Warner Losh <imp@FreeBSD.org> |
stand: separate the command lookup from the command execution
Factor out interp_lookup_cmd to search for a command from interp_builtin_cmd. This simplifies the latter and can be used to expand lua t
stand: separate the command lookup from the command execution
Factor out interp_lookup_cmd to search for a command from interp_builtin_cmd. This simplifies the latter and can be used to expand lua to ask if a command exists.
Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D36363
show more ...
|
#
f4d71d0c |
| 26-Jul-2022 |
Warner Losh <imp@FreeBSD.org> |
stand: Fix set but unused warning
Make interp_identifier global to avoid a set but not used warning. For a global, llvm can't optimize it out (yet?)
Sponsored by: Netflix
|
Revision tags: release/13.1.0, release/12.3.0 |
|
#
313724ba |
| 31-May-2021 |
Colin Percival <cperciva@FreeBSD.org> |
loader: Use tslog to instrument some functions
In my initial testing, these are the functions which showed up as being worth instrumenting. More may be added later.
common/console.c: cons_probe co
loader: Use tslog to instrument some functions
In my initial testing, these are the functions which showed up as being worth instrumenting. More may be added later.
common/console.c: cons_probe common/gfx_fb.c: read_list, insert_font, autoload_font common/interp.c: interact common/interp_lua.c: interp_init, interp_run efi/libefi/efipart.c: efipart_readwrite i386/libi386/biosdisk.c: bd_init, bd_open, bd_edd_io, bd_chs_io, bd_io libsa/open.c: open libsa/read.c: read libsa/twiddle.c: twiddle
Note that profiling interp_run may be of questionable utility as it may depend on user behaviour (e.g. pressing keys).
Reviewed by: kevans (earlier version)
show more ...
|
Revision tags: release/13.0.0, release/12.2.0, release/11.4.0 |
|
#
2583c337 |
| 20-May-2020 |
Kyle Evans <kevans@FreeBSD.org> |
loader: fix userboot's ability to detect a guest's interpreter
Some time after r338418, I believe with -Os/-Oz -ffunction-sections -fdata-sections, the bootprog_interp variable that held our "$Inter
loader: fix userboot's ability to detect a guest's interpreter
Some time after r338418, I believe with -Os/-Oz -ffunction-sections -fdata-sections, the bootprog_interp variable that held our "$Interpreter:" marker started getting strip from all loaders, with exception to userboot since it used bootprog_interp to determine what flavor of userboot it was.
At some point, it had been brought to my attention that this was no longer working and I had worked up some potential solutions to use the variable that involved printing it out. My vague recollection is that this was rejected, and I forgot to explore the alternatives; I cannot find records of this discussion anymore.
Fast forward to present day, Andrew reported that it was non-functional and offered (effectively) this patch (sans comment) to stop the compiler from optimizing it out by assigning it to a volatile variable. This removes concerns about user-facing change while retaining the interpreter marker. Furthermore, it could certainly be uglier.
Reported and tested by: Andrew Gierth <andrew_tao173.riddles.org.uk> MFC after: 3 days
show more ...
|
Revision tags: release/12.1.0, release/11.3.0, release/12.0.0, release/11.2.0 |
|
#
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 ...
|
#
4baa8d7e |
| 23-Jan-2018 |
Warner Losh <imp@FreeBSD.org> |
On malloc failure, be sure to close the include file that triggered it.
CID: 1007775 Sponsored by: Netflix
|
#
54b4b13c |
| 24-Dec-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r326936 through r327149.
|
#
6bc86037 |
| 19-Dec-2017 |
Warner Losh <imp@FreeBSD.org> |
Interact is always called with NULL. Simplify code a little by removing this argument, and expanding when rc is NULL. This effectively completes the back out of custom scripts for tftp booted loaders
Interact is always called with NULL. Simplify code a little by removing this argument, and expanding when rc is NULL. This effectively completes the back out of custom scripts for tftp booted loaders from r269153 that was started in r292344 with the new path tricks that obsoleted it.
Submitted by: Netflix
show more ...
|
#
0ff3f28b |
| 19-Dec-2017 |
Warner Losh <imp@FreeBSD.org> |
Simplify things a little. The RETURN macro isn't required. It's only used once, inside an #ifdef where it would be defined to be return.
Sponsored by: Netflix
|
#
ba25195e |
| 12-Dec-2017 |
Warner Losh <imp@FreeBSD.org> |
Revert r326792, r326784, r326772, r326712
Something subtle is creating problems for disk access on ubldr. Back it out unti that can be sorted out.
Sponsored by: Netflix
|
#
c8345748 |
| 11-Dec-2017 |
Warner Losh <imp@FreeBSD.org> |
Fix regression with lua import
Don't print when we can't find a file. Copy it instead to the error buffer. Higher level routines determine if it's appropriate to print the error message.
Also, remo
Fix regression with lua import
Don't print when we can't find a file. Copy it instead to the error buffer. Higher level routines determine if it's appropriate to print the error message.
Also, remove dead code (labeled bogusly lost functionality) since we never used that functionality. Remove unused arg from interact() too.
Sponsored by: Netflix
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 ...
|
#
55b1c6e7 |
| 15-Nov-2017 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Merge ^/head r325663 through r325841.
|
#
ca987d46 |
| 15-Nov-2017 |
Warner Losh <imp@FreeBSD.org> |
Move sys/boot to stand. Fix all references to new location
Sponsored by: Netflix
|