openbsd
2 years agoUse installboot -p in install.md for macppc, powerpc64
gkoehler [Sun, 11 Sep 2022 04:38:28 +0000 (04:38 +0000)]
Use installboot -p in install.md for macppc, powerpc64

ok kn@

2 years agoRemove pmap_collect() when a no-op, define __HAVE_PMAP_COLLECT otherwise.
miod [Sat, 10 Sep 2022 20:35:28 +0000 (20:35 +0000)]
Remove pmap_collect() when a no-op, define __HAVE_PMAP_COLLECT otherwise.
Use that define to shunt uvm_swapout_threads(), which is a noop when
pmap_collect() does nothing.

ok mpi@

2 years agoIncrement the input and output position for EVP AES CFB1.
jsing [Sat, 10 Sep 2022 17:45:10 +0000 (17:45 +0000)]
Increment the input and output position for EVP AES CFB1.

The length is decremented, however the input is repeatedly read from and
output written to the same position. Correct this by actually incrementing
the input and output pointers.

Found via OpenSSL 604e591ed7,

ok tb@

2 years agoUse correct length for EVP CFB mode ciphers.
jsing [Sat, 10 Sep 2022 17:39:47 +0000 (17:39 +0000)]
Use correct length for EVP CFB mode ciphers.

The BLOCK_CIPHER_* macros contained a bug where the total length is passed
to the underlying cipher implementation, rather than the length of the
current chunk. Correct this and use the chunk length instead.

Should address the remaining issues reported by Coverity.

ok tb@

2 years agoUse correct option name.
nicm [Sat, 10 Sep 2022 17:01:33 +0000 (17:01 +0000)]
Use correct option name.

2 years agotop(1): remove last vestiges of "last pid" support
cheloha [Sat, 10 Sep 2022 16:58:51 +0000 (16:58 +0000)]
top(1): remove last vestiges of "last pid" support

millert@ removed most of the "last pid" support from top(1) in 1997.
See, e.g. top/machine.c,v1.7:

http://cvsweb.openbsd.org/src/usr.bin/top/machine.c?rev=1.7&content-type=text/x-cvsweb-markup

Let's remove the rest of it:

- Eliminate system_info.last_pid.

- Remove mpid parameter and "last pid" printing code from i_loadave().

Link: https://marc.info/?l=openbsd-tech&m=166277253606823&w=2
ok millert@

2 years agoGet rid of the extra vnode reference known as UVM_VNODE_CANPERSIST.
mpi [Sat, 10 Sep 2022 16:14:36 +0000 (16:14 +0000)]
Get rid of the extra vnode reference known as UVM_VNODE_CANPERSIST.

Back in the 4.4BSD days the VM subystem had a OBJ_CANPERSIST flag to
enter objects in a global cached list.  Some of this logic seem to have
been copied to UVM but without the global list.

Unfortunately keeping UVM vnode objects alive after munmap(2)ing the
corresponding region without incrementing the reference count of the
related vnode led to many bugs when the vnode was recycled and/or when
it data where written back to disk (via the page daemon).

