freebsd-dev/stand/ficl
Simon J. Gerraty 91cd69ee2c 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
2020-03-09 16:02:54 +00:00
..
aarch64 Prefer uintXX_t to u_intXX_t 2018-03-13 16:33:00 +00:00
amd64 Add support for hypervisor check on x86 2019-10-24 20:02:48 +00:00
arm Prefer uintXX_t to u_intXX_t 2018-03-13 16:33:00 +00:00
i386 Add support for hypervisor check on x86 2019-10-24 20:02:48 +00:00
mips Prefer uintXX_t to u_intXX_t 2018-03-13 16:33:00 +00:00
mips64 Prefer uintXX_t to u_intXX_t 2018-03-13 16:33:00 +00:00
powerpc Prefer uintXX_t to u_intXX_t 2018-03-13 16:33:00 +00:00
riscv Prefer uintXX_t to u_intXX_t 2018-03-13 16:33:00 +00:00
softwords ficl: add xemit word 2019-09-05 15:06:30 +00:00
x86 Add support for hypervisor check on x86 2019-10-24 20:02:48 +00:00
dict.c
ficl.c
ficl.h Enable veriexec for loader 2019-02-26 06:22:10 +00:00
fileaccess.c veloader use vectx API for kernel and modules 2020-03-09 16:02:54 +00:00
float.c Revert r326855: Cargo cut a fix for the regressions r326585 caused. 2017-12-14 18:57:17 +00:00
loader.c veloader use vectx API for kernel and modules 2020-03-08 17:42:42 +00:00
Makefile stand/ficl: Fix testmain 2018-03-07 17:18:46 +00:00
Makefile.depend Enable veriexec for loader 2019-02-26 06:22:10 +00:00
math64.c
math64.h
prefix.c
search.c
stack.c
testmain.c
tools.c
unix.c
vm.c
words.c ficl: add uIsGreater word 2019-09-05 09:04:48 +00:00