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.
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.
claudio [Fri, 9 Sep 2022 10:23:17 +0000 (10:23 +0000)]
Bump version to 8.0
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@
sthen [Fri, 9 Sep 2022 08:28:58 +0000 (08:28 +0000)]
sync
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@
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
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
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
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
jsg [Fri, 9 Sep 2022 04:32:55 +0000 (04:32 +0000)]
add backlight_device_get_by_name() used by 5.15.66 drm
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
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
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.
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@
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.
mglocker [Thu, 8 Sep 2022 19:02:04 +0000 (19:02 +0000)]
Zap inactive gadget functions.
mglocker [Thu, 8 Sep 2022 18:16:26 +0000 (18:16 +0000)]
Move bitmap functions to a new home.
ok kettenis@
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@
mbuhl [Thu, 8 Sep 2022 16:04:31 +0000 (16:04 +0000)]
Support the sendmmsg and recvmmsg system calls.
Input guenther@
OK bluhm@
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@
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@
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
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@
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.
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@
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
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.
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@
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@
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@
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().
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().
jsg [Thu, 8 Sep 2022 01:35:39 +0000 (01:35 +0000)]
recognise Realtek ALC245
from Neel Chauhan
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
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@
tb [Wed, 7 Sep 2022 21:25:21 +0000 (21:25 +0000)]
Add EVP test coverage for RC2.
From Joshua Sing
tb [Wed, 7 Sep 2022 21:17:32 +0000 (21:17 +0000)]
Add output length validation for EVP
From Joshua Sing
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@
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@
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@
jsg [Wed, 7 Sep 2022 10:30:03 +0000 (10:30 +0000)]
sync with arm64.html
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).
kn [Wed, 7 Sep 2022 10:07:39 +0000 (10:07 +0000)]
Remove the .SILENT bits again after feedback from bluhm
kn [Wed, 7 Sep 2022 09:52:40 +0000 (09:52 +0000)]
Mention bsd.rd and install72.img
OK miod jsg
jsg [Wed, 7 Sep 2022 05:36:59 +0000 (05:36 +0000)]
ansi
jsg [Wed, 7 Sep 2022 01:22:08 +0000 (01:22 +0000)]
GBe -> GbE
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@
jsg [Wed, 7 Sep 2022 00:44:03 +0000 (00:44 +0000)]
StarFire -> StarFive
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.
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
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.
kn [Tue, 6 Sep 2022 19:40:10 +0000 (19:40 +0000)]
keep noise down, discard usage text for expected failure cases
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.
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@
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
kn [Tue, 6 Sep 2022 15:22:11 +0000 (15:22 +0000)]
Fix spacing/indent, no object change
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@
kettenis [Tue, 6 Sep 2022 13:52:50 +0000 (13:52 +0000)]
Attach aplmbox(4) early.
job [Tue, 6 Sep 2022 11:16:51 +0000 (11:16 +0000)]
Properly free memory in filemode
OK tb@
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
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.
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@
gkoehler [Mon, 5 Sep 2022 21:52:53 +0000 (21:52 +0000)]
sync
tb [Mon, 5 Sep 2022 21:36:46 +0000 (21:36 +0000)]
Fix copy-paste error
tb [Mon, 5 Sep 2022 21:34:23 +0000 (21:34 +0000)]
Plug leaks due to not resetting the EVP_CIPHER_CTX
tb [Mon, 5 Sep 2022 21:12:08 +0000 (21:12 +0000)]
Two more missing long long casts
tb [Mon, 5 Sep 2022 21:08:08 +0000 (21:08 +0000)]
More long long casts for printing time_t
tb [Mon, 5 Sep 2022 21:06:31 +0000 (21:06 +0000)]
Convert from %i to %d
tb [Mon, 5 Sep 2022 20:53:01 +0000 (20:53 +0000)]
cast time_t to long long before printing for portability
mglocker [Mon, 5 Sep 2022 20:11:44 +0000 (20:11 +0000)]
Remove some inactive code, comments, and DPRINTFs. Minor style changes.
miod [Mon, 5 Sep 2022 20:09:24 +0000 (20:09 +0000)]
Do not perform out-of-bounds arrray accesses for bogus relocation type values.
job [Mon, 5 Sep 2022 20:08:26 +0000 (20:08 +0000)]
Update to most recent spec
kn [Mon, 5 Sep 2022 19:32:50 +0000 (19:32 +0000)]
Use exact fdisk arguments from "(W)hole disk" answer
Not all architectures did what the installer does with empty disks.
kettenis [Mon, 5 Sep 2022 19:18:56 +0000 (19:18 +0000)]
Don't ignore memory blocks smaller than 64KB. Some EFI implementations
(such as the one on the x13s) allocate memory with the EfiBootSevicesData
type in a semi-random fashion. Ignoring small regions with that type
results in different memory maps between boots of the same kernel.
This causes problems with upcoming hibernate support.
The decision to ignore small regions was made because we do this on
amd64 to work arounmd broken BIOS implementations and because of fears
that we would run out of physical memory segments in UVM. We have some
reasons to believe that we can trust the EFI memory map on arm64 and the
risk of running out of physical memory segments is mitigated by the fact
that we try to merge memory regions before loading them into UVM. If
for some reason we see a significant drop in physical memory on certain
machines, we should probably increase the number of items in the array
we use to store memory regions and/or increase the number of physical
memory segments in UVM.
ok mlarkin@
tb [Mon, 5 Sep 2022 18:07:04 +0000 (18:07 +0000)]
Reset provider in each iteration
If a providerAS sets an afiLimit, subsequent providerAS that don't set it
would erroneously inherit that limit. Zero out the provider at the top of
the loop to avoid this problem.
ok job
mbuhl [Mon, 5 Sep 2022 16:37:47 +0000 (16:37 +0000)]
Pledge sendmmsg and recvmmsg with stdio similar to their non-loop
counter parts. Input deraadt.
ok bluhm
bluhm [Mon, 5 Sep 2022 15:47:39 +0000 (15:47 +0000)]
Move mld6 address variables from data to stack memory to make them
MP safe. Due to the KAME scope address hack, the link-local all
nodes and all routers IPv6 addresses cannot be const.
OK benno@
bluhm [Mon, 5 Sep 2022 14:56:08 +0000 (14:56 +0000)]
Use shared netlock in soreceive(). The UDP and IP divert layer
provide locking of the PCB. If that is possible, use shared instead
of exclusive netlock in soreceive(). The PCB mutex provides a per
socket lock against multiple soreceive() running in parallel.
Release and regrab both locks in sosleep_nsec().
OK mvs@
jsg [Mon, 5 Sep 2022 14:22:58 +0000 (14:22 +0000)]
drm/amd/display: avoid doing vm_init multiple time
From Charlene Liu
85dd24ff77c15f5fc0e16bc3f288f5d1ac93e02b in linux 5.15.y/5.15.65
5544a7b5a07480192eb5fd3536462faed2c21528 in mainline linux
jsg [Mon, 5 Sep 2022 14:21:08 +0000 (14:21 +0000)]
drm/amdgpu: Increase tlb flush timeout for sriov
From Dusica Milinkovic
898467ac9bcb56090f0b651088a36331ff779e4c in linux 5.15.y/5.15.65
373008bfc9cdb0f050258947fa5a095f0657e1bc in mainline linux
jsg [Mon, 5 Sep 2022 14:18:34 +0000 (14:18 +0000)]
drm/amd/display: Fix pixel clock programming
From Ilya Bakoulin
4df54c493e76f3cfa0bc8c54c5c43faa3b6e78d4 in linux 5.15.y/5.15.65
04fb918bf421b299feaee1006e82921d7d381f18 in mainline linux
jsg [Mon, 5 Sep 2022 14:16:36 +0000 (14:16 +0000)]
drm/amd/pm: add missing ->fini_microcode interface for Sienna Cichlid
From Evan Quan
a89e753d5a9f3b321f4a3098e2755c5aabcff0af in linux 5.15.y/5.15.65
0a2d922a5618377cdf8fa476351362733ef55342 in mainline linux
jsg [Mon, 5 Sep 2022 14:15:03 +0000 (14:15 +0000)]
drm/amd/display: clear optc underflow before turn off odm clock
From Fudong Wang
5ee30bcfdb32526233d2572f3d9ec371928679f1 in linux 5.15.y/5.15.65
b2a93490201300a749ad261b5c5d05cb50179c44 in mainline linux
jsg [Mon, 5 Sep 2022 14:12:51 +0000 (14:12 +0000)]
drm/amd/display: For stereo keep "FLIP_ANY_FRAME"
From Alvin Lee
e407e04a93d7b1209669220fab5eb69ab7b09baf in linux 5.15.y/5.15.65
84ef99c728079dfd21d6bc70b4c3e4af20602b3c in mainline linux
jsg [Mon, 5 Sep 2022 14:11:02 +0000 (14:11 +0000)]
drm/amd/display: Fix HDMI VSIF V3 incorrect issue
From Leo Ma
2cddd3d0b049a5e0666f93ea8c0d6ba6cc4bbec4 in linux 5.15.y/5.15.65
0591183699fceeafb4c4141072d47775de83ecfb in mainline linux
jsg [Mon, 5 Sep 2022 14:09:09 +0000 (14:09 +0000)]
drm/amd/display: Avoid MPC infinite loop
From Josip Pavic
0c8abeceee0f58ad3fdc66e1de0c0e02b962653b in linux 5.15.y/5.15.65
8de297dc046c180651c0500f8611663ae1c3828a in mainline linux
jsg [Mon, 5 Sep 2022 14:06:39 +0000 (14:06 +0000)]
drm/i915/gt: Skip TLB invalidations once wedged
From Chris Wilson
4676773ea117624ced48fdf9806d5e0dc051bd7f in linux 5.15.y/5.15.65
e5a95c83ed1492c0f442b448b20c90c8faaf702b in mainline linux
jsg [Mon, 5 Sep 2022 14:04:28 +0000 (14:04 +0000)]
drm/bridge: Add stubs for devm_drm_of_get_bridge when OF is disabled
From Maxime Ripard
f8b07c05b69969c41efafda7022d6cb184d61bf9 in linux 5.15.y/5.15.65
59050d783848d9b62e9d8fb6ce0cd00771c2bf87 in mainline linux
tb [Mon, 5 Sep 2022 12:25:32 +0000 (12:25 +0000)]
Don't leak cert in aspa_parse()
ok job
sthen [Mon, 5 Sep 2022 11:21:08 +0000 (11:21 +0000)]
sync
kn [Mon, 5 Sep 2022 11:12:20 +0000 (11:12 +0000)]
Fix -r on multi-chunk softraid volumes
Running installboot(8) on softraid(4) volumes means installing stages on
every softraid chunk.
The overall idea is the same, but MD implementations differ.
sparc64_softraid.c's sr_install_bootblk() reuses sparc64_installboot.c's
md_installboot() for this.
For sparc64, md_installboot() does the copy of stage 2, usually
/usr/mdec/ofwboot to /ofwboot, so when `-r root' is passed, it prefixes the
file path with "root".
For single-disk installations (plain-disk and single-chunk softraid) this is
fine, but as soon as multiple chunks are used, md_installboot() currently
prefixes the path each time, obviously resulting in invalid paths starting
with the second run.
Other architectures do reuse md_installboot() as well but either don't do
such a copy or implement the prefixing differently -- plus they must support
softraid in the firt place to be able to hit this type of bug.
With this fixed, regress/usr.sbin/installboot finally passes on sparc64 and
installboot no longer fails at the end of a fresh installation onto softraid
with multiple chunks.
"looks correct" miod
mvs [Mon, 5 Sep 2022 10:31:25 +0000 (10:31 +0000)]
Add missing prototypes for route_attach() and route_detach().
kn [Mon, 5 Sep 2022 10:29:27 +0000 (10:29 +0000)]
boot_*.8: reference installboot.8, rectify FFS note on sparc64
On sparc64, installboot(8) does not deal with any file system; its -p is a
NOOP and according to CVS history the old sys/arch/sparc64/installboot/
never prepared a file system, either.
Remove this single misleading mention alltogether and rely on the now
consistently cross-linked MI installboot(8) for details, if any.
This syncs the list of currently existing MD boot_*(8/*) pages with the list
of usr.sbin/installboot/*_installboot.c files.
boot_alpha(8/alpha) already references installboot(8) but still uses
sys/arch/alpha/stand/installboot/ instead of usr.sbin/installboot/.
boot_luna88k(8/luna88k) exists but luna88k does not use installboot at all.
installboot(8) has additional support for efi (armv7, arm64, riscv64),
landisk, loongson, octeon and powerpc64 but those architectures currently
lack their own MD boot_*(8/*) manual.
OK miod
kn [Mon, 5 Sep 2022 10:03:50 +0000 (10:03 +0000)]
Fix file specification, zap partition bits, rectify disk naming errors
In boot_macppc(8), the current format a) claims to support specific disk/MBR
partitions which ofwboot clearly does not parse as such and b) lacks markup
to make clear which optional parts can (not) be omitted in what way.
Fixing both turns
promdev:partition/filename options
into
[[promdev:]filename] [-acds]
Same goes for boot(8/macppc), which has been apparently has been copied
from boot(8/amd64) without accounting for all platform specific details.
On amd64, biosboot(8) sees disks as 'sd' which (accidentially?) matches the
kernel driver's sd(4) name; it also supports specific disklabel(5) slices,
so amd64 can do 'sd0a:/bsd'.
On macppc, disks show up as 'ide', 'cd' or 'hd' which stems from
OpenFirmware alone, not matching the wd(4) driver's name. Also, ofwboot
always boots off the 'a' label, so macppc can only do 'hd:/bsd'.
Found while installing OpenBSD/macppc from CD inside QEMU but failing to
boot from disk inside QEMU and consulting our manual pages for help wrt.
specifying a boot device. Turns out QEMU's OpenBIOS simply cannot boot from
MSDOS filesystems (thanks gkoehler), so it wouldn't work no matter what
boot file specification I'd use.
tests/agreement gkoehler
Feedback OK miod
OK tobhe
OK jmc on a previous boot_macppc.8 diff
mglocker [Mon, 5 Sep 2022 09:00:33 +0000 (09:00 +0000)]
Cleanup USB methods so that they align to what we do in other HC drivers,
like xhci(4) and ehci(4).
ok mpi@
anton [Mon, 5 Sep 2022 05:34:25 +0000 (05:34 +0000)]
Add minimal tooling for separating tests into dedicated programs.
Used to flag the newly added test_bind_unix_socket() as expected to
fail.
jsing [Sun, 4 Sep 2022 15:56:51 +0000 (15:56 +0000)]
Remove dead code.
No change in generated assembly.
jsing [Sun, 4 Sep 2022 15:54:42 +0000 (15:54 +0000)]
Remove dead code.
No change in generated assembly.
jsing [Sun, 4 Sep 2022 15:45:25 +0000 (15:45 +0000)]
Add bounds checks for various EVP cipher implementations.
The EVP cipher API uses size_t, however a number of the underlying
implementations use long in their API. This means that an input with
size > LONG_MAX will go negative.
Found by Coverity, hiding under a large pile of macros.
ok tb@