freebsd-dev/share
Simon J. Gerraty afc571b1a6 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-08 17:42:42 +00:00
..
colldef Add ga_IE.UTF-8 locale. 2018-11-26 19:39:49 +00:00
ctypedef Mark "private use area" characters as printable. 2019-10-05 22:17:54 +00:00
dict Sync with NetBSD's /usr/share/dict/words, with the exception of quim 2017-12-16 20:25:50 +00:00
doc Move all sources from the llvm project into contrib/llvm-project. 2019-12-20 19:53:05 +00:00
dtrace Introduce dwatch(1) as a tool for making DTrace more useful 2018-03-06 23:44:19 +00:00
examples Catch up with Clang 9.0. 2020-01-09 20:07:38 +00:00
i18n
keys pkgbase: Add the pkg trusted keys to the FreeBSD-utilities package 2019-09-05 19:17:17 +00:00
man Add COUNTER_U64_SYSINIT() and COUNTER_U64_DEFINE_EARLY(). 2020-03-06 19:09:01 +00:00
misc Update pci_vendors to 2020.02.22 2020-02-27 11:23:44 +00:00
mk veloader use vectx API for kernel and modules 2020-03-08 17:42:42 +00:00
monetdef Add ga_IE.UTF-8 locale. 2018-11-26 19:39:49 +00:00
msgdef Add ga_IE.UTF-8 locale. 2018-11-26 19:39:49 +00:00
numericdef Add ga_IE.UTF-8 locale. 2018-11-26 19:39:49 +00:00
security
sendmail
skel Make sh(1) support \u in PS1. This removes one fork/exec on interactive 2019-01-24 11:59:46 +00:00
snmp
syscons strip trailing whitespace from font and keymap INDEX files 2019-12-10 13:52:08 +00:00
tabset
termcap Tag etc/termcap with package=runtime 2020-01-22 18:55:36 +00:00
tests
timedef Finsh readding Big5 in r317204, which was reverting r315568. This commit 2019-06-20 07:17:16 +00:00
vt Use 0x5c for the scan code 0x7d. 2020-02-18 01:50:44 +00:00
zoneinfo tzsetup: upgrade to zone1970.tab 2019-07-17 06:17:27 +00:00
Makefile
Makefile.inc