freebsd-dev/stand/liblua
Simon J. Gerraty 212e103f2f 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 15:48:53 +00:00
..
float.h Regularize my copyright notice 2019-12-04 16:56:11 +00:00
lerrno.c Create new EINTEGRITY error with message "Integrity check failed". 2019-01-17 06:35:45 +00:00
lerrno.h loader.lua: Expose errno table to lua 2018-02-20 19:39:48 +00:00
locale.h Regularize my copyright notice 2019-12-04 16:56:11 +00:00
lstd.c veloader use vectx API for kernel and modules 2020-03-09 15:48:53 +00:00
lstd.h liblua: Implement write support 2018-02-24 02:57:24 +00:00
luaconf.h stand: liblua: drop default buffer size to 128 2019-12-12 01:35:56 +00:00
lutils.c liblua: add loader.lua_path 2019-11-02 03:41:30 +00:00
lutils.h interp_lua: Register io/loader with regular Lua module system 2018-02-18 01:13:58 +00:00
Makefile Add flua to the base system, install to /usr/libexec 2019-11-18 23:21:13 +00:00
math.h Regularize my copyright notice 2019-12-04 16:56:11 +00:00