openbsd
3 years agoPrint the name of the symbol that can't be resolved when using
jcs [Thu, 7 Oct 2021 14:47:32 +0000 (14:47 +0000)]
Print the name of the symbol that can't be resolved when using
LD_DEBUG

ok mpi, kn

3 years agoremove quirks for ALC887 because they were only causing trouble on my
robert [Thu, 7 Oct 2021 14:11:32 +0000 (14:11 +0000)]
remove quirks for ALC887 because they were only causing trouble on my
machine at least; let's see how others are; ok ratchov@

3 years agoUse correct index variable.
kettenis [Thu, 7 Oct 2021 13:34:20 +0000 (13:34 +0000)]
Use correct index variable.

pointed out by patrick@ (with the help of clang)
ok patrick@

3 years agoRemove unused TLB routines.
visa [Thu, 7 Oct 2021 13:08:17 +0000 (13:08 +0000)]
Remove unused TLB routines.

3 years agoMake sure BGPsec router certs don't have a SIA
job [Thu, 7 Oct 2021 12:59:29 +0000 (12:59 +0000)]
Make sure BGPsec router certs don't have a SIA

OK claudio@

3 years agoRemove struct members that were used by the R4000 EoP workaround.
visa [Thu, 7 Oct 2021 12:40:16 +0000 (12:40 +0000)]
Remove struct members that were used by the R4000 EoP workaround.

3 years agoUse tabs instead of spaces.
visa [Thu, 7 Oct 2021 12:32:10 +0000 (12:32 +0000)]
Use tabs instead of spaces.

3 years agoRemove a stale comment.
visa [Thu, 7 Oct 2021 12:31:03 +0000 (12:31 +0000)]
Remove a stale comment.

3 years agoSend a probe request to our new AP when we are about to roam to it.
stsp [Thu, 7 Oct 2021 12:26:09 +0000 (12:26 +0000)]
Send a probe request to our new AP when we are about to roam to it.

Tested by fkr on iwx ax200/ax201 and myself on iwm 8265.
Also tested by florian and bket as part of a larger diff.

ok mpi@

3 years agoCall normalize_dn() on the newly added namespace so that later compares
claudio [Thu, 7 Oct 2021 11:35:30 +0000 (11:35 +0000)]
Call normalize_dn() on the newly added namespace so that later compares
with normalized basedns work. Seems all other DN attributes in parse.y
pass through normalize_dn() so this seems to be the last one missing out.
With this configs using capitalized namespace DN like o=OpenBSD,c=CA
will actually work.
OK kn@ gsoares@

3 years agoChange host() error check to the more simple for of != 1.
claudio [Thu, 7 Oct 2021 11:32:36 +0000 (11:32 +0000)]
Change host() error check to the more simple for of != 1.
Host() return 1 on success and 0 or -1 on failure.
OK kn@ gsoares@

3 years agoClarify error message
job [Thu, 7 Oct 2021 11:18:54 +0000 (11:18 +0000)]
Clarify error message

OK benno@

3 years agoReplace the ugly openssl11 hack for the missing ASN1_time_parse() and
claudio [Thu, 7 Oct 2021 10:34:39 +0000 (10:34 +0000)]
Replace the ugly openssl11 hack for the missing ASN1_time_parse() and
ASN1_time_tm_cmp() functions with another hack that is considerably
more horrible but also less intrusive.

3 years agoRemove the assertion that `curproc' must be SONPROC if found on the sleepqueue.
mpi [Thu, 7 Oct 2021 08:51:00 +0000 (08:51 +0000)]
Remove the assertion that `curproc' must be SONPROC if found on the sleepqueue.

If `curproc' finds itself on the sleepqueue inside wakeup(9) it is obviously
being executed.  Such wakeup(9) currently happens inside the critical section
of the SCHED_LOCK(), generally before cpu_switchto().  However `p_stat' is
changed many operations before cpu_switchto() and the KASSERT() isn't helpful
at catching real bugs.

One example of this is a call to rwsleep() that calls wakeup() via rw_exit()
before sleep_finish(), contented futex(2) triggers that a lot.