The problem is that VM pages might have a non-accounted reference to a
vnode via `pg->uobject'.

Fix "vref used where vget required" panic reported by bluhm@, gkoehler@
and Andrew Krasavinseen on bugs@.

Thanks a lot to semarie@ for co-debugging this issue!

Tested by bluhm@, tb@, miod@.

ok kettenis@, semarie@

2 years agoUse CBS to parse TLS alerts in the legacy stack.
jsing [Sat, 10 Sep 2022 15:37:13 +0000 (15:37 +0000)]
Use CBS to parse TLS alerts in the legacy stack.

ok tb@

2 years agoProvide a version of ssl_msg_callback() that takes a CBS.
jsing [Sat, 10 Sep 2022 15:29:33 +0000 (15:29 +0000)]
Provide a version of ssl_msg_callback() that takes a CBS.

Use this from the TLSv1.3 code.

ok tb@

2 years agoAdd another pin to the SC7180 map function.
kettenis [Sat, 10 Sep 2022 14:32:53 +0000 (14:32 +0000)]
Add another pin to the SC7180 map function.

2 years agoDon't restrict GPIO events to pin numbers below 256. With the _EVT()
kettenis [Sat, 10 Sep 2022 13:18:31 +0000 (13:18 +0000)]
Don't restrict GPIO events to pin numbers below 256.  With the _EVT()
method events corresponding to larger numbers are possible.

Fixes lid state detection on the x13s.

ok patrick@

2 years agoGeneralize the code such that it works on SC7180 SoCs as well.
kettenis [Sat, 10 Sep 2022 13:14:39 +0000 (13:14 +0000)]
Generalize the code such that it works on SC7180 SoCs as well.

ok mglocker@, patrick@

2 years agoAdd _HID for SC7180 SoCs.
kettenis [Sat, 10 Sep 2022 13:05:41 +0000 (13:05 +0000)]
Add _HID for SC7180 SoCs.

ok mglocker@

2 years agocarrier return character -> carriage return character
jsg [Sat, 10 Sep 2022 12:36:18 +0000 (12:36 +0000)]
carrier return character -> carriage return character
ok jmc@ miod@

2 years agofix repeated words
jsg [Sat, 10 Sep 2022 10:22:46 +0000 (10:22 +0000)]
fix repeated words
ok ok miod@ ack ack jmc@

2 years agoThinkpad -> ThinkPad
jsg [Sat, 10 Sep 2022 10:10:29 +0000 (10:10 +0000)]
Thinkpad -> ThinkPad

2 years agoapm(1): Display unknown recharge time estimate instead of -1
sdk [Sat, 10 Sep 2022 10:10:09 +0000 (10:10 +0000)]
apm(1): Display unknown recharge time estimate instead of -1

OK miod@

2 years agoSocs -> SoCs
jsg [Sat, 10 Sep 2022 10:07:44 +0000 (10:07 +0000)]
Socs -> SoCs

2 years agodupex -> duplex
jsg [Sat, 10 Sep 2022 10:06:08 +0000 (10:06 +0000)]
dupex -> duplex

2 years agowireless LANS -> wireless LANs
jsg [Sat, 10 Sep 2022 10:01:54 +0000 (10:01 +0000)]
wireless LANS -> wireless LANs

2 years agofix repeated words
jsg [Sat, 10 Sep 2022 08:50:53 +0000 (08:50 +0000)]
fix repeated words
ok miod@ jmc@

2 years agoremove apostrophe on possesive its
jsg [Sat, 10 Sep 2022 08:18:06 +0000 (08:18 +0000)]
remove apostrophe on possesive its
ok jmc@

2 years agoFinally, only allocate the number of frames for isoc transfers which we
mglocker [Sat, 10 Sep 2022 08:13:16 +0000 (08:13 +0000)]
Finally, only allocate the number of frames for isoc transfers which we
really need.  The static allocation workaround in the code
(DWC2_MAXISOCPACKETS) was required because the NetBSD allocx USB method
has a second argument to pass nframes already there, which we don't
have.

Regression tested with video play, audio play, audio record.

ok mpi@

2 years agoAdd EABI strong aliases for __fixunssfdi and __fixunsdfdi added recently on
miod [Sat, 10 Sep 2022 06:48:31 +0000 (06:48 +0000)]
Add EABI strong aliases for __fixunssfdi and __fixunsdfdi added recently on
armv7; ok mbuhl@

2 years agoPACKAGES_REPOSITORY -> PACKAGE_REPOSITORY; from john verne
jmc [Sat, 10 Sep 2022 05:50:40 +0000 (05:50 +0000)]
PACKAGES_REPOSITORY -> PACKAGE_REPOSITORY; from john verne

2 years agoamd64, i386: lapic_initclocks: install i8254 before lapic_startclock()
cheloha [Sat, 10 Sep 2022 01:30:14 +0000 (01:30 +0000)]
amd64, i386: lapic_initclocks: install i8254 before lapic_startclock()

In the future, the clock interrupt code will need a working
timecounter to do its job.  In lapic_initclocks(), call
i8254_inittimecounter_simple() before lapic_startclock().

The i8254 may be be a piece of junk, but one timecounter is better
than none.

2 years agoinit(8): fix signal handler boolean type and qualifier
cheloha [Sat, 10 Sep 2022 00:49:47 +0000 (00:49 +0000)]
init(8): fix signal handler boolean type and qualifier

The variable "clang" is modified from a signal handler.  Change it
from an 'int' to a 'sig_atomic_t' and mark it 'volatile', as we
recommend in signal(3).

ok millert@ kn@

2 years agoLet pool_get(9) do the memory initialisation directly.
mglocker [Fri, 9 Sep 2022 21:16:54 +0000 (21:16 +0000)]
Let pool_get(9) do the memory initialisation directly.

ok kettenis@

2 years agoRecognize Qualcomm Krys 400 series cores.
kettenis [Fri, 9 Sep 2022 18:15:30 +0000 (18:15 +0000)]
Recognize Qualcomm Krys 400 series cores.

ok jsg@

2 years agoadd recvmmsg to NAME;
jmc [Fri, 9 Sep 2022 16:48:25 +0000 (16:48 +0000)]
add recvmmsg to NAME;

2 years agoReflect script failure in exit code
kn [Fri, 9 Sep 2022 15:53:16 +0000 (15:53 +0000)]
Reflect script failure in exit code

installboot(8) runs newfs(8) and fsck(8) via system(3) but only checks
failures of the function itself, always returning zero no matter what the
programs/shell returned.

This is bad for regress tests relying on correct return codes.

create_filesystem() itself must not exit as write_filesystem() calls it and
cleans up temporary files upon failure.

Make it return -1 if the script returned non-zero so write_filesystem()
handles it as error, cleans up and makes installboot exit 1.

Stop ignoring create_filesystem()'s return code in md_prepareboot() and
exit the same way.

Here's the change in behaviour on arm64 (newfs fails because of the
vnd/disklabel race, see "Race in disk_attach_callback?" on tech@):

# installboot -vp vnd0 ; echo $?
newfsing 6694ae5b0d7596ed.i
newfs_msdos: /dev/r6694ae5b0d7596ed.i: No such file or directory
0
# ./obj/installboot -vp vnd0 ; echo $?
newfsing 6694ae5b0d7596ed.i
newfs_msdos: /dev/r6694ae5b0d7596ed.i: No such file or directory
1

Tested on amd64 arm64 macppc octeon powerpc64 sparc64
OK millert

2 years agosync
mbuhl [Fri, 9 Sep 2022 13:54:58 +0000 (13:54 +0000)]
sync

2 years agoAdd libc wrappers for the new sendmmsg and recvmmsg system calls.
mbuhl [Fri, 9 Sep 2022 13:52:59 +0000 (13:52 +0000)]
Add libc wrappers for the new sendmmsg and recvmmsg system calls.
Feedback tb@, miod@, jca@
OK jca@

2 years agoImplement the F_SHORTER filter by doing explicit lookups for each possible
claudio [Fri, 9 Sep 2022 13:33:24 +0000 (13:33 +0000)]
Implement the F_SHORTER filter by doing explicit lookups for each possible
prefixlen. Even for IPv6 this is much faster than a full table walk.
OK tb@

2 years agoAdd mips64/octeon bits
kn [Fri, 9 Sep 2022 12:55:43 +0000 (12:55 +0000)]
Add mips64/octeon bits

Still fails due to the disklabel/vnd kernel race but running into failing
'installboot -p' helps exercising the fsck/newfs exit code fix.

REGRESS_EXIT_EARLY=1 runs past the prepare target without the diff but
properly stops with it as installboot now exits 1 if system(3) fails.

2 years agoClarify/typofix comments
kn [Fri, 9 Sep 2022 12:05:52 +0000 (12:05 +0000)]
Clarify/typofix comments

OpenBSD is not FreeBSD and has no stf(4) interface.

No object change.

2 years agoAdd message-line option to control where message and prompt go, from
nicm [Fri, 9 Sep 2022 11:02:23 +0000 (11:02 +0000)]
Add message-line option to control where message and prompt go, from
Varun Kumar E in GitHub issue 3324.

2 years agoBump version to 8.0
claudio [Fri, 9 Sep 2022 10:23:17 +0000 (10:23 +0000)]
Bump version to 8.0

2 years agoThe DSDT on the snapdragon 7c based Acer Aspire 1 (A114-61) uses a bogus
kettenis [Fri, 9 Sep 2022 08:30:32 +0000 (08:30 +0000)]
The DSDT on the snapdragon 7c based Acer Aspire 1 (A114-61) uses a bogus
compatible ID.  Add its hardware ID to the list to work around this.

ok patrick@, mlarkin@, mglocker@

2 years agosync
sthen [Fri, 9 Sep 2022 08:28:58 +0000 (08:28 +0000)]
sync

2 years agoAdjust chunked encoding handling.
claudio [Fri, 9 Sep 2022 08:11:06 +0000 (08:11 +0000)]
Adjust chunked encoding handling.

Add an extra state to distinguish in between chunks CRLF handling from
the last chunk which can optionally have some trailer fields included.
rpki-client ignores these trailer header fields (they are also not common
it seems).
Also remove the empty line handling in http_parse_chunked() for explicit
checks in http_read(). Because of the extra state the switch back to
non-chunked mode can now be delayed until the transfer is over.

OK tb@

2 years agodrm/i915: Skip wm/ddb readout for disabled pipes
jsg [Fri, 9 Sep 2022 04:42:06 +0000 (04:42 +0000)]
drm/i915: Skip wm/ddb readout for disabled pipes

From Ville Syrjala
1787ec7dcc3761e040d0cd9896d3a40b4efac4cf in linux 5.15.y/5.15.66
0211c2a0ea600e25db3044daaeff4fe41c3ed6d9 in mainline linux

2 years agodrm/i915/glk: ECS Liva Q2 needs GLK HDMI port timing quirk
jsg [Fri, 9 Sep 2022 04:40:13 +0000 (04:40 +0000)]
drm/i915/glk: ECS Liva Q2 needs GLK HDMI port timing quirk

From Diego Santa Cruz
f9a0f49be767a45aa1dc7d846a2745bb7849268a in linux 5.15.y/5.15.66
919bef7a106ade2bda73681bbc2f3678198f44fc in mainline linux

2 years agodrm/i915/reg: Fix spelling mistake "Unsupport" -> "Unsupported"
jsg [Fri, 9 Sep 2022 04:37:43 +0000 (04:37 +0000)]
drm/i915/reg: Fix spelling mistake "Unsupport" -> "Unsupported"

From Colin Ian King
0522550aeed4ec899d16e237be0ae67f8aa1319b in linux 5.15.y/5.15.66
233f56745be446b289edac2ba8184c09365c005e in mainline linux

2 years agodrm/i915/display: avoid warnings when registering dual panel backlight
jsg [Fri, 9 Sep 2022 04:36:03 +0000 (04:36 +0000)]
drm/i915/display: avoid warnings when registering dual panel backlight

From Arun R Murthy
7828b5d0080a4621973ab5c680c4df0bc6d96437 in linux 5.15.y/5.15.66
868e8e5156a1f8d92ca83fdbac6fd52798650792 in mainline linux

2 years agoadd backlight_device_get_by_name() used by 5.15.66 drm
jsg [Fri, 9 Sep 2022 04:32:55 +0000 (04:32 +0000)]
add backlight_device_get_by_name() used by 5.15.66 drm

2 years agodrm/i915/backlight: extract backlight code to a separate file
jsg [Fri, 9 Sep 2022 04:29:11 +0000 (04:29 +0000)]
drm/i915/backlight: extract backlight code to a separate file

From Jani Nikula
630ab29120b5dd1c543150da5e1aa304a5aece2e in linux 5.15.y/5.15.66
6cc42fbeb150ff33b17cbf108713ca4be23994d8 in mainline linux

2 years agonotifier_complete(NULL, ...) is a noop, so no need to test
djm [Fri, 9 Sep 2022 03:31:42 +0000 (03:31 +0000)]
notifier_complete(NULL, ...) is a noop, so no need to test
that ctx!=NULL; from Corinna Vinschen

2 years agoThere is no need to uncomment the clock gating exit/enter gadget functions,
mglocker [Thu, 8 Sep 2022 19:32:54 +0000 (19:32 +0000)]
There is no need to uncomment the clock gating exit/enter gadget functions,
since we define them void anyway.

2 years agoThe SC7180 (snapdragon 7c) needs the SMMU quirk as well.
kettenis [Thu, 8 Sep 2022 19:30:05 +0000 (19:30 +0000)]
The SC7180 (snapdragon 7c) needs the SMMU quirk as well.
It seems reasonable that SC8180X/XP needs the quirk too, so preemtively
add these to the list as well.

ok patrick@

2 years agoThere is no need to uncomment the call_gadget macro, since in our driver
mglocker [Thu, 8 Sep 2022 19:18:46 +0000 (19:18 +0000)]
There is no need to uncomment the call_gadget macro, since in our driver
it's getting defined void anyway.

2 years agoZap inactive gadget functions.
mglocker [Thu, 8 Sep 2022 19:02:04 +0000 (19:02 +0000)]
Zap inactive gadget functions.

2 years agoMove bitmap functions to a new home.
mglocker [Thu, 8 Sep 2022 18:16:26 +0000 (18:16 +0000)]
Move bitmap functions to a new home.

ok kettenis@

2 years agoRemove old debug code knobs, wrong comments, and unused pv entry flags.
miod [Thu, 8 Sep 2022 17:44:48 +0000 (17:44 +0000)]
Remove old debug code knobs, wrong comments, and unused pv entry flags.
ok kettenis@

2 years agoSupport the sendmmsg and recvmmsg system calls.
mbuhl [Thu, 8 Sep 2022 16:04:31 +0000 (16:04 +0000)]
Support the sendmmsg and recvmmsg system calls.
Input guenther@
OK bluhm@

2 years agossl_cipher_process_rulestr: return early if a cipher command is invalid
millert [Thu, 8 Sep 2022 15:31:12 +0000 (15:31 +0000)]
ssl_cipher_process_rulestr: return early if a cipher command is invalid
This is a safer fix for the bug where we might read outside rule_str
buffer and is how BoringSSL fixed it.  OK tb@

2 years agoIn http_get_line() additionally strip any trailing space or tab from lines.
claudio [Thu, 8 Sep 2022 13:52:36 +0000 (13:52 +0000)]
In http_get_line() additionally strip any trailing space or tab from lines.
In many places the HTTP allows for extra spaces which need to be ignored.
Similar the chunked encoding extensions are separated from the chunk size
by a ':' but the spec also allows for bad whitespaces in all shapes and
forms. Adjust the logic in http_parse_chunked() to stop when the first
space, tab or ':' is seen. There is no need to check for newlines since
those are stripped by http_get_line().
OK tb@

2 years agoRemove useless -t
kn [Thu, 8 Sep 2022 13:18:47 +0000 (13:18 +0000)]
Remove useless -t

"Make if.c kvm free by fetching the interface stats via sysctl ..."
if.c r1.56 in 2008 neutered the -d and -t flags.

-d functionality was eventually restored with if.c r1.76 in 2015.

-t has been printing zeroes for over fourteen now; this cannot have been
useful to anyone and noone complained about a wrong watchdog timer values.

Remove -t entirely without printing a warning;  `netstat -t ...' now fails.

