riscv vmm: virtual timer support.
Add a virtual timer implementation based on SBI Time extension.
This is needed for Eswin EIC7700 SoC which does not include the newer SSTC
extension.
Timer interrupt pending bit (STIP) could not be cleared in the guest system,
so rework interrupts handling: add new "interrupts_pending" field. Use it
for timer interrupt only for now, but later we can extend to store all
pending interrupts (Timer, IPI and External).
With this I'm able to boot FreeBSD (SMP) guest on HiFive Premier P550,
which is the first real hardware with RISC-V 'H'-spec included.
Differential Revision: https://reviews.freebsd.org/D48133
TCP RACK: simplify condition
It is already known that rsm != NULL, so no need to check for it.
Reviewed by: rrs
CID: 1523815
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D48282
TCP BBR: do not log an uninitialized value
Reviewed by: rrs
CID: 1523789
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D48281
pf tests: check cleared time when zeroing stats for table addresses
Verify that we reset the cleared time when we zero an address' counters in
a table.
PR: 282877, 282984
Reviewed by: kp
MFC after: 2 weeks
Signed-off-by: Leonid Evdokimov <leon at darkk.net.ru>
Differential Revision: https://reviews.freebsd.org/D48242
shar: add a note about the port to the deprecation warning
cy@ was kind enough to preemptively create a port from the version of
this script in base for those that need this exact interface; add a
pointer to it so that interested individuals could start installing it
sooner rather than later.
Noted by: cy
MFC after: 3 days
shar: add a deprecation notice
The shar(1) program is simple, but the fundamental idea of a sh archive
is risky at best and one that we probably shouldn't be promoting as
prominently as a program in $PATH and a manpage. Let's deprecate and
remove it, since the same functionality can easily be found in
tar(1) instead.
Reviewed by: emaste, philip
Reviewed by: allanjude, brooks, delphij, des, imp, rpokala (previous)
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D48130
pkg: finish adding the ECC signer and signature type bits
Signature types need to be parsed out of the key/signature information
that we are presented with from the files we download. We use that to
understand whicher signer we need to dispatch to.
The ECC signer is more-or-less lifted from pkg(8), with some changes to
slim it down for pkg(7).
Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D48108
pkg: abstract rsa out behind a pkgsign API
This mirrors a change we made in pkg(8), and will be used to next add
another signer that does ECC.
Reviewed by: bapt, emaste
Differential Revision: https://reviews.freebsd.org/D48106
pkg: add a pkgsign_verify_data callback
This will be used to verify raw payloads, as if signed by pkg-key(8).
It will be used specifically in pkg(7) to verify .pubkeysig as published
by poudriere.
Amend verify_pubsignature() now to use it. For the RSA signer, we need
to verify using a sha256 of the data instead of the data itself.
Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D48109
pkg: refactor out a pkg_read_fd()
We already have to do this for reading the pubkey, just pull it out for
other uses. The ECC signer will use this to verify the bootstrap if
the PUBKEY mechanism is used.
Reviewed by: bapt, emaste
Differential Revision: https://reviews.freebsd.org/D48107
secure: hook up libecc as libpkgecc
libecc is not intended to be general use, other applications should
really be using openssl. pkg(7) uses libecc to align with the pkg(8)
project and its goals. This will be used in the upcoming support for
ECC in pkg(7).
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D48117
pkg: pull rsa bits out of pkg.c
We'll eventually add a pkgsign abstraction over these similar to how we do
in pkg(8), but start by isolating these parts.
Reviewed by: bapt, emaste
Differential Revision: https://reviews.freebsd.org/D48105
lib: hook libder up to the build
libder will be used in upcoming ECC support in the pkg(7) bootstrap to
read DER-encoded keys and signatures.
Differential Revision: https://reviews.freebsd.org/D48116
Fix lib/libc/nss/getgr_test with large numbers of groups
These tests create a linked list with one entry for every group on the
running system. On a system with about 30,000 groups, the test took 69
seconds to run, and crashed Kyua with the below error:
kyua: E: string or blob too big (sqlite op: sqlite3_bind_blob) (sqlite db: /root/.kyua/store/results.usr_tests.20241231-203317-570235.db).
Fix the test by limiting it to operating on the first 1024 groups.
Apply the same change to getpw_test and getserv_test too, which are
vulnerable to the same problem.
MFC after: 2 weeks
Sponsored by: ConnectWise
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D48275
TCP BBR: remove code which is never executed
USEC_2_TICKS() returns at least 1.
Reviewed by: rrs
CID: 1523775
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D4827