openbsd
2 years agounbreak test: was picking up system ssh-add instead of the one supposedly
djm [Tue, 4 Jan 2022 07:20:33 +0000 (07:20 +0000)]
unbreak test: was picking up system ssh-add instead of the one supposedly
being tested. Spotted by dtucker and using his VM zoo (which includes
some systems old enough to lack ed25519 key support)

2 years agoremove unused file
jsg [Tue, 4 Jan 2022 06:48:46 +0000 (06:48 +0000)]
remove unused file

2 years agoAdd `ipsec_flows_mtx' mutex(9) to protect `ipsp_ids_*' list and
yasuoka [Tue, 4 Jan 2022 06:32:39 +0000 (06:32 +0000)]
Add `ipsec_flows_mtx' mutex(9) to protect `ipsp_ids_*' list and
trees.  ipsp_ids_lookup() returns `ids' with bumped reference
counter.  original diff from mvs

ok mvs

2 years agoMake host name DHCP option configurable.
florian [Tue, 4 Jan 2022 06:20:37 +0000 (06:20 +0000)]
Make host name DHCP option configurable.
Diff from hagen@sdf.org, tweaks by me.
OK phessler
testing & OK bket

2 years agoWait for the link-local address to become non-tentative.
florian [Tue, 4 Jan 2022 06:17:46 +0000 (06:17 +0000)]
Wait for the link-local address to become non-tentative.
Otherwise we just end up with an ugly "Can't assign requested address"
error from sendmsg(2).
OK phessler

2 years agoRemove commented out gtp from amd64 GENERIC
gnezdo [Tue, 4 Jan 2022 05:50:43 +0000 (05:50 +0000)]
Remove commented out gtp from amd64 GENERIC

It has long been irrelevant as pointed out by Crystal Kolipe
kolipe.c AT exoticsilicon.com

ok mlarkin

2 years agosync
deraadt [Mon, 3 Jan 2022 23:48:03 +0000 (23:48 +0000)]
sync

2 years agonote the -c runs sh -c; from nabijaczleweli
jmc [Mon, 3 Jan 2022 21:49:37 +0000 (21:49 +0000)]
note the -c runs sh -c; from nabijaczleweli

2 years agoPrefix life time is independent from router life time.
florian [Mon, 3 Jan 2022 16:42:17 +0000 (16:42 +0000)]
Prefix life time is independent from router life time.
Form an IPv6 address even if the router announcing the prefix isn't a
default router.
Problem reported by mgraves AT brainfat.net on misc
OK denis

2 years agoSOCs -> SoCs
visa [Mon, 3 Jan 2022 15:50:16 +0000 (15:50 +0000)]
SOCs -> SoCs

2 years agothe prism54 domain is long abandoned
jsg [Mon, 3 Jan 2022 12:01:32 +0000 (12:01 +0000)]
the prism54 domain is long abandoned
don't give any traffic to whoever registered it afterwards

ok claudio@ stsp@

2 years agoansi
jsg [Mon, 3 Jan 2022 09:48:41 +0000 (09:48 +0000)]
ansi

2 years agoBy default, put intermediate files in a temp dir and remove it on
guenther [Mon, 3 Jan 2022 03:40:48 +0000 (03:40 +0000)]
By default, put intermediate files in a temp dir and remove it on
completion.  To leave files in /tmp, use new -k option.

2 years agoDon't use != 0 to check whether a pointer is non-NULL.
jsg [Mon, 3 Jan 2022 03:06:49 +0000 (03:06 +0000)]
Don't use != 0 to check whether a pointer is non-NULL.

2 years agoreuse gcu(4) comment from GENERIC fixing spelling
jsg [Mon, 3 Jan 2022 02:10:57 +0000 (02:10 +0000)]
reuse gcu(4) comment from GENERIC fixing spelling

2 years agohappend -> happened
jsg [Mon, 3 Jan 2022 00:44:30 +0000 (00:44 +0000)]
happend -> happened

2 years agoapproprate -> appropriate
jsg [Sun, 2 Jan 2022 23:39:48 +0000 (23:39 +0000)]
approprate -> appropriate

2 years agoResore -> Restore
jsg [Sun, 2 Jan 2022 23:34:15 +0000 (23:34 +0000)]
Resore -> Restore

2 years agofirmare -> firmware
jsg [Sun, 2 Jan 2022 23:31:10 +0000 (23:31 +0000)]
firmare -> firmware

2 years agoexcuted -> executed
jsg [Sun, 2 Jan 2022 23:29:12 +0000 (23:29 +0000)]
excuted -> executed

2 years agoPrism54 (only full-mac varients) -> Prism54 Full-MAC
jsg [Sun, 2 Jan 2022 23:14:26 +0000 (23:14 +0000)]
Prism54 (only full-mac varients) -> Prism54 Full-MAC

2 years agoMac -> MAC
jsg [Sun, 2 Jan 2022 23:05:15 +0000 (23:05 +0000)]
Mac -> MAC

2 years agospelling
jsg [Sun, 2 Jan 2022 22:36:03 +0000 (22:36 +0000)]
spelling
ok jmc@ reads ok tb@

2 years agoimmediatly -> immediately
tb [Sun, 2 Jan 2022 21:01:20 +0000 (21:01 +0000)]
immediatly -> immediately

2 years agofix strange indentation in code example
tb [Sun, 2 Jan 2022 21:00:37 +0000 (21:00 +0000)]
fix strange indentation in code example

2 years agoGrab kernel lock when required.
kettenis [Sun, 2 Jan 2022 20:10:24 +0000 (20:10 +0000)]
Grab kernel lock when required.

ok patrick@

2 years agoDon't use != 0 to check whether a pointer is non-NULL.
kettenis [Sun, 2 Jan 2022 20:00:21 +0000 (20:00 +0000)]
Don't use != 0 to check whether a pointer is non-NULL.

2 years agoStop writing big-endian checksums into the little-endian GPT
krw [Sun, 2 Jan 2022 17:26:14 +0000 (17:26 +0000)]
Stop writing big-endian checksums into the little-endian GPT
header fields gh_csum and gh_part_csum.

Constrain kernel to accepting only correct little-endian
checksums.

Temporarily allow fdisk(8) to read either endian GPTs so that
big-endian GPTs can be made correct by a simple 'fdisk -e' &&
'w'.

Fixes inter-architecture, inter-OS GPT portability and GPT
fdisk(8) on big-endian architectures. Broken since initial GPT
implementation.

Suggestions and ok kettenis@

2 years agopriviledged -> privileged
jsg [Sun, 2 Jan 2022 06:16:08 +0000 (06:16 +0000)]
priviledged -> privileged

2 years agopriveledged -> privileged
jsg [Sun, 2 Jan 2022 05:59:53 +0000 (05:59 +0000)]
priveledged -> privileged

2 years agoconvension -> convention
jsg [Sun, 2 Jan 2022 05:49:50 +0000 (05:49 +0000)]
convension -> convention

2 years agoNummber -> Number
jsg [Sun, 2 Jan 2022 05:40:06 +0000 (05:40 +0000)]
Nummber -> Number

2 years agonumers -> numbers
jsg [Sun, 2 Jan 2022 05:37:19 +0000 (05:37 +0000)]
numers -> numbers

2 years agocontoller -> controller
jsg [Sun, 2 Jan 2022 05:32:00 +0000 (05:32 +0000)]
contoller -> controller

2 years agophsyaddr -> physaddr
jsg [Sun, 2 Jan 2022 05:30:07 +0000 (05:30 +0000)]
phsyaddr -> physaddr

2 years agospelling
jsg [Sun, 2 Jan 2022 05:00:28 +0000 (05:00 +0000)]
spelling

2 years agoaddres -> address
jsg [Sun, 2 Jan 2022 03:41:08 +0000 (03:41 +0000)]
addres -> address

2 years agounhandle -> unhandled
jsg [Sun, 2 Jan 2022 02:31:08 +0000 (02:31 +0000)]
unhandle -> unhandled

2 years agoslignment -> alignment
jsg [Sun, 2 Jan 2022 02:26:50 +0000 (02:26 +0000)]
slignment -> alignment

2 years agopreferense -> preference
jsg [Sun, 2 Jan 2022 02:13:33 +0000 (02:13 +0000)]
preferense -> preference

2 years agoplaform -> platform
jsg [Sun, 2 Jan 2022 01:59:42 +0000 (01:59 +0000)]
plaform -> platform

2 years agoDon't use *ENTRY_NB() with END_BUILTIN(), at least yet
guenther [Sun, 2 Jan 2022 01:20:25 +0000 (01:20 +0000)]
Don't use *ENTRY_NB() with END_BUILTIN(), at least yet

Problem noted by naddy@

2 years agoestablush -> establish
jsg [Sun, 2 Jan 2022 01:01:04 +0000 (01:01 +0000)]
establush -> establish

2 years agoAdd ENTRY_NB() macro for doing an ASM function entry without setting
guenther [Sat, 1 Jan 2022 23:47:14 +0000 (23:47 +0000)]
Add ENTRY_NB() macro for doing an ASM function entry without setting
the binding to global (NB == "no binding"), as clang 13 is now
warning about changing the binding from global to weak.

This first pass does amd64 and sparc64 and pulls DEFS.h out of the
per-arch directory to a common directory; others to follow

ok kettenis@

2 years agoRevert the hack for Apple M1 systems.
kettenis [Sat, 1 Jan 2022 18:54:09 +0000 (18:54 +0000)]
Revert the hack for Apple M1 systems.

ok patrick@

2 years agoRewrite the kernel FPU handling code. The new code saves the FPU state
kettenis [Sat, 1 Jan 2022 18:52:36 +0000 (18:52 +0000)]
Rewrite the kernel FPU handling code.  The new code saves the FPU state
in cpu_switch() instead of at the kernel edge and gets rid of the FPU
state tracking in struct cpu_info and struct pcb.  This fixes the random
crashes seen with SMP kernels on Apple M1.

ok patrick@

2 years agoUse correct defines for random seed magic/length.
patrick [Sat, 1 Jan 2022 18:52:26 +0000 (18:52 +0000)]
Use correct defines for random seed magic/length.

Spotted by Andreas Schnebinger

2 years agouniq(1): miscellaneous style(9)-ish stuff
cheloha [Sat, 1 Jan 2022 18:20:52 +0000 (18:20 +0000)]
uniq(1): miscellaneous style(9)-ish stuff

- Include what you use:
  + Add <strings.h> for strcasecmp(3).
  + Drop <errno.h>, unused.
- Pull the "errstr" declaration out of the getopt(3) loop
  up to the top of main().
- Align the strtonum(3) error messages with the argument
  names in the uniq.1 manpage and the usage string.  They
  are referred to as "chars" and "fields".
- Trim some whitespace.
- Return from main() instead of exit(3).
- De-(void) fprintf(3).
- Prefer getprogname(3) to __progname.

2 years agouniq(1): bump numchars, numfields from int to long long
cheloha [Sat, 1 Jan 2022 17:44:18 +0000 (17:44 +0000)]
uniq(1): bump numchars, numfields from int to long long

Also bump repeats from int to unsigned long long.

While here, don't cast the result of strtonum() and unwrap some lines.

2 years agoRemove unused function prototype.
kettenis [Sat, 1 Jan 2022 14:18:39 +0000 (14:18 +0000)]
Remove unused function prototype.

2 years agoAdd missing locking to pmap_extract(9) and pmap_unwire(9).
kettenis [Sat, 1 Jan 2022 11:45:35 +0000 (11:45 +0000)]
Add missing locking to pmap_extract(9) and pmap_unwire(9).

ok patrick@, mpi@

2 years agoMultiprocol -> Multiprotocol
jsg [Sat, 1 Jan 2022 08:10:29 +0000 (08:10 +0000)]
Multiprocol -> Multiprotocol

2 years agoIdentifiier -> Identifier
jsg [Sat, 1 Jan 2022 08:01:27 +0000 (08:01 +0000)]
Identifiier -> Identifier

2 years agocopyright++;
jsg [Sat, 1 Jan 2022 07:00:57 +0000 (07:00 +0000)]
copyright++;

2 years agospelling
jsg [Sat, 1 Jan 2022 05:55:06 +0000 (05:55 +0000)]
spelling

2 years agofix memleak in process_extension(); oss-fuzz issue #42719
djm [Sat, 1 Jan 2022 04:18:06 +0000 (04:18 +0000)]
fix memleak in process_extension(); oss-fuzz issue #42719

2 years agoeascape -> escape
jsg [Sat, 1 Jan 2022 03:59:22 +0000 (03:59 +0000)]
eascape -> escape

2 years agoapprociate -> appropriate
jsg [Sat, 1 Jan 2022 03:57:20 +0000 (03:57 +0000)]
approciate -> appropriate

2 years agofailured -> failed
jsg [Sat, 1 Jan 2022 02:44:22 +0000 (02:44 +0000)]
failured -> failed

2 years agouniq(1): freopen(3) stdin, stdout
cheloha [Sat, 1 Jan 2022 02:20:38 +0000 (02:20 +0000)]
uniq(1): freopen(3) stdin, stdout

uniq(1) defaults to stdin and stdout, has exactly one input and one
output, and permits the user to replace the default input and/or the
default output with a given file.

freopen(3) is the right idiom in this context.  Get rid of file() and
the extra FILE pointers.  Switch from fprintf(3) to printf(3).

While here, const the "str" argument to show().

Thread: https://marc.info/?l=openbsd-tech&m=164078603312936&w=2

ok millert@

2 years agocontibutions -> contributions
jsg [Sat, 1 Jan 2022 02:18:28 +0000 (02:18 +0000)]
contibutions -> contributions

2 years agoidentfier -> identifier
jsg [Sat, 1 Jan 2022 02:06:07 +0000 (02:06 +0000)]
identfier -> identifier

2 years agospelling
jsg [Sat, 1 Jan 2022 01:55:30 +0000 (01:55 +0000)]
spelling
ok dtucker@

2 years agospelling
jsg [Fri, 31 Dec 2021 23:19:50 +0000 (23:19 +0000)]
spelling
ok ratchov@

2 years agoexcpetions -> exceptions
jsg [Fri, 31 Dec 2021 22:40:40 +0000 (22:40 +0000)]
excpetions -> exceptions

2 years agodeafult -> default
jsg [Fri, 31 Dec 2021 22:38:01 +0000 (22:38 +0000)]
deafult -> default

2 years agoTry to turn on less-capable mouse modes when turning on more-capable, to
nicm [Fri, 31 Dec 2021 11:35:49 +0000 (11:35 +0000)]
Try to turn on less-capable mouse modes when turning on more-capable, to
increase the chances we get something even if the terminal doesn't support
the one we really want. GitHub issue 3020.

2 years agoInterrups -> Interrupts
jsg [Fri, 31 Dec 2021 11:24:24 +0000 (11:24 +0000)]
Interrups -> Interrupts

2 years agoAdd missing locking to pmap_extract(9) and pmap_unwire(9).
kettenis [Fri, 31 Dec 2021 11:21:45 +0000 (11:21 +0000)]
Add missing locking to pmap_extract(9) and pmap_unwire(9).

ok patrick@, mpi@

2 years agoavaialble -> available
jsg [Fri, 31 Dec 2021 10:44:05 +0000 (10:44 +0000)]
avaialble -> available

2 years agospecifed -> specified
jsg [Fri, 31 Dec 2021 10:40:30 +0000 (10:40 +0000)]
specifed -> specified

2 years agoNewer Apple firmware on chipsets without a hardware RNG require the host to
patrick [Fri, 31 Dec 2021 09:24:18 +0000 (09:24 +0000)]
Newer Apple firmware on chipsets without a hardware RNG require the host to
provide a buffer of random bytes to the device on initialization.

2 years agoFix up handling of IFF_ALLMULTI and call uaq_iff() from uaq_init().
jmatthew [Fri, 31 Dec 2021 08:15:47 +0000 (08:15 +0000)]
Fix up handling of IFF_ALLMULTI and call uaq_iff() from uaq_init().

from Brad

2 years agotypo: p5-Socket-SSL -> p5-IO-Socket-SSL
dv [Thu, 30 Dec 2021 20:51:34 +0000 (20:51 +0000)]
typo: p5-Socket-SSL -> p5-IO-Socket-SSL
ok kn@

2 years agorelayd(8): don't create sockets between CAs and RELAYs.
dv [Thu, 30 Dec 2021 20:38:43 +0000 (20:38 +0000)]
relayd(8): don't create sockets between CAs and RELAYs.

CA and RELAY process types don't need to communicate with other CA
or RELAY processes respectively, so don't create and distribute ipc
socketpairs.

Tested by and ok denis@

2 years agoAdd Xiaomi MiniWif to list of devices supported by mtw(4).
kevlo [Thu, 30 Dec 2021 15:09:49 +0000 (15:09 +0000)]
Add Xiaomi MiniWif to list of devices supported by mtw(4).
Works for me on amd64.

ok hastings@

2 years agoUse a distinct variable while iterating the list of existing devices.
anton [Thu, 30 Dec 2021 14:25:39 +0000 (14:25 +0000)]
Use a distinct variable while iterating the list of existing devices.

ok mvs@

Reported-by: syzbot+e2d1df67f742a5a47938@syzkaller.appspotmail.com
Reported-by: syzbot+72298724beda82ec8e7f@syzkaller.appspotmail.com
2 years agoSync from libc: Use _MAX_PAGE_SHIFT, rather than #ifdef mips64
guenther [Thu, 30 Dec 2021 08:39:19 +0000 (08:39 +0000)]
Sync from libc: Use _MAX_PAGE_SHIFT, rather than #ifdef mips64

ok otto@

2 years agoSync rcexec with reality.
ajacoutot [Thu, 30 Dec 2021 08:14:29 +0000 (08:14 +0000)]
Sync rcexec with reality.

2 years agoAdd back support for -B net -b bsd.rd which emulates a PXE install and
claudio [Thu, 30 Dec 2021 08:12:23 +0000 (08:12 +0000)]
Add back support for -B net -b bsd.rd which emulates a PXE install and
results in an autoinstall. This can be used to quickly create new OpenBSD
installs.
OK dv@

2 years agominor tweak
anton [Thu, 30 Dec 2021 06:55:37 +0000 (06:55 +0000)]
minor tweak

2 years agoPrevent a double free by assigning the new keymap and corresponding size
anton [Thu, 30 Dec 2021 06:55:11 +0000 (06:55 +0000)]
Prevent a double free by assigning the new keymap and corresponding size
after the allocation and initialization is done. Otherwise, a race is
possible if malloc ends up sleeping.

ok sashan@

Reported-by: syzbot+7f8224e9f1a3487caf25@syzkaller.appspotmail.com
2 years agoDelete dead (duplicate) test
guenther [Thu, 30 Dec 2021 04:48:13 +0000 (04:48 +0000)]
Delete dead (duplicate) test

2 years agoPrevent concurrent access to incomplete or dying `sc' caused by sleep
mvs [Thu, 30 Dec 2021 00:49:41 +0000 (00:49 +0000)]
Prevent concurrent access to incomplete or dying `sc' caused by sleep
points in pppacopen() and pppacclose() paths. Use the same "sc_ready"
logic we use for 'pppx_if' structure.

Reported-by: syzbot+a7ac144b48f7f471f689@syzkaller.appspotmail.com
ok anton@ dlg@

2 years agocombine ifdef blocks
jsg [Thu, 30 Dec 2021 00:25:41 +0000 (00:25 +0000)]
combine ifdef blocks
from Ted Bullock

2 years agoPlug memleaks
tb [Wed, 29 Dec 2021 23:04:12 +0000 (23:04 +0000)]
Plug memleaks

CID 345150

2 years agoPlug memleak
tb [Wed, 29 Dec 2021 23:02:52 +0000 (23:02 +0000)]
Plug memleak

CID 345156

2 years agoMore EVP_* return value checks
tb [Wed, 29 Dec 2021 23:02:00 +0000 (23:02 +0000)]
More EVP_* return value checks

CID 345152

2 years agoRemove redundant NULL checks
tb [Wed, 29 Dec 2021 23:00:32 +0000 (23:00 +0000)]
Remove redundant NULL checks

CID 345154

2 years agoMinor cleanup after EC_POINT_get_affine_coordinates() unified the
tb [Wed, 29 Dec 2021 22:58:40 +0000 (22:58 +0000)]
Minor cleanup after EC_POINT_get_affine_coordinates() unified the
_GFp and _GF2m variants.

CID 345155

2 years agoMore return value checks for EVP_* API
tb [Wed, 29 Dec 2021 22:56:25 +0000 (22:56 +0000)]
More return value checks for EVP_* API

CID 345159

2 years agoCheck return values of EVP_* API
tb [Wed, 29 Dec 2021 22:54:41 +0000 (22:54 +0000)]
Check return values of EVP_* API

CID 345158

2 years agoknfmt makes this slightly nicer.
tb [Wed, 29 Dec 2021 22:53:04 +0000 (22:53 +0000)]
knfmt makes this slightly nicer.

2 years agoOne more leak of the same kind
tb [Wed, 29 Dec 2021 22:50:30 +0000 (22:50 +0000)]
One more leak of the same kind

2 years agoPlug memleak
tb [Wed, 29 Dec 2021 22:49:23 +0000 (22:49 +0000)]
Plug memleak

CID 345160

2 years agoSet failed in test_random_points()
tb [Wed, 29 Dec 2021 22:48:09 +0000 (22:48 +0000)]
Set failed in test_random_points()

CID 345141

2 years agomake the argument name for veb's "child-iface" consistent;
jmc [Wed, 29 Dec 2021 21:41:28 +0000 (21:41 +0000)]
make the argument name for veb's "child-iface" consistent;
from caspar schutijser

2 years agoConsistently name page argument `pg'.
mpi [Wed, 29 Dec 2021 20:22:06 +0000 (20:22 +0000)]
Consistently name page argument `pg'.

Reduce differences with NetBSD, no functional changes.

2 years agoAdd regress tests for grep -A, -B and -C flags
sdk [Wed, 29 Dec 2021 19:31:01 +0000 (19:31 +0000)]
Add regress tests for grep -A, -B and -C flags

ok otto@

2 years agoPHYs that we want to talk to over SGMII need to be switched into SGMII
patrick [Wed, 29 Dec 2021 18:48:45 +0000 (18:48 +0000)]
PHYs that we want to talk to over SGMII need to be switched into SGMII
mode for the link to go up.  This is relevant on RJ45 SFPs.

ok sthen@