Feedback jsg
OK jsg bluhm

2 years ago_rc_quirks is only called by _rc_parse_conf, so just merge the two.
ajacoutot [Thu, 8 Sep 2022 13:17:30 +0000 (13:17 +0000)]
_rc_quirks is only called by _rc_parse_conf, so just merge the two.

ok robert@ sthen@ kn@

2 years agoinitialise inteldrm device params from module params
jsg [Thu, 8 Sep 2022 11:30:32 +0000 (11:30 +0000)]
initialise inteldrm device params from module params

In inteldrm_attach() we need to call i915_params_copy().
Matching the changes made to i915_driver_create() in
linux 8a25c4be583d8a9e38fbadcc49d4de32b1aa8906 (5.10)
drm/i915/params: switch to device specific parameters

This makes DisplayPort MST work again as the value of
enable_dp_mst changes from false to true.

Set enable_guc as 0 as I suspect that needs more work.
Set request_timeout_ms to 0 as otherwise I see
"Fence expiration time out" running Xorg on Broadwell.

Problem reported and debugged by Paul Kelly.

2 years agoAdjust HTTP header parsing to follow RFC more closely.
claudio [Thu, 8 Sep 2022 11:12:44 +0000 (11:12 +0000)]
Adjust HTTP header parsing to follow RFC more closely.

