etcupdate: Restrict access to the conflicts directory
In the window during conflict resolution, copies of installed files with
conflicts are added here with the default mode. Restrict access.
PR: 277470
Reviewed by: philip, jhb, emaste
Differential Revision: https://reviews.freebsd.org/D48576
(cherry picked from commit c43ae7ab4bf89c2b274c1cbefe663c456e9211d1)
if_vxlan(4): Invoke vxlan_stop event handler only when the interface is configured
It is harmless but pointless to invoke vxlan_stop event handler when the
interface was not previously configured. This change will also prevent
an assert panic from t4_vxlan_stop_handler().
Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D48494
(cherry picked from commit 960c5bb0f6bf44aeb09fa14fd0f82c2e82ebe2e2)
kern_sysctl: Fix printing function name in the re-use sysctl leaf warning
The helper function sysctl_warn_reuse() is intended to print the name of
the caller rather than that of itself.
PR: 221853
Fixes: 4ae2ade11426 Enhance debugibility of sysctl leaf re-use warnings
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D48645
(cherry picked from commit faa845aab6113190ba8c75a171b2cca8673a6214)
etcupdate: Restrict access to the conflicts directory
In the window during conflict resolution, copies of installed files with
conflicts are added here with the default mode. Restrict access.
PR: 277470
Reviewed by: philip, jhb, emaste
Differential Revision: https://reviews.freebsd.org/D48576
socket tests: Add a test which calls listen() twice on an lb socket
This exercises commit 06bf119f265c ("sockets/tcp: quick fix for
regression with SO_REUSEPORT_LB")
Reviewed by: glebius
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D48702
sound tests: Fix gcc build
/workspace/src/tests/sys/sound/pcm_read_write.c:36:1: error: 'static' is not
at beginning of declaration [-Werror=old-style-declaration]
36 | } static const afmt_tests[] = {
| ^
Reported by: CI
Fixes: 27ef5d48c729 ("sound: Unit test the pcm sample read and write macros")
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
(cherry picked from commit f6631da0b581b28c2bfeea1199b52013bb46aa41)
sound: Make CHN_REMOVE_SAFE() the default
Commit 27b932e32fab ("sound: Safely remove channel from list in one
pass") optimized CHN_REMOVE_SAFE() to perform almost equally to
CHN_REMOVE(), so we can turn CHN_REMOVE_SAFE() into CHN_REMOVE() without
fears of performance regressions, while also being more robust.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: dev_submerge.ch
Differential Revision: https://reviews.freebsd.org/D48249
(cherry picked from commit ffcefe5310e084415a2f292a00f4637d4059c40f)
sound tests: Fix 32bit calculation detection in pcm_read_write
Fix a mistake in the pcm_read_write test that would result in not
properly detecting 32bit calculation on 32bit architectures like i386.
As a consequence, the wrong values would be checked, thus failing the
test.
Reported by: CI
Fixes: 27ef5d48c729 ("sound: Unit test the pcm sample read and write macros")
MFC after: 1 week
Reviewed by: christos
Differential Revision: https://reviews.freebsd.org/D48617
(cherry picked from commit e02b579b537998495b06d02be6aa07f03db3a42a)
sound: Safely remove channel from list in one pass
The CHN_REMOVE_SAFE() macro did two traversals of the channel list to
remove a channel, one to check whether the channel is an element of the
list, and a second traversal through SLIST_REMOVE(). Reduce this to one
traversal, while still preventing a NULL dereference in case the channel
in question is not present in the list.
While here, rename the macro arguments to something more descriptive.
MFC after: 1 week
Reviewed by: christos
Differential Revision: https://reviews.freebsd.org/D48207
(cherry picked from commit 27b932e32faba1137ff307d05b787d837ccadda8)
sound: Unit test the pcm sample read and write macros
Main goal is to have a unit test, with sample test data that is verified
against the current macro implementation of pcm sample read and write
functions. With a test in place, we can proceed on a planned refactoring
of the sample read and write code, and confidently check the new code
for regressions.
Implementation of the unit test itself has to avoid any cast or
conversion affected by endianness, to make the tests compatible with all
machine architectures.
MFC after: 1 week
Reviewed by: christos, markj
Differential Revision: https://reviews.freebsd.org/D48330
(cherry picked from commit 27ef5d48c729defb83a8822143dc71ab17f9d68b)
sockets/tcp: quick fix for regression with SO_REUSEPORT_LB
There was a long living problem that pr_listen is called every time on
consecutive listen(2) syscalls. Up until today it produces spurious TCP
state change events in tracing software and other harmless problems. But
with 7cbb6b6e28db we started to call LIST_REMOVE() twice on the same
entry.
This is quite ugly, but quick and robust fix against regression, that we
decided to put in the scope of the January stabilization week. A better
refactoring will happen later.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D48703
Fixes: 7cbb6b6e28db33095a1cf7a8887921a5ec969824
Standardize the definition of a UFS dinode.
Each program that operates on UFS on-disk inodes defines its own
version of a dinode. They all (of necessity) define the same
layout but use different names. This change adds a definition of
a dinode (a union of a UFS1 on-disk inode and a UFS2 on-disk inode)
as well as a dinodep (a union of a pointer to a UFS1 on-disk inode
and a pointer to a UFS2 on-disk inode) in sys/ufs/ufs/dinode.h.
It then deletes the definitions of dinode and dinodep in all the
programs that operate on them and instead uses these standard
definitions.
No functional change intended.
MFC-after: 1 week
riscv: aw_timer enablement for D1
The SBI timer functionality is partially broken on the Allwinner D1, so
we require this driver to provide an eventtimer/system timer interrupts.
The timecounter interface, on the other hand, is not required. The
generic RISC-V timer driver uses the native rdtime instruction, and
implements vdso, so this should be preferred.
Reviewed by: manu, ganbold
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48672
aw_timer: rename driver from a10_timer
This reflects its expanded support for platforms other than the A10.
Functions specific to A10/A13 retain the a10 prefix, but the majority of
names in the driver are changed, e.g. a10_timer_softc becomes
aw_timer_softc.
Reviewed by: manu, ganbold
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48671
a10_timer: some tidying/re-organization
In preparation for enabling the driver on the D1 platform (riscv).
- Better isolate armv7-only portions of the driver
- Move a10 timecounter setup into a helper function
- Small style tweaks
Reviewed by: manu, ganbold
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48670