086be6a8 bz Jan. 9, 2022, 12:59 a.m.
We never initialized hw->conf.flags for IEEE80211_CONF_IDLE but
on set_channel we would clear it and announce a change.
This lead to a problem that drivers may do some work every time
which was not needed and may lead to unexpected behaviour (for no
better driver code).

Properly initialize conf.flags with IEEE80211_CONF_IDLE.
Factor out the toggling into a function and clear IDLE while
sw scanning and when associated and set again when scan ends
or we are bouncing out of assoc.

MFC after:	3 days
cgit
4ddc0079 bz Jan. 9, 2022, 12:57 a.m.
Also include netinet/in.h so that in_addr in known for ip.h.
Found by compiling a new piece of code which complained.

MFC after:	3 days
cgit
fcbb1441 kib Jan. 8, 2022, 10:45 a.m.
_PATH_LD32_HINTS is unused because it is a.out remnant.
_PATH_ELF32_HINTS is provided by rtld_paths.h already.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
cgit
bf48a958 pho Jan. 8, 2022, 6:11 a.m.
08ab34a0 cy Jan. 8, 2022, 5:46 a.m.
ipfsync is a WIP sync daemon designed to be used in a failover scenario.
It was removed by 5ee61c7daa511927aae8652d6a3ea78866a50ef8. This commit
restores its three files. ipfsync is in my work queue.

MFC after:	10 days
X-MFC with:	5ee61c7daa511927aae8652d6a3ea78866a50ef8
cgit
15964f1c kib Jan. 8, 2022, 4:34 a.m.
This removes one or two atomic update of the pte on access. Also it
makes the pte constant during its lifecycle.

Reviewed by:	alc, markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D33778
cgit
720a892a kib Jan. 8, 2022, 4:34 a.m.
Pre-calculate masks and page table/page directory bases, for LA48 and
LA57 cases, trading a conditional for the memory accesses.

This shaves 672 bytes of .text, by the cost of 32 .data bytes.  Note
that eliminated code contained one conditional, and several costly
movabs instructions, which are traded by two memory fetches per
vtop{t,d}e() inlines.

Reviewed by:	markj
Discussed with:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D33776
cgit
aaaa4fb5 kib Jan. 8, 2022, 4:21 a.m.
to prevent races with devfs VCHR vnode reclamation, same as it was
done for UFS.

Reported by:	pho
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D33721
cgit
41e85eea kib Jan. 8, 2022, 4:20 a.m.
In collaboration with:	pho
Reviewed by:	markj, mckusick
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D33721
cgit
b2e4b635 kib Jan. 8, 2022, 4:20 a.m.
A function to remount the filesystem from rw to ro on integrity error.
The work is performed in taskqueue to allow the call to be done from
almost arbitrary context where erronous state was detected.

Tested by:	pho
Reviewed by:	markj, mckusick
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D33721
cgit
4a4b059a kib Jan. 8, 2022, 3:41 a.m.
a helper to remount filesystem from rw to ro.

Tested by:	pho
Reviewed by:	markj, mckusick
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D33721
cgit
ba2c9838 kib Jan. 8, 2022, 3:41 a.m.
We use sector count to size the FAT inuse bitset.  If sector count is
corrupted, kernel might be tricked into doing unbound allocation.
Ensure that the sector count does not exceed the actual volume size.

In collaboration with:	pho
Reviewed by:	markj, mckusick
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D33721
cgit
65990b68 kib Jan. 8, 2022, 3:41 a.m.
Change its return type to void, because its result is ignored in both
call sites.  Remove oldcnp argument as well, it is NULL always.

Suggested and reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D33721
cgit
aec97963 kib Jan. 8, 2022, 3:41 a.m.
In collaboaration with:	pho
Reviewed by:	markj, mckusick
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D33721
cgit
1319c433 kib Jan. 8, 2022, 3:41 a.m.
This means that filesystem is corrupted, there is a loop.

In collaboration with:	pho
Reviewed by:	markj, mckusick
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D33721
cgit