RFC9112 allows any amount of space/tabs between the ':' and the value.
Until now this code required exactly one space which works most of the
time but is not RFC compliant.
OK djm@

2 years agoRename global ifnet TAILQ
kn [Thu, 8 Sep 2022 10:22:05 +0000 (10:22 +0000)]
Rename global ifnet TAILQ

Naming the list like the struct itself makes for awful grepping.
Call the global variable "ifnetlist" from now on.

There used to be kvm(3) consumers in base picking up this symbol, but those
have long been converted to other interfaces.

A few potential ports users remain, same deal as sys/net/if_var.h r1.116
"Remove struct ifnet's unused if_switchport member":  they get bumped.

Previous users pointed out by deraadt
OK bluhm

2 years agoRemove vm_page_md fields which were only needed for pre-v7 arm ports.
miod [Thu, 8 Sep 2022 10:21:45 +0000 (10:21 +0000)]
Remove vm_page_md fields which were only needed for pre-v7 arm ports.

2 years agoAdjust HTTP header parsing to follow RFC more closely.
claudio [Thu, 8 Sep 2022 09:48:02 +0000 (09:48 +0000)]
Adjust HTTP header parsing to follow RFC more closely.

RFC9112 allows any amount of space/tabs between the ':' and the value.
Until now this code required exactly one space which works most of the
time but is not RFC compliant.
Problem reported by Ties de Kock (tdekock (at) ripe.net)
OK tb@

