We need to be able to test some more restart behavior that depends on
knowing specifically where we're at (inside the event loop or outside of
the event loop). Truncate the pidfile until the process is restarted to
give the test a clean marker rather than having to add arbitrary delays
and hoping for the best.
Reviewed by: des, markj
Differential Revision: https://reviews.freebsd.org/D47003
The logic in update_special_reg_field was reversed. Fix by swapping the
order of the arguments.
PR: 282505
Fixes: f1fb1d5c90 ("arm64: Support more ID register field types")
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D47437
In vfp_save_state_savectx we check if the pcb has a NULL vfp state.
When it's called multiple times with the same pcb then we can panic
because the vfp state has been set.
Weaken the requirement for the state pointer to be NULL by also
allowing it to point to the pcb vfp state area we are about to use.
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D47237
When multiple IRQs are specified in a single resource then we only
check the first. Change this to check all interrupts for the value
we expect to find.
Without this we may still enable the interrupt, but it can have the
wrong polatiry or trigger. This can cause an interrupt storm if the
interrupt was configured with a level trigger when it should have
been an edge.
PR: 282241
Reported by: trasz
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D47487
For current architectures, these are just aliases for the existing
operation on the relevant scalar integer.
Reviewed by: imp, kib
Obtained from: CheriBSD
Sponsored by: AFRL, DARPA
Differential Revision: https://reviews.freebsd.org/D47631
Use a memory barrier after calling the existing atomic_testandset_long
rather than using the fcmpset-based fallback version from
<sys/_atomic_subword.h>.
Reviewed by: kib
Sponsored by: AFRL, DARPA
Differential Revision: https://reviews.freebsd.org/D47628
These use amoor and amoand rather than a loop.
Also define atomic_testandset_acq_(64|long) using amoor.aq.
Reviewed by: mhorne, kib
Sponsored by: AFRL, DARPA
Differential Revision: https://reviews.freebsd.org/D47627
The driver wasn't stable - it would start fine, but during scan
it would eventually hang and no further command endpoint transfers
would complete.
After adding some debugging and looking at the logs I noticed that
things went sideways once a /data/ frame was sent. The channel
change config happened between the data frame being sent and
being completed.
My guess is that the firmware doesn't like a channel change
and reset whilst there's pending data frames. Checking the Linux
driver I found that it was doing a flush before a channel change,
and we're doing it afterwards. This acts like a fence around
ensuring scheduled TX work has completed. In net80211 the
transmit path and the control path aren't serialised, so it's
very often the case that ioctls, state changes, etc occur
whilst in parallel there are frame transmits being scheduled.
This seems to happen more frequently on a more recent, high core
(8) machine with XHCI. I remember testing this driver years ago
on single and dual core CPU laptops with no problems.
So, add some flushes - before a channel change, and during
a transition to AUTH when the BSS config is being programmed into
the firmware. These two fences seem enough to reliably
associate as a 2GHz and 5GHz STA.
Note that this isn't entirely blocking all newly queued
transmit work from occuring until after the NIC has finished
configuration. That will need some further investigation.
Locally tested:
* Wistron NuWeb AR5523 dual-band NIC, STA mode, 2/5GHz
Differential Revision: https://reviews.freebsd.org/D47655
Use the correct ID, as I have one of these NICs.
Add the previous one back in case it's out there in the wild.
@emaste did a bit of a dig into the product numbers.
@sam did change the ID from 0x0828 -> 082a in a commit
a long while back. It's worth reading the code review for
further details.
However, I do have one of these NICs and I verified that
it indeed has the given ID, and with some follow-up work
to fix some race conditions, it works fine in 2GHz 11bg
and 5GHz 11a operation.
Differential Revision: https://reviews.freebsd.org/D47654
Obtained from: Linux, drivers/net/wireless/ath/ar5523/ar5523.c
This will be useful when fixing up the sequence number generation
and checks, as the rules around how sequence numbers are generated
have been clarified in 802.11-2016 and later. QoS-NULL frames are
explicitly marked as "any sequence number".
But for now, just create a macro and use it in the one place
it's currently being used as a check - ath(4).
* Add IEEE80211_IS_QOS_NULL().
* Change the "will this frame go into the TX block-ack window" check
in the ath(4) transmit path. Note this changes the check to be
more specific, but both paths already had previous checks to ensure
they're QoS data frames.
Locally tested:
* ath(4), AR9380, STA mode w/ AMPDU TX/RX enabled and negotiated
Differential Revision: https://reviews.freebsd.org/D47645
Fix a typo that was missed probably because it was capitalized.
Mark up with .Pa and fix capitalization.
Specify that cuaUX and cuauX are for USB and UART attachments
respectively.
- Silence most lint warnings
- Update outdated links
- Minor style fixes
- Some igor(1) warnings were ignored on purpose
PR: 248359
Reviewed by: imp, mhorne, Alexander Ziaee <concussious.bugzilla@runbox.com>
Approved by: emaste (mentor)
Fixes: 839f11a4fe ("A number of places in the source tree still reference cuad.* after sio(4) was deprecated by uart(4).")
MFC after: 1 week
Pull Request: https://github.com/freebsd/freebsd-src/pull/1515
Make sure an interface is back up before (re-)starting wpa_supplicant
in wlanconfig not relying on wpa to UP the interface (though we fixed
that).
Sponsored by: The FreeBSD Foundation
Reviewed by: emaste (in D47491)
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D47491
The rtsock_msg_buffer() can be called without walkarg, just to calculate
required length. It can also be called with a degenerate walkarg, that
doesn't have a w_req. The latter happens when the function is called from
update_rtm_from_info() for the second time.
Zero init walkarg in update_rtm_from_info() and don't pass random stack
garbage as w_req.
In rtsock_msg_buffer() initialize compat32 boolean only once and take of
possible empty w_req. Simplify the rest of code once compat32 is already
set.
Reviewed by: melifaro
Differential Revision: https://reviews.freebsd.org/D47662
Reported-by: syzbot+d4a2682059e23179e76e@syzkaller.appspotmail.com
Reported-by: syzbot+66d7c9b3062e27a56f3f@syzkaller.appspotmail.com
Other atf components are guarded by WITH_TESTS_SUPPORT already.
WITH_TESTS is for actual tests.
Reviewed by: markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D47660
pflow opens sockets in the kernel to transmit netflow information.
If this is done in a (vnet) jail these sockets end up preventing the removal of
the jail. The VNET_SYSUNINIT() vnet_pflowdetach() function doesn't get called,
but that's the function that would remove the sockets.
Install a callback on the PR_METHOD_REMOVE jail callback and close the sockets
there. This ensures that the jail can get cleaned up.
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D47545
HIDRAW_GET_REPORT ioctl is documented to update hgd_actlen on return
with the number of bytes copied. It does not do this.
Reviewed by: wulf
PR: 282790
MFC after: 1 week
USB_GET_REPORT ioctl is documented to update ugd_actlen on return with
the number of bytes copied. It does not do this.
Reviewed by: wulf
PR: 282790
MFC after: 1 week
For "release" builds (as opposed to "snapshot" builds -- in this
context BETAs and RCs are "releases") ${SNAP_SUFFIX} is empty; but it
stuck into some ociimages filenames via a copy-and-paste error.
The final filenames on the download mirrors were not affected, so
this does not need to be merged to releng/14.2.
MFC after: 3 days
Sponsored by: Amazon
This function is only intended for the internal use of the VM system.
Reviewed by: dougm, kib, markj
Differential Revision: https://reviews.freebsd.org/D47644
After commit 65a4daeaf3 ("ktrace: log execve(2) arguments and
environment"), "a" and "e" are part of the default set of trace points.
Reviewed by: markj
Approved by: emaste (mentor)
Fixes: 65a4daeaf3 ("ktrace: log execve(2) arguments and environment")
Differential Revision: https://reviews.freebsd.org/D47648
If net80211 announces support for GCMP and/or BIP then configure it
appropriately.
GCMP will be used by WPA3 in the future, and BIP is required for
802.11w/MFP (which is also required by WPA3.)
Differential Revision: https://reviews.freebsd.org/D46499
This is unused by anything in the tree; anything using it should be
instead using one of the frame type macros.
Differential Revision: https://reviews.freebsd.org/D47503
* Add macros for the management and control frame type checks that
I've come across in the drivers.
* Delete some now old code (eg ath's ieee80211_is_action()) as there's now
a macro for it.
Local testing:
* not yet, I have a lot of wifi devices to find and test against
Differential Revision: https://reviews.freebsd.org/D47500
Some sh tests use ktrace to see whether a particular file, specified in
the environment, was accessed by the shell. After commit 65a4daeaf3,
this test matches the ktrace record generated by execve.
Use ktrace to only log name lookups, to avoid such false matches.
Fixes: 65a4daeaf3 ("ktrace: log execve(2) arguments and environment")
Insert a direct assignment to the location counter to ensure that orphaned
sections cannot be emitted between the _exidx_start symbol and the .ARM.exidx
section.
Discussed with: jrtc27
MFC after: 1 week
Otherwise it may cause system reset before the watchdog can be pat. This
is consistent with other watchdog drivers.
Tested on Allwinner D1.
Reviewed by: manu
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D47517
Restructure a bit of code to allow vm_page_alloc_contig_domain to use
pctrie iterators for lookup and insertion into the object radix tree,
to improve performance.
Reviewed by: alc
Differential Revision: https://reviews.freebsd.org/D47036
Add the relevant compatible string and build glue. Update the man page
with relevant compat strings.
Reviewed by: manu
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D47516