Another example are dt(4)'s scheduler TRACEPOINT() in setrunqueue() and
mi_switch().

Suggested by and ok kettenis@

3 years agoRework X509 verification a bit. Remove the store and instead pass in
claudio [Thu, 7 Oct 2021 08:36:17 +0000 (08:36 +0000)]
Rework X509 verification a bit. Remove the store and instead pass in
the chain for certificates via X509_STORE_CTX_set0_trusted_stack().
To make this work alter build_chains() to also return the root TA.
Factor out get_crl() from build_crls() and use it to fetch the crl
when validating roas. The crl now sets its expire time in struct crl
and this can be used to set the expire time of a ROA entry.
This simplifies proc_parser_roa() a fair bit and results in less calls
to mktime() (which is a surprisingly complex function).
OK tb@

3 years agoAdd x509_get_expire() to extract the not-after time from a certificate
claudio [Thu, 7 Oct 2021 08:30:39 +0000 (08:30 +0000)]
Add x509_get_expire() to extract the not-after time from a certificate
as a epoch time_t. Store the expire time for certs, crls will follow after.
OK tb@

3 years agomktime() may not properly set errno on error. Just use errx() instead.
claudio [Thu, 7 Oct 2021 08:28:45 +0000 (08:28 +0000)]
mktime() may not properly set errno on error. Just use errx() instead.
Noticed by benno@, OK tb@

3 years agotrapsignal() can be called without KERNEL_LOCK, adjust code accordingly.
claudio [Thu, 7 Oct 2021 08:21:22 +0000 (08:21 +0000)]
trapsignal() can be called without KERNEL_LOCK, adjust code accordingly.
OK mpi@

3 years agoMake our old BSSID available to iwm_newstate() when roaming.
stsp [Thu, 7 Oct 2021 08:15:04 +0000 (08:15 +0000)]
Make our old BSSID available to iwm_newstate() when roaming.

ic_bss->ni_bssid has already been overwritten once we enter
iwm_newstate() to perform the state transitions necessary for
roaming to our new access point (RUN->AUTH->ASSOC->RUN).

We do however use the BSSID in commands sent to firmware.
Cache our BSSID in struct iwm_node such that firmware commands
keep using the old BSSID while we are still tearing things down.
Switch to the new BSSID only once we start back up in iwm_auth().
This should be consistent from the firmware's point of view.

ok mpi@

3 years agoAdd a missing El, from Alexis Hildebrandt in GitHub issue 2918.
nicm [Thu, 7 Oct 2021 07:53:31 +0000 (07:53 +0000)]
Add a missing El, from Alexis Hildebrandt in GitHub issue 2918.

3 years agoHandle splitw -I correctly when used from an attached client, GitHub
nicm [Thu, 7 Oct 2021 07:52:13 +0000 (07:52 +0000)]
Handle splitw -I correctly when used from an attached client, GitHub
issue 2917.

3 years agodrm/i915/request: fix early tracepoints
jsg [Thu, 7 Oct 2021 03:44:00 +0000 (03:44 +0000)]
drm/i915/request: fix early tracepoints

From Matthew Auld
d35d95e8b9da638d27bce9552262e0c486138343 in linux 5.10.y/5.10.71
c83ff0186401169eb27ce5057d820b7a863455c3 in mainline linux

3 years agodrm/amdgpu: correct initial cp_hqd_quantum for gfx9
jsg [Thu, 7 Oct 2021 03:42:00 +0000 (03:42 +0000)]
drm/amdgpu: correct initial cp_hqd_quantum for gfx9

From Hawking Zhang
9f382e1edf90ae03be43dbd4976c2a332cd7ce2d in linux 5.10.y/5.10.71
9f52c25f59b504a29dda42d83ac1e24d2af535d4 in mainline linux

3 years agodrm/amd/display: Pass PCI deviceid into DC
jsg [Thu, 7 Oct 2021 03:39:35 +0000 (03:39 +0000)]
drm/amd/display: Pass PCI deviceid into DC

From Charlene Liu
c331fad63b6d527193ae8b7c056b2f10fef53c81 in linux 5.10.y/5.10.71
d942856865c733ff60450de9691af796ad71d7bc in mainline linux