2 years agoUse generic PNP ID to match HID-over-I2C devices.
kettenis [Thu, 8 Sep 2022 06:33:45 +0000 (06:33 +0000)]
Use generic PNP ID to match HID-over-I2C devices.

ok patrick@, drahn@

2 years agoAdd a few more pin mappings based on what is in some Linux device tree
kettenis [Thu, 8 Sep 2022 06:32:32 +0000 (06:32 +0000)]
Add a few more pin mappings based on what is in some Linux device tree
updates that are floating around.  Remove some #ifdef'ed out debug code
that was left behind.

ok patrick@, drahn@

2 years agoriscv64: cpu_initclocks: install tb_timecounter before cpu_startclock()
cheloha [Thu, 8 Sep 2022 03:09:40 +0000 (03:09 +0000)]
riscv64: cpu_initclocks: install tb_timecounter before cpu_startclock()

In the future, the clock interrupt code will need a real timecounter
to work correctly.  Nudge the tc_init(9) call for tb_timecounter up
before cpu_startclock().

2 years agomacppc: cpu_initclocks: install tb_timecounter before cpu_startclock()
cheloha [Thu, 8 Sep 2022 03:06:33 +0000 (03:06 +0000)]
macppc: cpu_initclocks: install tb_timecounter before cpu_startclock()

