kettenis [Mon, 29 Aug 2022 15:39:55 +0000 (15:39 +0000)]
Add Qualcomm SC8280XP PCIe.
ok dv@
claudio [Mon, 29 Aug 2022 14:58:15 +0000 (14:58 +0000)]
report pending update and withdraw routes in the show neighbor output.
OK tb@
claudio [Mon, 29 Aug 2022 14:57:27 +0000 (14:57 +0000)]
Export pending update and withdraw as part of struct peer_stats.
OK tb@
bluhm [Mon, 29 Aug 2022 14:43:56 +0000 (14:43 +0000)]
Do not calculate the output protocol checksum in the IP input path.
This logic was introduced in 2013 when pf checksum fixup was
temporarily removed. After restoring the pf bahavior in 2016, it
should not be necessary anymore.
OK claudio@
martijn [Mon, 29 Aug 2022 13:25:18 +0000 (13:25 +0000)]
When there are two overlapping regions handled by the same backend we might
traverse back in the tree; Make sure this doesn't happen.
OK tb@
martijn [Mon, 29 Aug 2022 13:23:32 +0000 (13:23 +0000)]
When a backend disappears while handling a request, make sure that the
outstanding requests are handled by the next backend, instead of leaking
memory.
OK tb@
martijn [Mon, 29 Aug 2022 13:19:05 +0000 (13:19 +0000)]
Let snmpd check a response package against the requested searchrange end.
If the returned OID is beyond the searchrange end we have two cases:
- If the backend supports searchranges (agentx) we generate a GENERR and
close the connection.
- If the backend doesn't support searchranges (legacy and maybe a future
snmp proxy) we simply fix-up the result.
OK tb@
martijn [Mon, 29 Aug 2022 12:17:24 +0000 (12:17 +0000)]
Fix a case where EndOfMibView wasn't honoured.
OK tb@
deraadt [Mon, 29 Aug 2022 11:51:05 +0000 (11:51 +0000)]
mount /usr earlier, to satisfy dynamically-linked daemons in /sbin better
(there will be more soon)
mpi [Mon, 29 Aug 2022 11:09:31 +0000 (11:09 +0000)]
Use a rwlock and a mutex to serialize access to global swap variables.
Adapted from NetBSD by tb@.
ok tb@, kn@
mbuhl [Mon, 29 Aug 2022 09:50:38 +0000 (09:50 +0000)]
Sendmsg could crash in tcp_output due to a missing check after the
introduction of tcp_send.
OK mvs@, bluhm@, gnezdo@
Reported-by: syzbot+e859fd353c90eeac26f8@syzkaller.appspotmail.com
mvs [Mon, 29 Aug 2022 08:08:17 +0000 (08:08 +0000)]
Move PRU_RCVOOB request to (*pru_rcvoob)().
ok bluhm@
bluhm [Mon, 29 Aug 2022 07:51:45 +0000 (07:51 +0000)]
Use struct refcnt for interface address reference counting.
There was a crash due to use after free of the ifa although it is
ref counted. As ifa_refcnt was a simple integer increment, there
may be a path where multiple CPUs access it concurrently. So change
to struct refcnt which is MP safe and provides dt(4) leak debugging.
Link level address for IPsec enc(4) and various MPLS interfaces is
special. There ifa is part of struct sc. Use refcount anyway and
add a panic to detect use after free.
bug report stsp@; OK mvs@
jsg [Mon, 29 Aug 2022 07:35:40 +0000 (07:35 +0000)]
remove unused macppc headers
ok miod@ mpi@ gnezdo@
krw [Mon, 29 Aug 2022 07:19:14 +0000 (07:19 +0000)]
Print warning when an MBR partition starts or extends past the
end of the device the MBR is currently inhabiting.
Prompted by some interesting MBR's from France, verbiage
suggestion from deraadt@, ok miod@
jsing [Mon, 29 Aug 2022 06:49:24 +0000 (06:49 +0000)]
Provide ERR_R_INIT_FAIL.
Needed for an upcoming change.
ok tb@
jsing [Mon, 29 Aug 2022 06:48:58 +0000 (06:48 +0000)]
Provide ASN1_R_TYPE_NOT_PRIMITIVE.
Needed for an upcoming change.
ok tb@
jsg [Mon, 29 Aug 2022 06:08:03 +0000 (06:08 +0000)]
static const, not const static
c99 6.11.5:
"The placement of a storage-class specifier other than at the beginning
of the declaration specifiers in a declaration is an obsolescent
feature."
ok miod@ tb@
jsg [Mon, 29 Aug 2022 05:31:16 +0000 (05:31 +0000)]
sync
djm [Mon, 29 Aug 2022 03:04:29 +0000 (03:04 +0000)]
update libfido2 to 1.11.0, taking in just over a year of upstream
development. "looks ok" miod@ ok sthen@
NB. libfido2 major bump
jsg [Mon, 29 Aug 2022 02:58:13 +0000 (02:58 +0000)]
static inline, not inline static
c99 6.11.5:
"The placement of a storage-class specifier other than at the beginning
of the declaration specifiers in a declaration is an obsolescent
feature."
ok guenther@
jsg [Mon, 29 Aug 2022 02:08:13 +0000 (02:08 +0000)]
use ansi volatile keyword, not __volatile__
ok miod@ guenther@
jsg [Mon, 29 Aug 2022 02:01:18 +0000 (02:01 +0000)]
use ansi volatile keyword, not __volatile
ok miod@ guenther@
drahn [Mon, 29 Aug 2022 01:34:18 +0000 (01:34 +0000)]
Support full GICD SPI interrupt count for REG32/REG16.
This enables SPI support for interrupts on X13s.
ok jsg@
mvs [Sun, 28 Aug 2022 21:35:11 +0000 (21:35 +0000)]
Move PRU_SENSE request to (*pru_sense)().
ok bluhm@
bluhm [Sun, 28 Aug 2022 20:32:01 +0000 (20:32 +0000)]
Since we have no raw_usrreq anymore, remove pr_output indirection.
pfkeyv2 and route can call their output functions directly.
OK mvs@
mvs [Sun, 28 Aug 2022 18:44:16 +0000 (18:44 +0000)]
Move PRU_ABORT request to (*pru_abort)().
We abort only the sockets which are linked to `so_q' or `so_q0' queues of
listening socket. Such sockets have no corresponding file descriptor and
are not accessed from userland, so PRU_ABORT used to destroy them on
listening socket destruction.
Currently all our sockets support PRU_ABORT request, but actually it
required only for tcp(4) and unix(4) sockets, so i should be optional.
However, they will be removed with separate diff, and this time PRU_ABORT
requests were converted as is.
Also, the socket should be destroyed on PRU_ABORT request, but route and
key management sockets leave it alive. This was also converted as is,
because this wrong code never called.
ok bluhm@
mvs [Sun, 28 Aug 2022 18:43:12 +0000 (18:43 +0000)]
Don't check `so_pcb' with PR_WANTRCVD flag. tcp(4) sockets are the only
sockets which could have NULL `so_pcb' and we handle this case within
tcp_rcvd() handler.
ok bluhm@
tb [Sun, 28 Aug 2022 18:30:29 +0000 (18:30 +0000)]
Make a few error messages match the actually failing function.
tb [Sun, 28 Aug 2022 18:27:47 +0000 (18:27 +0000)]
Plug memory leak in CMS_add_simple_smimecap() in the unlikely event that
ASN1_INTEGER_set() fails.
ok jsing
jsing [Sun, 28 Aug 2022 17:59:57 +0000 (17:59 +0000)]
Add regress test for the encoding of an ASN1_INTEGER with NULL data.
jsing [Sun, 28 Aug 2022 17:51:46 +0000 (17:51 +0000)]
Set the X.509 request version number.
Rather than assuming the default value from X509_REQ_new(), explicitly set
the X.509 request version number to zero.
ok tb@
jsing [Sun, 28 Aug 2022 17:49:25 +0000 (17:49 +0000)]
Encode an ASN.1 INTEGER with NULL data to value of zero.
When an ASN1_INTEGER is created it has NULL data until a value is set -
previously, an ASN1_INTEGER in this state encoded to an ASN.1 INTEGER with
a value of 0, rather than being treated as an error. While code should
really set values, the historical behaviour has not required this.
Found the hard way by sthen@ with acme-client.
ok tb@
schwarze [Sun, 28 Aug 2022 13:51:58 +0000 (13:51 +0000)]
Replace ugly .sp requests with normal .Pp macros.
After tbl_term.c 1.66, such contortions are no longer needed.
schwarze [Sun, 28 Aug 2022 12:14:48 +0000 (12:14 +0000)]
Adjust desired output after tbl_term.c rev. 1.66 (stop skipping
vertical space after boxed tables).
I'm committing this separately because trying to regenerate the
desired output with groff-current reveals an unrelated, recent
regression in groff. So i fixed the groff output by hand before
committing it, to get rid of the effect of the roff regression.
schwarze [Sun, 28 Aug 2022 11:45:27 +0000 (11:45 +0000)]
Vertical spacing changes around tables in man_term.c rev. 1.194
and tbl_term.c rev. 1.66 cause quite a bit of churn, unfortunately.
This commit cleans up most of it.
jsg [Sun, 28 Aug 2022 11:11:25 +0000 (11:11 +0000)]
remove unused blowfish inline defines
inline use was removed in 1998
schwarze [Sun, 28 Aug 2022 10:57:52 +0000 (10:57 +0000)]
Stop skipping vertical space after boxed tables.
Skipping such space used to be a bug in GNU tbl(1), and a kludge
was added to mandoc to produce identical output.
The bug was fixed in groff commit
8818c07c Jul 30 2022 gbranden@
https://savannah.gnu.org/bugs/index.php?49390
Consequently, now is the time to get rid of the kludge.
schwarze [Sun, 28 Aug 2022 09:55:58 +0000 (09:55 +0000)]
Stop unconditionally emitting vertical space before .TS (table start).
Same change as in groff commit
7ec36dc9 Jul 30 2022 gbranden@
For more details, see https://savannah.gnu.org/bugs/index.php?62841
This change makes sense because:
* It improves the formatting of more pages than it degrades.
* Existing manual pages are wildly inconsistent in which behaviour they
expect: apparently few manual page authors understood the old rules.
* It simplifies the rules of how .TS behaves in man(7)
and makes them more similar to how it behaves in mdoc(7).
* It improves flexibility, making it possible for a table to immediately
follow preceding text without a blank line, which some existing pages
want to use, for example XCreateWindow(3).
jsg [Sun, 28 Aug 2022 02:54:43 +0000 (02:54 +0000)]
directly use ansi volatile keyword in local drm files
mglocker [Sat, 27 Aug 2022 20:31:45 +0000 (20:31 +0000)]
Remove unused mutex.
ok kettenis@
mvs [Sat, 27 Aug 2022 20:28:01 +0000 (20:28 +0000)]
Move PRU_SEND request to (*pru_send)().
The former PRU_SEND error path of gre_usrreq() had `control' mbuf(9)
leak. It was fixed in new gre_send().
The former pfkeyv2_send() was renamed to pfkeyv2_dosend().
ok bluhm@
kettenis [Sat, 27 Aug 2022 16:56:25 +0000 (16:56 +0000)]
Add power button support.
ok tobhe@
jsing [Sat, 27 Aug 2022 09:23:17 +0000 (09:23 +0000)]
Wire up QUIC regress.
jsing [Sat, 27 Aug 2022 09:16:29 +0000 (09:16 +0000)]
Add regress for QUIC.
This exercises the libssl QUIC implementation and completes a TLS handshake
using the SSL_QUIC_METHOD interface.
jsing [Sat, 27 Aug 2022 09:12:55 +0000 (09:12 +0000)]
Handle SSL_do_handshake() being called before SSL_provide_quic_data().
If SSL_do_handshake() is called before SSL_provide_quic_data() has been
called, the QUIC read buffer will not have been initialised. In this case
we want to return TLS13_IO_WANT_POLLIN so that the QUIC stack will provide
handshake data.
jsing [Sat, 27 Aug 2022 09:10:10 +0000 (09:10 +0000)]
Provide additional defines for EVP AEAD.
While these will not be used by LibreSSL, they are used by some QUIC
implementations (such as ngtcp2).
ok tb@
tb [Sat, 27 Aug 2022 08:30:18 +0000 (08:30 +0000)]
Use ENTRY_NB() instead of ENTRY()
Since llvm 13, there are compiler warnings in libm on amd64 and i386 due
to .weak overriding an earlier .globl. Use ENTRY_NB() instead of ENTRY()
to avoid emitting the .globl.
ok deraadt jca (for amd64)
ok guenther
tb [Sat, 27 Aug 2022 08:26:15 +0000 (08:26 +0000)]
Provide ENTRY_NB() for i386
ok guenther
kn [Fri, 26 Aug 2022 21:47:16 +0000 (21:47 +0000)]
Backout "Only return file descriptors to block or character devices"
mount_mfs(8) no monger mounts "/build" with the following fstab(5) entry:
/dev/sd0b /build mfs rw,noperm,nodev,nosuid,-s=
2064348,noauto
as found out by bluhm the hard way.
kn [Fri, 26 Aug 2022 18:37:44 +0000 (18:37 +0000)]
Remove stale comment about nonexistent ifnetaddr
Obsolete since if.c r1.56 (2008)
"Make if.c kvm free by fetching the interface stats via sysctl [...]".
mvs [Fri, 26 Aug 2022 16:17:38 +0000 (16:17 +0000)]
Move PRU_RCVD request to (*pru_rcvd)().
ok bluhm@
claudio [Fri, 26 Aug 2022 14:10:52 +0000 (14:10 +0000)]
Handle IMSG_SESSION_* messages immediatly when received and do not put
them on the per peer imsg queue. This is mainly for IMSG_SESSION_DOWN.
Delaying the session down can race against IMSG_SESSION_ADD which is
handled immediatly and as a result an establised connection may be
removed in the RDE because of it.
The various graceful restart imsgs need similar treatment for similar
reasons. In the end when a session is reset/closed the RDE needs to
stop all work and flush the per peer imsg queue.
With this only update and route refresh messages are handled via the
imsg queue.
OK tb@
kn [Fri, 26 Aug 2022 11:06:47 +0000 (11:06 +0000)]
Do not rm a directory
tb [Fri, 26 Aug 2022 11:04:13 +0000 (11:04 +0000)]
Tweaks in load_skiplist()
If there's an issue opening the default skip list file other than its
absence (most likely bad permissions), we should not silently ignore
that. Also, use err() instead of errx() to display the error.
Second, linelen, the return value of getline(), is not currently used.
Repurpose it to save the result of strcspn() which calculates the length
of the string we're interested in and use that instead of strlen().
ok claudio
kn [Fri, 26 Aug 2022 09:14:00 +0000 (09:14 +0000)]
Sync usage with manual
-l takes chunks not specials; while here, simplify markup for optional parts.
Feedback OK jmc
djm [Fri, 26 Aug 2022 08:16:27 +0000 (08:16 +0000)]
whitespace
djm [Fri, 26 Aug 2022 08:12:56 +0000 (08:12 +0000)]
whitespace
tb [Fri, 26 Aug 2022 06:32:03 +0000 (06:32 +0000)]
Adjust PEM_write_X509() error message and unwrap line.
tb [Fri, 26 Aug 2022 06:28:41 +0000 (06:28 +0000)]
Remove unnecessary BIO dances and use stdout directly.
kn [Fri, 26 Aug 2022 00:24:56 +0000 (00:24 +0000)]
Move (unused) variables under !VERIFYONLY
install media does not use any of -cns, so move their handling out under
!VERIFYONLY to silence -Wunused-but-set-variable warnings in
distrib/special/signify.
OK deraadt
kn [Fri, 26 Aug 2022 00:02:08 +0000 (00:02 +0000)]
Move (unused) functions under !SMALL
if_state_name() and proposal_state_name() are only uesd in log_debug()
calls which are NOOPs in SMALL builds.
Seen with -Wunused-function warnings in distrib/special/slaacd.
OK deraadt
jsg [Thu, 25 Aug 2022 23:52:56 +0000 (23:52 +0000)]
drm/amd/display: Check correct bounds for stream encoder instances for DCN303
From Aurabindo Pillai
82a27c1855445d48aacc67b0c0640f3dadebe52f in linux 5.15.y/5.15.63
89b008222c2bf21e50219725caed31590edfd9d1 in mainline linux
jsg [Thu, 25 Aug 2022 23:49:31 +0000 (23:49 +0000)]
drm/ttm: Fix dummy res NULL ptr deref bug
From Arunpravin Paneer Selvam
76672cd326c146ded2c2712ff257b8908dcf23d8 in linux 5.15.y/5.15.63
cf4b7387c0a842d64bdd7c353e6d3298174a7740 in mainline linux
cheloha [Thu, 25 Aug 2022 20:43:17 +0000 (20:43 +0000)]
amd64/lapic.c: remove unused extern prototype for tsc_delay()
kettenis [Thu, 25 Aug 2022 19:16:29 +0000 (19:16 +0000)]
The "Avalanche" performance cores on Apple's M2 SoC have more than 16
P-states. As a result the layout of the "state" register changed.
Make the driver handle that.
Also make sure we use the correct lowest state in case the lowest
frequency of the performance cores is different from the lowest
frequency of the efficiency cores.
ok tobhe@
job [Thu, 25 Aug 2022 18:12:05 +0000 (18:12 +0000)]
Make PEM printing available through increased verbosity (-vvf)
Suggestion from claudio@
OK tb@
cheloha [Thu, 25 Aug 2022 18:01:54 +0000 (18:01 +0000)]
acpihpet(4): don't truncate HPET frequency to 32-bit value
timecounter.tc_frequency is a 64-bit value: this cast is unnecessary.
Split off from the acpihpet_delay() commit at jsg@'s suggestion.
Link1: https://marc.info/?l=openbsd-tech&m=
166053729104923&w=2
Link2: https://marc.info/?l=openbsd-tech&m=
166132727120528&w=2
probably ok jsg@
cheloha [Thu, 25 Aug 2022 17:54:33 +0000 (17:54 +0000)]
acpihpet(4): add acpihpet_delay(), another delay(9) implementation
When lapic_delay() is removed from the tree in the near future, older
machines without a constant/invariant TSC will need a delay(9)
implementation better than i8254_delay().
This patch adds acpihpet_delay(), a delay(9) implementation based on
the ACPI HPET timer. It is preferable to i8254_delay() (0) and
acpitimer_delay() (1000), so set its quality to 2000.
On newer machines, the HPET is slower to read than the PMT on newer
machines for reasons unknown, so _technically_ this quality hierarchy
is not always accurate. However, we expect these newer machines to
have a constant/invariant TSC available, so the inaccuracy is harmless
because tsc_delay() will be available, which is better than both the
PMT and the HPET.
In general, on real hardware that predates wide availability of the
constant/invariant TSC, the HPET is preferable to the PMT.
With input from jsg@.
Link: https://marc.info/?l=openbsd-tech&m=166053729104923&w=2
ok mlarkin@ jsg@
cheloha [Thu, 25 Aug 2022 17:43:34 +0000 (17:43 +0000)]
acpitimer(4): add acpitimer_delay(), another delay(9) implementation
When lapic_delay() is removed from the tree in the near future, older
machines without a constant/invariant TSC will need a delay(9)
implementation better than i8254_delay().
This patch adds acpitimer_delay(), a delay(9) implementation based on
the ACPI PM timer. It is only preferable to i8254_delay(), so set its
quality to 1000.
With input from jsg@.
Link: https://marc.info/?l=openbsd-tech&m=166053729104923&w=2
ok mlarkin@ jsg@
cheloha [Thu, 25 Aug 2022 17:38:16 +0000 (17:38 +0000)]
amd64, i386: use delay_init() instead of writing delay_func by hand
Now that we have delay_init(), use it in all the places where we
currently set delay_func by hand.
lapic_delay() is great: 3000. hv_delay() is needed before we set up
lapic_delay() on Hyper-V guests: 4000. tsc_delay() is better than
lapic_delay() and (probably?) hv_delay(): 5000.
We may bump hv_delay's quality value up over that of tsc_delay() in a
future patch. It's a little ambiguous whether hv_delay() causes a VM
exit.
Idea and patch from jsg@. With tons of input, research and advice
from jsg@.
Link: https://marc.info/?l=openbsd-tech&m=166053729104923&w=2
ok mlarkin@ jsg@
job [Thu, 25 Aug 2022 17:31:26 +0000 (17:31 +0000)]
In verbose filemode print details about encapsulated certificates.
Add command line flag to print the certificate in PEM format.
OK tb@
cheloha [Thu, 25 Aug 2022 17:25:25 +0000 (17:25 +0000)]
amd64, i386: add delay_init(): basic delay(9) implementation management
Because the clock situation on x86 and amd64 is a terminal
clusterfuck, there are many different ways to delay(9). We need a
rudimentary mechanism for gracefully switching to progressively better
delay(9) implementations as they become available during boot without
riddling the code with ifdefs and function pointer comparisons.
This patch adds delay_init() to both amd64 and i386. If the quality
value passed to delay_init() exceeds the quality value of the current
delay_func, delay_init() changes delay_func to the given function
pointer and updates the quality value. Both platforms start with
delay_func set to i8254_delay() and a quality value of zero: all other
delay(9) implementations are preferable.
Idea and patch provided by jsg@. With tons of input, research, and
advice from jsg@.
Link: https://marc.info/?l=openbsd-tech&m=166053729104923&w=2
ok mlarkin@ jsg@
job [Thu, 25 Aug 2022 17:11:34 +0000 (17:11 +0000)]
Fix newline in JSON filemode
OK tb@
kn [Thu, 25 Aug 2022 17:09:54 +0000 (17:09 +0000)]
Only return file descriptors to block or character devices
If the requested path contained a slash, opendev(3) blindly opened the file
and returned a file descriptor to it.
Check for block or character devices (according to OPENDEV_BLCK) and fail
for other types.
Spotted through installboot(8) which happily opened a stage file as device
when forgetting the device argument:
# installboot -v ./biosboot
Using / as root
installing bootstrap on ./biosboot
using first-stage /usr/mdec/biosboot, second-stage /usr/mdec/boot
installboot: disklabel: ./biosboot: Inappropriate ioctl for device
This makes it fail earlier, as expected:
# installboot -v ./biosboot
installboot: open: ./biosboot: Block device required
The case where opendev(3) is passed a string not containing a slash, i.e.
a supposed DUID, is fine, as diskmap(4) will ensure that only valid device
paths are returned, if the DUID is valid.
Feedback OK millert
claudio [Thu, 25 Aug 2022 16:49:18 +0000 (16:49 +0000)]
Use memset() and memcpy() instead of bzero() or bcopy().
In one case use memmove() since the operation is done on the same memory
buffer and may overlap.
OK tb@
miod [Thu, 25 Aug 2022 16:10:15 +0000 (16:10 +0000)]
No need for wsmux in this kernel configuration; ok visa@
millert [Thu, 25 Aug 2022 13:32:13 +0000 (13:32 +0000)]
No need to include float.h anymore.
job [Thu, 25 Aug 2022 11:07:28 +0000 (11:07 +0000)]
Plug memory leak in filemode
OK tb@ claudio@
claudio [Thu, 25 Aug 2022 08:10:25 +0000 (08:10 +0000)]
Connected routes use the BGP exit nexthop while other routes need to use
the nexthop from the covering route. Move this logic from RDE to the
kroute code so it is all in one place.
OK tb@
kettenis [Wed, 24 Aug 2022 22:01:16 +0000 (22:01 +0000)]
Add DIT CPU feature.
ok beck@
kn [Wed, 24 Aug 2022 21:08:51 +0000 (21:08 +0000)]
Forgotten to commit as part of
----------------------------
/usr/src/usr.sbin/installboot/Makefile revision 1.25
date: 2022/08/15 17:06:43; author: kn; state: Exp; lines: +5 -1; commitid: 36Ayh2RViNOotnQJ;
Add initial piece for softraid(4) support on arm64
arm64 is the only currently supported OpenBSD platform which both
a) supports booting off root on softraid(4) (kernel and bootloader) and
b) is an EFI platform (as far as installboot(8) is concerned).
Currently, installboot treats softraid root volumes as regular devices,
ignoring ignores chunk devices completely.
Teach installboot the first bits of softraid support for EFI:
installing the single-stage boot loader on chunks rather than the volume.
Copy over sparc64's softraid stage-1 code as-is and make its stage-2 a NOOP:
# ./obj/installboot -v sd4
Using / as root
installing bootstrap on /dev/rsd4c
using first-stage /usr/mdec/BOOTAA64.EFI
sd4: softraid volume with 1 disk(s)
sd0a: installing boot blocks on /dev/rsd0c
copying /usr/mdec/BOOTAA64.EFI to /tmp/installboot.KuBD4zkfpM/efi/boot/bootaa64.efi
writing /tmp/installboot.KuBD4zkfpM/efi/boot/startup.nsh
arm64 miniroot fits and boots with this.
OK stsp
As of now, EFI partitions must still be created manually as installboot's
'-p' does not support softraid at all (next missing piece for root on
softraid on arm64 installations to work out-of-the-box).
----------------------------
Reminded by miod, thanks
kn [Wed, 24 Aug 2022 20:38:03 +0000 (20:38 +0000)]
run -p on all chunk devices for now to make progress
These tests run on amd64, arm64 and sparc64, of which only arm64 implements
filesystem preparation; always run to test NOOPs on the other two as well
and be reminded about via XXX in the output.
Best to fix explicit stage files on arm64 (all EFI platforms) first,
polish these tests for arm64 a bit further and then revert these prepare
per chunk bits again -- easier than keeping a local diff while committing.
kn [Wed, 24 Aug 2022 20:31:06 +0000 (20:31 +0000)]
crank chunk size to make fdisk work on arm64
miod [Wed, 24 Aug 2022 19:36:55 +0000 (19:36 +0000)]
Add missing licence, from nonaka@netbsd.org
miod [Wed, 24 Aug 2022 19:36:05 +0000 (19:36 +0000)]
Build libsa with NO_NET as we don't need any of the network-related code in it.
miod [Wed, 24 Aug 2022 17:36:19 +0000 (17:36 +0000)]
Force compilation to fail in case of implicit function declaration.
miod [Wed, 24 Aug 2022 17:35:15 +0000 (17:35 +0000)]
Add prototype declarations for a bunch of functions.
claudio [Wed, 24 Aug 2022 17:14:02 +0000 (17:14 +0000)]
Put the 'connection from non-peer' log message behind a verbose logging check.
In many cases the message is just flooding the logs. In some cases it may
help to identify a missing neighbor for those cases log verbose can be used.
OK deraadt@ denis@
kn [Wed, 24 Aug 2022 15:58:06 +0000 (15:58 +0000)]
Silence newfs, put mountpoint under obj, simplify stagefile handling
kn [Wed, 24 Aug 2022 15:04:18 +0000 (15:04 +0000)]
Use MOUNTPOINT correctly/consistently
kn [Wed, 24 Aug 2022 15:01:32 +0000 (15:01 +0000)]
Hook up installboot on amd64
kn [Wed, 24 Aug 2022 14:57:52 +0000 (14:57 +0000)]
Add missing root-explicit-stages test, omit -v by default
jsg [Wed, 24 Aug 2022 11:21:12 +0000 (11:21 +0000)]
match on Intel 400 Series LP HD Audio (0x02c8)
on a Dell Latitude 3410 the audio device is subclass audio not hd audio
so azalia does not match
reported by Kirill Filatov
nicm [Wed, 24 Aug 2022 07:22:30 +0000 (07:22 +0000)]
Check for NULL returns from bufferevent_new.
deraadt [Wed, 24 Aug 2022 01:32:21 +0000 (01:32 +0000)]
if the socket is connected, we can use recv() instead of recvfrom()
ok jmatthew
cheloha [Tue, 23 Aug 2022 20:37:16 +0000 (20:37 +0000)]
msdosfs: don't pass NULL proc pointer to detrunc()
detrunc()'s proc pointer argument may be passed to vinvalbuf(9), which
under certain conditions will pass the given proc pointer to
VOP_FSYNC(9), which always asserts that the given proc pointer is
equal to curproc.
msdosfs_write(), msdosfs_inactive(), createde(), and deextend() all
pass NULL for detrunc()'s proc pointer argument. I have no idea why.
If these detrunc() calls ever reach VOP_FSYNC(9) the kernel will
panic.
So, for example, any user with write access to an msdosfs partition
can panic the kernel by writing to the partition until they cause
ENOSPC. That particular panic looks like this:
panic: kernel diagnostic assertion "p == curproc" failed: file "/usr/src/sys/kern/vfs_vops.c", line 305
Stopped at db_enter+0xa: popq %rbp
TID PID UID PRFLAGS PFLAGS CPU COMMAND
*500294 8955 0 0x100003 0 1K ksh
db_enter() at db_enter+0xa
panic(
ffffffff81f1b0cf) at panic+0xc4
__assert(
ffffffff81fa361c,
ffffffff81ee8329,131,
ffffffff81f7229b) at assert+0x3b
VOP_FSYNC(
fffffd8449a78b30,
ffffffffffffffff,1,0) at VOP_FSYNC+Oxd6
vinvalbuf(
fffffd8449a78b30,3,
ffffffffffffffff,0,0,
ffffffffffffffff) at vinvalbuf+0xd5
detrunc(
ffff80000186f900,1fe,0,
ffffffffffffffff,0) at detrunc+0x239
msdosfs_write(
ffff800055774b98) at msdosf_write+0x4a4
VOP_WRITE(
fffffd8449a78b30,
ffff800055774d10,3,
fffffd8370e8d5d0) at VOP_WRITE+0x59
vn_write(
fffffd83c723b860,
ffff800055774d10,0) at vn_write+0xc0
dofilewritev(
ffff8000556ecfc0,1,
ffff800055774d10,0.
ffff800055774dc0) at dofilewritev+0x14d
sys_write(
ffff8000556ecfc0,
ffff800055774dd0,
ffff800055774dc0) at sys_write+0x6a
syscall(
ffff800055774e70) at syscall+0x39b
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7ffffd8bf0, count: 2
This patch tweaks all the detrunc() calls in the aforementioned
msdosfs functions to pass curproc instead of a NULL pointer to
detrunc(). We don't appear to have curproc stashed anywhere in
msdosfs_write() or deextend(), so for those calls we explicitly pass
curproc.
This might have unforseen consequences I can't anticipate. However,
with this patch I can no longer panic the kernel by filling an msdosfs
partition, which seems like an improvement.
With advice from gnezdo@.
ok gnezdo@
sthen [Tue, 23 Aug 2022 18:09:50 +0000 (18:09 +0000)]
sync (/var/agentx)
kn [Tue, 23 Aug 2022 16:08:09 +0000 (16:08 +0000)]
Remove unused partition type patterns from disk_has() helper
softraid(4) patterns were never used since import in 2015
and only one out of APFS patterns are used.
Feedback on APFS krw
OK krw
anton [Tue, 23 Aug 2022 15:58:57 +0000 (15:58 +0000)]
Remove assertions as they have been disabled since the code was imported
from NetBSD back in 2000.
ok krw@