3 years agoThis regress uses vnd devices to create a softraid volume. Raid levels
bluhm [Wed, 6 Oct 2021 22:59:23 +0000 (22:59 +0000)]
This regress uses vnd devices to create a softraid volume.  Raid levels
RAID 0, RAID 1, RAID 5, CRYPTO, CONCAT, RAID 1 + CRYPTO are created.
The volume disk is then mounted and stressed a little bit.

3 years agoRemove Ruby 2.6 mentions
jeremy [Wed, 6 Oct 2021 21:14:39 +0000 (21:14 +0000)]
Remove Ruby 2.6 mentions

3 years agoChange sendsig() interface so that the MD code does not need to access
claudio [Wed, 6 Oct 2021 15:46:03 +0000 (15:46 +0000)]
Change sendsig() interface so that the MD code does not need to access
data from struct process anymore. This changes how siginfo and onstack
are accessed and make sendsig() more MP friendly.
With and OK semarie@ OK kettenis@

3 years agosync
deraadt [Wed, 6 Oct 2021 14:49:08 +0000 (14:49 +0000)]
sync

3 years agowe now pass that test
espie [Wed, 6 Oct 2021 14:24:17 +0000 (14:24 +0000)]
we now pass that test

3 years agofix for the XXX-warning warning... have the test be a bit more specific
espie [Wed, 6 Oct 2021 14:23:50 +0000 (14:23 +0000)]
fix for the XXX-warning warning... have the test be a bit more specific
for the really bizarre case where we would end up having several update
paths.

3 years agoAllow AUTH->AUTH state transitions in the iwm(4) and iwx(4) drivers again.
stsp [Wed, 6 Oct 2021 13:36:47 +0000 (13:36 +0000)]
Allow AUTH->AUTH state transitions in the iwm(4) and iwx(4) drivers again.