In the future, the clock interrupt code will need a real timecounter
to work correctly.  Nudge the tc_init(9) call for tb_timecounter up
before cpu_startclock().

2 years agorecognise Realtek ALC245
jsg [Thu, 8 Sep 2022 01:35:39 +0000 (01:35 +0000)]
recognise Realtek ALC245
from Neel Chauhan

2 years agomatch on Intel 600 Series LP HD Audio (0x51c8)
jsg [Thu, 8 Sep 2022 01:28:46 +0000 (01:28 +0000)]
match on Intel 600 Series LP HD Audio (0x51c8)

HP Spectre x360 16-f0013dx has subclass audio not hd audio
so azalia does not match

from Neel Chauhan

2 years agossl_cipher_process_rulestr: don't read outside rule_str buffer
millert [Wed, 7 Sep 2022 21:34:22 +0000 (21:34 +0000)]
ssl_cipher_process_rulestr: don't read outside rule_str buffer
If rule_str ended in a "-", "l" was incremented one byte past the
end of the buffer.  This resulted in an out-of-bounds read when "l"
is dereferenced at the end of the loop.  OK tb@

2 years agoAdd EVP test coverage for RC2.
tb [Wed, 7 Sep 2022 21:25:21 +0000 (21:25 +0000)]
Add EVP test coverage for RC2.

From Joshua Sing

2 years agoAdd output length validation for EVP
tb [Wed, 7 Sep 2022 21:17:32 +0000 (21:17 +0000)]
Add output length validation for EVP

From Joshua Sing

2 years agoAdd a few more PNP IDs to handle variants of the Qualcomm dual role
kettenis [Wed, 7 Sep 2022 20:06:23 +0000 (20:06 +0000)]
Add a few more PNP IDs to handle variants of the Qualcomm dual role
controller based on AML dumps found online and some further detective
work looking at Windows drivers by jsg@.

ok jsg@, millert@

