summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-09-01Add macppc bits, hook up installboot(8) tests on macppcKlemens Nanni
Default tests (USE_SOFTRAID=No, NDISKS=1) pass except for 'vnd0 ./ofwboot' as reported on tech@ (fix pending).
2022-09-01ts(1): parse user format string only onceScott Soule Cheloha
Currently, ts(1) reparses the user format string every time it prints a timestamp. This is wasteful. If we isolate the parsing loop in fmtfmt() and move the rest of the work into a new function, fmtprint(), we can cut some overhead out of the hot loop. We still need to update any microsecond substrings in the parsed format string every time we print a timestamp. So during parsing in fmtfmt() we build a list of pointers to locations in the parsed buffer where the microsecond substring needs to be copied during fmtprint(). With input from deraadt@. Link1: https://marc.info/?l=openbsd-tech&m=165769139318084&w=2 Link2: https://marc.info/?l=openbsd-tech&m=165910022501353&w=2 OK job@
2022-09-01Hook up installboot(8) tests on sparc64Klemens Nanni
Default tests (USE_SOFTRAID=Yes, NDISKS='1 2') pass except for '-r mnt', as mentioned (fix pending). USE_SOFTRAID=no and/or NDISKS=1 make '-r mnt' work.
2022-08-31Introduce USE_SOFTRAID to allow testing on vnd(4) directlyKlemens Nanni
This is mostly for architectures which don't have softraid(4) support in installboot(8), but should also be useful in general to test different setups and thus increase coverage. Default to root on softraid on vnd on all architectures that support it: amd64, arm64, i386 and sparc64; use root on vnd on others (yet to come).
2022-08-31Compare equality of looked up node using pointers instead ofPatrick Wildt
strings, as the component name provided in the IORT might be specified in a different way than our ACPI stack would do. ok kettenis@
2022-08-31Silence cleanup, rename internal setup targets for clarityKlemens Nanni
2022-08-31Always run prepareKlemens Nanni
Not all architectures require/implement -p, but installboot(8) provides stubs, so leave it to the program to (not) do something.
2022-08-31use the posix phrasing to improve the description of "shift";Jason McIntyre
nudge from luka krmpotic
2022-08-31Add an empty line for consistency.Theo Buehler
2022-08-31Move PRU_SENDOOB request to (*pru_sendoob)().Vitaliy Makkoveev
PRU_SENDOOB request always consumes passed `top' and `control' mbufs. To avoid dummy m_freem(9) handlers for all protocols release passed mbufs in the pru_sendoob() EOPNOTSUPP error path. Also fix `control' mbuf(9) leak in the tcp(4) PRU_SENDOOB error path. ok bluhm@
2022-08-31Replace "newfs_msdos" and "fsck_msdos" with "newfs -t msdos" and "fsck -tKenneth R Westerback
msdos". Add some missing spaces after "=". Constify the static strings. Prodded a while ago by deraadt@, tweaks from kn@, ok kn@
2022-08-31Recommit -r1.45 but without error checking EVP_PKEY_copy_parameters()Theo Buehler
EVP_PKEY_copy_parameters() will unconditionally fail if the pkey's ameth has no copy_params(). Obviously this is indistinguishable from actual failure... ok jsing
2022-08-31Support SMMUv3 IORT nodes as well in the midlayers. This allows IOMMUPatrick Wildt
mappings to reach a future SMMUv3 implementation. ok kettenis@, mlarkin@
2022-08-31Rename helper vars/files under obj/Klemens Nanni
Up-front cleanup for a future diff to run directly on vnd(4) without softraid(4). No functional change.
2022-08-31Put MD fdisk usage into new FORMAT_DISK, also softraid volume after chunksKlemens Nanni
2022-08-31Revert r1.46. Causes fireworks in regress.Theo Buehler
2022-08-31MSIs on the x13s are routed through both a "normal" SMMU and a "v3" SMMU.Mark Kettenis
So handle this case in acpipci(4) and kill the hack to disable MSIs. ok patrick@, mlarkin@, deraadt@
2022-08-31Log copy of /ofwbootKlemens Nanni
Another step towards more consistent behaviour across platforms. This leaves only hppa and landisk **not** logging such copies, but I can't test on those. OK miod
2022-08-31Denote possible answers in the usual mannerKlemens Nanni
OK miod
2022-08-31Make installboot on landisk aware of a possible MBR on the disk, and in thisMiod Vallat
case install the first level bootstrap at the beginning of the of the wd0a filesystem, rather than at the beginning of the disk. Both locations work but the previous behaviour overwriting an existing MBR is a violation of POLA. tweaks & ok krw@
2022-08-31relayd(8): change agentx_getsock to return voidDave Voutila
Only has one return value and it's never checked. ok martijn@, tb@
2022-08-31Add qcgpio(4) and qciic(4), drivers for the Qualcomm GPIO and I2C controllersMark Kettenis
found on the SC8280XP SoC. Together these drivers make the keyboard, trackpoint and touchpad work on the x13s. ok deraadt@
2022-08-31Remove IMSG_CTL_SHOW_RIB_HASH and struct rde_hashstats which are noClaudio Jeker
longer used. Also cleanup some hash sizes which are also no longer used. OK tb@
2022-08-31Introduce iic_intr_disestablish() and use it in ihidev(4).Mark Kettenis
ok jcs@
2022-08-31Remove the hash statistics print code. The RDE no longer sends theseClaudio Jeker
imsgs. OK tb@
2022-08-31Add apldc(4), apldchidev(4), apldckdb(4) and aplrtkit(4). Together theseMark Kettenis
drivers implement support for the Dockchannel-base keyboard found on Apple M2 laptops. ok mlarkin@, patrick@
2022-08-31Switch the generic attribute cache to an RB tree.Claudio Jeker
OK benno@ tb@
2022-08-31Remove most mentions of contexts on the stack.Theo Buehler
2022-08-31nasty whitespaceTheo Buehler
2022-08-31Rework DSA_size() and ECDSA_size()Theo Buehler
DSA_size() and ECDSA_size() have a very special hack. They fudge up an ASN1_INTEGER with a size which is typically > 100 bytes, backed by a buffer of size 4. This was "fine", however, since they set buf[0] = 0xff, where the craziness that was i2c_ASN1_INTEGER() only looks at the first octet (one may then ask why a buffer of size 4 was necessary...). This changed with the rewrite of i2c_ASN1_INTEGER(), which doesn't respect this particular hack and rightly assumes that it is fed an actual ASN1_INTEGER... Instead, create an appropriate signature and use i2d to determine its size. Fixes an out-of-bounds read flagged by ASAN and oss-fuzz. ok jsing
2022-08-31Avoid division by zero if no connection was made.Theo Buehler
CID 184043
2022-08-31Add missing OpenBSD id commentClaudio Jeker
2022-08-31make kernel build without INET6 againSebastian Benoit
ok sashan@
2022-08-31Make sure that only one roa softreconfig runner is run at any time.Claudio Jeker
If a run takes to long drop the current update and wait for the next update. OK benno@
2022-08-31Remove now unused and unreferenced disktab.h.Kenneth R Westerback
2022-08-31Whitespace fixes.Kenneth R Westerback
2022-08-31Some missing return checksTheo Buehler
2022-08-31Avoid some buffer overflows in ecdsatestTheo Buehler
The ASN.1 encoding of the modified ECDSA signature can grow in size due to padding of the ASN.1 integers. Instead of reusing the same signature buffer freshly allocate it. Avoids some buffer overflows caught by ASAN.
2022-08-31Revert previous. Committed the wrong version of the diff.Theo Buehler
2022-08-31Avoid some buffer overflows in ecdsatestTheo Buehler
The ASN.1 encoding of the modified ECDSA signature can grow in size due to padding of the ASN.1 integers. Instead of reusing the same signature buffer freshly allocate it. Avoids some buffer overflows caught by ASAN.
2022-08-31Introduce a function to trylock a page instead of duplicating the logic.Martin Pieuchot
Stolen from NetBSD. ok jsg@
2022-08-31Remove "force CHS" remnants. LBA uber alles.Kenneth R Westerback
Mildly sad noises from Nick. ok miod@ mlarkin@
2022-08-31Rewrite the searchrange end calculation routine.Martijn van Duren
The old one had a bug which allowed it to move backwards on overlapping regions and also didn't always returned the optimal end position. OK tb@
2022-08-31Lock vmobjlock then check u_flags & UVM_VNODE_VALID in uvn_attachGreg Steuck
This is a continuation of this commit: "Always acquire the `vmobjlock' before incrementing an object's reference." Unfortuantely this created a race found by syzkaller manifesting as: panic: kernel diagnostic assertion "uvn->u_obj.uo_refs == 0" failed: file "sys/uvm/uvm_vnode.c", line 234 ok mpi@ Reported-by: syzbot+dd2d2684ad2818c927da@syzkaller.appspotmail.com
2022-08-31If a partition both starts and ends beyond the end of the unitKenneth R Westerback
only warn about the start. ok millert@
2022-08-31Fix window size report, from Vincent Bernat.Nicholas Marriott
2022-08-31Sync the supported hardware list with armv7.html.Frederic Cambus
OK jsg@
2022-08-31Switch loop bounds from size_t to int in check_hosts()Theo Buehler
sk_num() can return a negative value, in which case the upper bound is SIZE_MAX, which results in a very long for loop. CID 153997 ok jsing
2022-08-31Check return values in ssl_print_tmp_key()Theo Buehler
Use EVP_PKEY_get0_EC_KEY() instead of the get1 version to avoid an EVP_PKEY_free(). Check return values: if either EVP_PKEY_get0_EC_KEY() or EC_KEY_get0_group() fail, a NULL dereference occurs. CID 43289 ok jsing
2022-08-31Avoid potential NULL dereference in ssl_set_pkey()Theo Buehler
Switch from X509_get_pubkey() to X509_get0_pubkey() to avoid an unnecessary EVP_PKEY_free(). Check the return values of X509_get0_pubkey() and EVP_PKEY_copy_parameters(). If the former returns NULL, the latter will dereference NULL. CID 25020 ok jsing