AUTH->AUTH state transitions happen if the access point uses band-steering.
This was originally implemented to fix interop with some Aruba APs, and
was probably broken by my recent CVS commit XeKkqPoaUCklmgtC ("prevent
attempts to transition towards the same state").

ok mpi@

3 years agoMake sure iwm(4) uses the HT frame format only for data frames.
stsp [Wed, 6 Oct 2021 13:35:55 +0000 (13:35 +0000)]
Make sure iwm(4) uses the HT frame format only for data frames.
Non-data frames are not supposed to use HT.

This change is for code correctness and does not fix any known issue.
And it applies only if the Tx rate has been fixed for testing purposes
with a command such as 'ifconfig iwm0 media HT-MCS13 mode 11n'.

ok mpi@

3 years agoAdd openbsd,dma-constraint property to /chosen node on armv7
visa [Wed, 6 Oct 2021 12:50:10 +0000 (12:50 +0000)]
Add openbsd,dma-constraint property to /chosen node on armv7

On the Zynq-7000, the DMA constraint has to be adjusted because many
bus masters are unable to access the lowest part of RAM.

OK patrick@ kettenis@

3 years agoGCC 4.2.1 does not support nullptr, use traditional NULL.
bluhm [Wed, 6 Oct 2021 12:43:14 +0000 (12:43 +0000)]
GCC 4.2.1 does not support nullptr, use traditional NULL.
Linker requires explicit libpthread.

3 years agoDo not reset cursor to default if it has never been changed, fixes
nicm [Wed, 6 Oct 2021 10:33:12 +0000 (10:33 +0000)]
Do not reset cursor to default if it has never been changed, fixes
problem reported by naddy.

3 years agoX509_STORE_CTX_init() allows the store to be NULL on init. Add checks
claudio [Wed, 6 Oct 2021 08:29:41 +0000 (08:29 +0000)]
X509_STORE_CTX_init() allows the store to be NULL on init. Add checks
for a NULL ctx->ctx in the lookup functions using X509_STORE_CTX.
This affects X509_STORE_get1_certs(), X509_STORE_get1_crls(),
X509_STORE_CTX_get1_issuer() and X509_STORE_get_by_subject().
With this X509_verify_cert() no longer crashes with a NULL store.
With and OK tb@

3 years agoRemove autoconfprivacy deprecation warning.
florian [Wed, 6 Oct 2021 06:14:08 +0000 (06:14 +0000)]
Remove autoconfprivacy deprecation warning.
OK deraadt

3 years agouse libc SHA256 functions; make this work when compiled !WITH_OPENSSL
djm [Wed, 6 Oct 2021 03:35:13 +0000 (03:35 +0000)]
use libc SHA256 functions; make this work when compiled !WITH_OPENSSL

3 years agoannotate sys/param.h uses as required, and pull in standard userland
deraadt [Wed, 6 Oct 2021 00:42:46 +0000 (00:42 +0000)]
annotate sys/param.h uses as required, and pull in standard userland
.h files as required.... preparing for a potential future when sys/proc.h
might be more clean...
do not touch the MD .c files yet, the dragons remain full of fire

3 years agoannotate all required sys/param.h uses with what they bring into scope,
deraadt [Wed, 6 Oct 2021 00:40:39 +0000 (00:40 +0000)]
annotate all required sys/param.h uses with what they bring into scope,
and delete all others.  use PATH_MAX and other standardized symbols instead
of prehistoric kernel-only names, create local MINIMUM/MAXIMUM macros where
required, and directly include standard userland .h files as required.

3 years agoFix some warnings.
nicm [Tue, 5 Oct 2021 20:15:16 +0000 (20:15 +0000)]
Fix some warnings.

3 years agosync
deraadt [Tue, 5 Oct 2021 18:33:01 +0000 (18:33 +0000)]
sync

3 years agowd(4) support
deraadt [Tue, 5 Oct 2021 18:32:46 +0000 (18:32 +0000)]
wd(4) support
ok kettenis

3 years agocleanup conf.c, and bring in wd(4) support
deraadt [Tue, 5 Oct 2021 18:32:27 +0000 (18:32 +0000)]
cleanup conf.c, and bring in wd(4) support
ok kettenis

3 years agoadd missing sudo
anton [Tue, 5 Oct 2021 17:42:05 +0000 (17:42 +0000)]
add missing sudo

3 years agoadd missing sudo
anton [Tue, 5 Oct 2021 17:41:31 +0000 (17:41 +0000)]
add missing sudo

3 years agofix stderr redirect
anton [Tue, 5 Oct 2021 17:41:03 +0000 (17:41 +0000)]
fix stderr redirect

3 years agoadd missing sudo
anton [Tue, 5 Oct 2021 17:40:40 +0000 (17:40 +0000)]
add missing sudo

3 years agoadd missing sudo and handle arguments
anton [Tue, 5 Oct 2021 17:40:08 +0000 (17:40 +0000)]
add missing sudo and handle arguments

3 years agoSet mouse_x and mouse_y on the status line, GitHub issue 2913.
nicm [Tue, 5 Oct 2021 17:23:13 +0000 (17:23 +0000)]
Set mouse_x and mouse_y on the status line, GitHub issue 2913.

3 years agoUnref/free amaps before grabbing the KERNEL_LOCK().
mpi [Tue, 5 Oct 2021 15:37:21 +0000 (15:37 +0000)]
Unref/free amaps before grabbing the KERNEL_LOCK().

This is possible now that amaps & anons are protected by a per-map rwlock.

Tested by many as part of a bigger diff.

ok kettenis@

3 years agoMake send-keys without any arguments send the key it is bound to (if
nicm [Tue, 5 Oct 2021 12:49:37 +0000 (12:49 +0000)]
Make send-keys without any arguments send the key it is bound to (if
any). GitHub issue 2904.

3 years agoSeparate "very visible" flag from blinking flag, it should not affect
nicm [Tue, 5 Oct 2021 12:46:02 +0000 (12:46 +0000)]
Separate "very visible" flag from blinking flag, it should not affect
DECSCUSR. GitHub issue 2891.

3 years agoDo not try to use NULL time values.
nicm [Tue, 5 Oct 2021 12:45:02 +0000 (12:45 +0000)]
Do not try to use NULL time values.

3 years agoCleanup the error handling in ipsec ipip_output() and consistently
bluhm [Tue, 5 Oct 2021 11:45:26 +0000 (11:45 +0000)]
Cleanup the error handling in ipsec ipip_output() and consistently
goto drop instead of return.  An ENOBUFS should be EINVAL in IPv6
case.  Also use combined packet and byte counter.
OK sthen@ dlg@

3 years agoMove setting ipsec mtu into a function. The NULL and invalid check
bluhm [Tue, 5 Oct 2021 11:34:34 +0000 (11:34 +0000)]
Move setting ipsec mtu into a function.  The NULL and invalid check
in ipsec_common_ctlinput() is not necessary, the loop in ipsec_set_mtu()
does that anyway.  udpencap_ctlinput() did not work for bundled SA,
this also needs the loop in ipsec_set_mtu().
OK sthen@

3 years agoAdd BGPsec router certificate to rpki-client regress
job [Tue, 5 Oct 2021 11:23:16 +0000 (11:23 +0000)]
Add BGPsec router certificate to rpki-client regress

3 years agoAdd rudimentary support for BGPsec router certificates
job [Tue, 5 Oct 2021 11:20:46 +0000 (11:20 +0000)]
Add rudimentary support for BGPsec router certificates

OK claudio@

3 years agoFix iwm(4) performance drop after roaming between APs in 11n mode.
stsp [Tue, 5 Oct 2021 10:34:36 +0000 (10:34 +0000)]
Fix iwm(4) performance drop after roaming between APs in 11n mode.

Stop BA sessions directly in iwm_run_stop() and disable Tx agg queues
when leaving RUN state. Otherwise Tx agg queues do not work properly
after switching APs and Tx performance drops to about 2 Mbit/s with
excessive retries being reported to RA.

Tested:
7260: florian
8260: bket
8265: stsp
9260: florian
9560: stsp

3 years agoFor now the signal returned in cursig() is only set in p_siglist.
claudio [Tue, 5 Oct 2021 08:38:19 +0000 (08:38 +0000)]
For now the signal returned in cursig() is only set in p_siglist.
Simplify the code and remove the now unused CLRSIG() macro.
OK mpi@

3 years agoadd missing sudo
anton [Tue, 5 Oct 2021 08:08:58 +0000 (08:08 +0000)]
add missing sudo

3 years agoRemove some extra spaces
claudio [Tue, 5 Oct 2021 07:22:21 +0000 (07:22 +0000)]
Remove some extra spaces

3 years agotx aggregation is now supported; ok stsp
jmc [Tue, 5 Oct 2021 06:02:18 +0000 (06:02 +0000)]
tx aggregation is now supported; ok stsp

3 years agoadd missing sudo
anton [Tue, 5 Oct 2021 05:57:58 +0000 (05:57 +0000)]
add missing sudo

3 years agobuild prog once
anton [Tue, 5 Oct 2021 05:34:41 +0000 (05:34 +0000)]
build prog once

3 years agostop masking test-http.c failures
anton [Tue, 5 Oct 2021 05:34:22 +0000 (05:34 +0000)]
stop masking test-http.c failures

3 years agoThe HTTP chunked transfer encoding test in regress/usr.sbin/rpki-client/libressl
anton [Tue, 5 Oct 2021 05:33:46 +0000 (05:33 +0000)]
The HTTP chunked transfer encoding test in regress/usr.sbin/rpki-client/libressl
often fails. It happens when the HTTP parser reads more than one chunk in a
single tls_read() invocation causing the state machine to think it needs to read
more data while buffer already contains unexamined data. Considering a non-empty
buffer before tls_read() fixes the problem.

ok benno@ claudio@

3 years agosync
deraadt [Tue, 5 Oct 2021 04:56:18 +0000 (04:56 +0000)]
sync

3 years agowd(4) device node support was missing, add it.
deraadt [Tue, 5 Oct 2021 04:55:51 +0000 (04:55 +0000)]
wd(4) device node support was missing, add it.

3 years agoClean up memory handling in spawn_pager(), free(3)ing everything
schwarze [Mon, 4 Oct 2021 21:28:50 +0000 (21:28 +0000)]
Clean up memory handling in spawn_pager(), free(3)ing everything
that is malloc(3)ed.  In addition to being less confusing, the new
code is also shorter by two lines.

3 years agosync
deraadt [Mon, 4 Oct 2021 20:44:27 +0000 (20:44 +0000)]
sync

3 years agosycn
deraadt [Mon, 4 Oct 2021 20:40:39 +0000 (20:40 +0000)]
sycn

3 years agoIn man(1) mode, properly clean up the resn[] result array
schwarze [Mon, 4 Oct 2021 20:24:00 +0000 (20:24 +0000)]
In man(1) mode, properly clean up the resn[] result array
after processing each name given on the command line.

Failure to do so resulted in a memory leak of about 50 kilobytes
per name given on the command line.  Since man(1) uses a few
Megabytes of memory anyway and people rarely give hundreds of names
on the command line, this leak did not cause practical problems,
but cleaning up properly is better in any case.

3 years agoAllegedly a "Marvell Armada 3700 Functional Errata, Guidelines, and
kettenis [Mon, 4 Oct 2021 19:04:12 +0000 (19:04 +0000)]
Allegedly a "Marvell Armada 3700 Functional Errata, Guidelines, and
Restrictions" document exists that discusses an errata #251 in section
"3.12 PCIe Completion Timeout" and suggests that setting the DIS_ORD_CHK
flag in the Debug Mux Control register is necessary as a workaround:

https://lore.kernel.org/linux-pci/20210624222621.4776-6-pali@kernel.org

This workaround is still being discussed by the Linux developers, but it
does fix an issue I am seeing with athn(4), where an external abort
happens under load.  So apply this workaround since its potential side
effects seem to be significantly less severe than provoking an
external abort that hangs the machine.

ok patrick@

3 years agoProvide a cleanup function for the term_tab module, freeing memory
schwarze [Mon, 4 Oct 2021 18:56:24 +0000 (18:56 +0000)]
Provide a cleanup function for the term_tab module, freeing memory
and resetting the internal state to the initial state.
Call this function from the proper place in term_free().

With the way the module is currently used, this does not imply any
functional change, but doing proper cleanup is more robust, makes
it easier during code review to understand what is going on, and
makes it explicit that there is no memory leak.

3 years ago3 groups of realtek firmware are now in base (with new filenames).
deraadt [Mon, 4 Oct 2021 17:05:44 +0000 (17:05 +0000)]
3 groups of realtek firmware are now in base (with new filenames).
fw_update does not need to install the 3 realtek firmwares anymore.
We must keep them around during the 7.0 cycle, but 7.1 onwards will
not require the files.
discussed with sthen and kevlo

3 years agogrow i386 media for new realtek firmwares
deraadt [Mon, 4 Oct 2021 17:02:21 +0000 (17:02 +0000)]
grow i386 media for new realtek firmwares

3 years agosync
deraadt [Mon, 4 Oct 2021 15:20:36 +0000 (15:20 +0000)]
sync

3 years agostore the operating system name obtained from uname(3) in the adequate
schwarze [Mon, 4 Oct 2021 14:18:42 +0000 (14:18 +0000)]
store the operating system name obtained from uname(3) in the adequate
struct together with similar state date rather than in a function-scope
static variable, such that it can be free(3)d in roff_man_free();
no functional change

3 years agosynch doc to tool
espie [Mon, 4 Oct 2021 13:42:53 +0000 (13:42 +0000)]
synch doc to tool

3 years agoDo not leak 64 bytes of heap memory every time a manual page calls
schwarze [Mon, 4 Oct 2021 10:11:54 +0000 (10:11 +0000)]
Do not leak 64 bytes of heap memory every time a manual page calls
a user-defined macro.  Calls of standard mdoc(7) and man(7) macros
were unaffected, so the effect on OpenBSD manual pages was small,
about 80 Kilobytes grand total for a full run of "makewhatis
/usr/share/man".

Argument expansion contexts for user-defined macros are stored on
a stack that grows as needed if calls of user-defined macros are
nested or recursive.  Individual stack entries contain dynamically
allocated arrays of pointers to arguments; these argument arrays
also grow as needed if user-defined macros take more than eight
arguments.  The mistake was that argument arrays of already
initialized expansion contexts were leaked rather than reused on
subsequent macro calls.

I found this issue in a systematic hunt for memory leaks after
Michael <Stapelberg at Debian> reported memory exhaustion problems
on the production server manpages.debian.org.  This sub-Megabyte
leak is not the cause of Michael's trouble, though, where Gigabytes
of memory are being wasted.  We are still investigating whether the
original problem may be related to his supervisor process, which is
written in Go, rather than to mandoc.

3 years agoSimplify sys___thrsigdivert a bit. cursig() always moves the pending signal
claudio [Mon, 4 Oct 2021 08:48:12 +0000 (08:48 +0000)]
Simplify sys___thrsigdivert a bit. cursig() always moves the pending signal
to p_siglist and so there is no need to check ps_siglist for the signal.
OK mpi@

3 years agoUse the fact the vnodes are locked when operations are inflight.
claudio [Mon, 4 Oct 2021 08:11:02 +0000 (08:11 +0000)]
Use the fact the vnodes are locked when operations are inflight.
Remove the v_inflight member and alter the ffs and ext2fs sync code to
track inflight by checking if the node is locked or not (which it already
did before but for a different reason).
OK mpi@

3 years agoAdd firmwares for rsu(4), rtwn(4), and urtwn(4) drivers.
kevlo [Mon, 4 Oct 2021 01:34:29 +0000 (01:34 +0000)]
Add firmwares for rsu(4), rtwn(4), and urtwn(4) drivers.
ok deraadt@

3 years agoBuild firmware for rsu(4), rtwn(4), and urtwn(4).
kevlo [Mon, 4 Oct 2021 01:33:42 +0000 (01:33 +0000)]
Build firmware for rsu(4), rtwn(4), and urtwn(4).
We have to install the files with new filenames (removal of "fw" from each of
the filenames) and change the driver to use the new filenames,
such that the package becomes irrelevant.

Discussed with deraadt@ and sthen@

ok deraadt@

3 years agoPermission from Realtek to include wireless firmwares
kevlo [Mon, 4 Oct 2021 01:29:57 +0000 (01:29 +0000)]
Permission from Realtek to include wireless firmwares

After deraadt@ explained why the Realtek firmware cannot be put into our tree,
I reached out to Realtek to explain the situation.

According to the LICENCE.rtlwifi_firmware.txt [1], the rules permitted adding
their non-open-source firmware into open source operating systems but such
an addition (ironically) makes that open source operating system not entirely
open source.  Realtek understood the irony, and change the license.

Thanks to Realtek for this change which lets us put the firmware .h file
into our tree, this means Realtek wireless will work without requiring
a firmware download (which is difficult over a non-working Realtek network :)

[1] https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/LICENCE.rtlwifi_firmware.txt?id=0f863ff1b388ad5b0f7d25decdbb642#n22

ok deraadt@

3 years agoUnbreak btrace(8) regress, adding missing files.
dv [Sun, 3 Oct 2021 22:19:03 +0000 (22:19 +0000)]
Unbreak btrace(8) regress, adding missing files.

3 years agobt(5)/btrace(8): add support for str()
dv [Sun, 3 Oct 2021 22:01:48 +0000 (22:01 +0000)]
bt(5)/btrace(8): add support for str()

Implement initial support for the str() function, which is used
primarily to truncate or NUL-terminate strings from either cli args
or args to tracepoints and syscalls.

Current implementation only supports cli args and is primarily for
compatability with bpftrace. Future work is needed once dt(4)
supports builtin args other than long values.

Adds a regress test and wires in argument-based tests again.

ok mpi@

3 years agoApparently some athn(4) variants are buggy and may hand us corrupt frames
kettenis [Sun, 3 Oct 2021 20:19:55 +0000 (20:19 +0000)]
Apparently some athn(4) variants are buggy and may hand us corrupt frames
that are marked "ok".  Linux has some workarounds for this and checks whether
the status word has error bits set in it regardless of the bit that marks
the frame as "ok".  Adapt this workaround to our driver and drop the frame
after setting input errors.  This doesn't filter out all corrupted frames,
but it does keep things down to a level where it doesn't fill up the node
cache anymore when athn(4) is used in hostap mode.

Seen with:

athn0 at pci1 dev 0 function 0 "Atheros AR9281" rev 0x01: intx
athn0: AR9280 rev 2 (2T2R), ROM rev 16, address xx:xx:xx:xx:xx:xx

ok stsp@

3 years agoExtend filesystem tests to test mfs and tmpfs. Hook up mfs but leave tmpfs
claudio [Sun, 3 Oct 2021 08:56:53 +0000 (08:56 +0000)]
Extend filesystem tests to test mfs and tmpfs. Hook up mfs but leave tmpfs
out for now since it is not enabled by default.
mfs reports the same errors as ffs (no real surprise), tmpfs has a few
different errors.
OK bluhm@

3 years agosync
deraadt [Sun, 3 Oct 2021 00:49:20 +0000 (00:49 +0000)]
sync

3 years agoun.ifdef USB and PCI, since all our architectures (minus one) have models
deraadt [Sun, 3 Oct 2021 00:48:45 +0000 (00:48 +0000)]
un.ifdef USB and PCI, since all our architectures (minus one) have models
which can have these busses, might as well make these distributable firmwares
available in case the drivers find devices.
ok kettenis

3 years agofuse: avoid namei_pool leaks in several functions
semarie [Sat, 2 Oct 2021 17:29:28 +0000 (17:29 +0000)]
fuse: avoid namei_pool leaks in several functions

when calling namei(), cn_pnbuf is kept allocated when fs
implementation is setting SAVENAME flag. In such cases, it is expected
the fs implementation to also release memory when work is done.

fuse(4) didn't put back the memory to the pool. correct it.

ok mpi@

3 years agoExtend workaround for reset on context closure from gen 7-8 to gen 4-8
jsg [Sat, 2 Oct 2021 14:26:05 +0000 (14:26 +0000)]
Extend workaround for reset on context closure from gen 7-8 to gen 4-8
as asavvycomputist@disroot.org reported this occurs on gm45 (gen 4).

3 years agoremove dead variable from sys___realpath()
semarie [Sat, 2 Oct 2021 14:05:10 +0000 (14:05 +0000)]
remove dead variable from sys___realpath()

it is a leftover from LOCKPARENT removal in NDINIT() (in rev 1.337)

ok mpi@

3 years agoUse SSL_CTX_get0_param() rather than reaching into the SSL_CTX.
jsing [Sat, 2 Oct 2021 09:46:48 +0000 (09:46 +0000)]
Use SSL_CTX_get0_param() rather than reaching into the SSL_CTX.

3 years agovfs: merge *_badop to vop_generic_badop
semarie [Sat, 2 Oct 2021 08:51:41 +0000 (08:51 +0000)]
vfs: merge *_badop to vop_generic_badop

It replaces spec_badop, fifo_badop, dead_badop and mfs_badop, which
are only calls to panic(9), to one unique function vop_generic_badop().

No intented behaviour changes (outside the panic message which isn't
the same).

ok mpi@

3 years agosync
sthen [Sat, 2 Oct 2021 08:45:05 +0000 (08:45 +0000)]
sync

3 years agoRemove iwx_assoc() and iwx_disassoc(). Not needed because they duplicate
stsp [Sat, 2 Oct 2021 07:48:20 +0000 (07:48 +0000)]
Remove iwx_assoc() and iwx_disassoc(). Not needed because they duplicate
work that is already handled by state transitions involving AUTH or RUN.

3 years agoRemove iwm_assoc() and iwm_disassoc(). Not needed because they duplicate
stsp [Sat, 2 Oct 2021 07:47:54 +0000 (07:47 +0000)]
Remove iwm_assoc() and iwm_disassoc(). Not needed because they duplicate
work that is already handled by state transitions involving AUTH or RUN.