2 years agovmm(4): allow reading MSR_TSC on Intel hosts.
dv [Wed, 7 Sep 2022 18:44:09 +0000 (18:44 +0000)]
vmm(4): allow reading MSR_TSC on Intel hosts.

Add's MSR_TSC to the read bitmap for msr access. This was added to
AMD/SVM in Feb 2020, but never added to Intel VMX. Some guests use
rdmsr instead of rdtsc, so this prevents a #GP exception.

ok mlarkin@

2 years agoOn the Lenovo X13s the named components don't have the single mapping
patrick [Wed, 7 Sep 2022 18:25:08 +0000 (18:25 +0000)]
On the Lenovo X13s the named components don't have the single mapping
flag set, which we so far had expected to be there.  This is allowed by
the IORT spec.  In that case simply make use of the first mapping if
there is a single one.

With feedback from and ok kettenis@

2 years agosync with arm64.html
jsg [Wed, 7 Sep 2022 10:30:03 +0000 (10:30 +0000)]
sync with arm64.html

2 years agoFix passing explicit stage files
kn [Wed, 7 Sep 2022 10:21:03 +0000 (10:21 +0000)]
Fix passing explicit stage files

Every platform ought to set `stages', `stage1' and optionally `stage2'
in md_init(), otherwise passing explicit files results won't work as
`stages' is zero-initialised and no default path is set:

# installboot -v sd0 /root/BOOTAA64.EFI
usage: installboot [-npv] [-r root] disk [stage1]

This is correct synopsis and ought to work, but efi_installboot.c has an
empty md_init().  Set stage bits to fix this:

# ./obj/installboot -nv sd0 /root/BOOTAA64.EFI
Using / as root
would install bootstrap on /dev/rsd0c
using first-stage /root/BOOTAA64.EFI
would copy /root/BOOTAA64.EFI to /tmp/installboot.2bGhLGT1eF/efi/boot/bootaa64.efi
would write /tmp/installboot.2bGhLGT1eF/efi/boot/startup.nsh

This makes regress/usr.sbin/installboot pass on armv7, arm64 and riscv64
(while being lucky or carrying miod's fix for the kernel disklabel race
manifesting on vnd).

2 years agoRemove the .SILENT bits again after feedback from bluhm
kn [Wed, 7 Sep 2022 10:07:39 +0000 (10:07 +0000)]
Remove the .SILENT bits again after feedback from bluhm

2 years agoMention bsd.rd and install72.img
kn [Wed, 7 Sep 2022 09:52:40 +0000 (09:52 +0000)]
Mention bsd.rd and install72.img

OK miod jsg

2 years agoansi
jsg [Wed, 7 Sep 2022 05:36:59 +0000 (05:36 +0000)]
ansi

2 years agoGBe -> GbE
jsg [Wed, 7 Sep 2022 01:22:08 +0000 (01:22 +0000)]
GBe -> GbE

2 years agoremove history of when each du(1) flag was added
jsg [Wed, 7 Sep 2022 00:46:20 +0000 (00:46 +0000)]
remove history of when each du(1) flag was added
ok jmc@ schwarze@

2 years agoStarFire -> StarFive
jsg [Wed, 7 Sep 2022 00:44:03 +0000 (00:44 +0000)]
StarFire -> StarFive

2 years agoDocument support for booting from RAID 1C on sparc64
kn [Tue, 6 Sep 2022 22:13:31 +0000 (22:13 +0000)]
Document support for booting from RAID 1C on sparc64

The bootloader (ofwboot) got support some time ago, but installboot(8) had
to be fixed as well for multi-chunk volumes (1C requires at least two).

As of today, the latest sparc64 install72.img can perform a default install
onto a passphrase-protected 1C volume across four chunk disks, resulting in
a bootable system without requiring manual invervention, just like amd64.

2 years agoCrank (sparse) disk size from 64M to 128M to make arm64 happy again
kn [Tue, 6 Sep 2022 20:54:37 +0000 (20:54 +0000)]
Crank (sparse) disk size from 64M to 128M to make arm64 happy again

2 years agoAdd VERBOSE=No default, .IGNORE and .SILENT REGRESS_CLEANUP
kn [Tue, 6 Sep 2022 20:30:00 +0000 (20:30 +0000)]
Add VERBOSE=No default, .IGNORE and .SILENT REGRESS_CLEANUP

Tiny bit less noise.  The many REGRESS_SETUP_ONCE targets could be merged
into a single one and then be added to .SILENT unless VERBOSE=yes to focus
on actual installboot output and ditch the dd/fdisk/disklabel noise by default.

2 years agokeep noise down, discard usage text for expected failure cases
kn [Tue, 6 Sep 2022 19:40:10 +0000 (19:40 +0000)]
keep noise down, discard usage text for expected failure cases

2 years agoUse multi-chunk RAID 1C with keydisk on softraid enabled archs
kn [Tue, 6 Sep 2022 19:35:21 +0000 (19:35 +0000)]
Use multi-chunk RAID 1C with keydisk on softraid enabled archs

Keydisks requires special treatment and should not be touched by installboot.
In real setups they are probably offline (temporary USB stick, only present
during boot to unlock), but when they are around (keydisk chunk on same disk
as crypto volume)...

installboot currently installs treats keydisk like any other chunk, which
must be fixed.

Thus change the tests into a should-work-but-currently-broken setup so an
installboot fix can be immediately tested against it.

2 years agoi386/lapic.c: sync with amd64/lapic.c
cheloha [Tue, 6 Sep 2022 17:26:27 +0000 (17:26 +0000)]
i386/lapic.c: sync with amd64/lapic.c

In anticipation of merging the new clock interrupt code after release,
let's synchronize the lapic timer parts of i386's lapic.c with those
of amd64's lapic.c.  The two files will need similar changes to switch
to the new code, so the more alike they are the better.

Tested by mlarkin@ on an ESXi VM.  Tested by me on my amd64 laptop
running in x86 compatibility mode.

ok mlarkin@

2 years agoAdd a table-driven test for RC2 in ECB mode to replace the old one.
tb [Tue, 6 Sep 2022 15:36:25 +0000 (15:36 +0000)]
Add a table-driven test for RC2 in ECB mode to replace the old one.

From Joshua Sing

2 years agoFix spacing/indent, no object change
kn [Tue, 6 Sep 2022 15:22:11 +0000 (15:22 +0000)]
Fix spacing/indent, no object change

2 years agoDelete some unreferenced SMD, ST506 and archaic SCSI #define's
krw [Tue, 6 Sep 2022 14:14:44 +0000 (14:14 +0000)]
Delete some unreferenced SMD, ST506 and archaic SCSI #define's
that use d_drivedata.

Since nothing else in the tree refers to d_drivedata other than
/etc/disktab parsing and no /etc/disktab entry utilizes the
:d[0-4]: attributes, stop disklabel(8) both printing "drivedata:
0" and paying attention to any "drivedata: ..." lines in ascii
labels being read.

ok jsg@ miod@

2 years agoAttach aplmbox(4) early.
kettenis [Tue, 6 Sep 2022 13:52:50 +0000 (13:52 +0000)]
Attach aplmbox(4) early.

2 years agoProperly free memory in filemode
job [Tue, 6 Sep 2022 11:16:51 +0000 (11:16 +0000)]
Properly free memory in filemode

OK tb@

2 years agoRemove more mkerr.pl remnants, missed in previous
kn [Tue, 6 Sep 2022 10:22:31 +0000 (10:22 +0000)]
Remove more mkerr.pl remnants, missed in previous

Noticed by jsg
Feedback OK jsg

2 years agoReplace aes_{ccm,xts}_cleanup usage with NULL.
jsing [Tue, 6 Sep 2022 06:38:26 +0000 (06:38 +0000)]
Replace aes_{ccm,xts}_cleanup usage with NULL.

Only change in generated assembly is due to line numbers.

2 years agoStop casting a size_t to a long and then passing it as a size_t.
jsing [Tue, 6 Sep 2022 06:17:11 +0000 (06:17 +0000)]
Stop casting a size_t to a long and then passing it as a size_t.

These cipher implementations take a size_t length argument, so stop
casting it to a long.

Found by Coverity.

ok tb@

2 years agosync
gkoehler [Mon, 5 Sep 2022 21:52:53 +0000 (21:52 +0000)]
sync

2 years agoFix copy-paste error
tb [Mon, 5 Sep 2022 21:36:46 +0000 (21:36 +0000)]
Fix copy-paste error