linuxkpi: rwlock: Fix rwlock_init
Some linux code re-init some spinlock so add MTX_NEW to mtx_init.
Reported by: rlibby
Fixes: 5c0a1923486e ("linuxkpi: rwlock: Simplify code")
linuxkpi: Fix spin_lock_init
Some linux code re-init some spinlock so add MTX_NEW to mtx_init.
Reported by: David Wolfskill <david at catwhisker.org>
Fixes: ae38a1a1bfdf ("linuxkpi: spinlock: Simplify code")
Merge commit 87f3407856e6 from llvm-project (by Phoebe Wang):
[X86][Driver] Do not add `-evex512` for `-march=native` when the target doesn't support AVX512 (#91694)
This prevents problems with ports that fail to build with
CPUTYPE=native, if the native CPU supports AVX512F, resulting in errors
like:
/wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:197:21: error: always_inline function '_mm512_set1_epi8' requires target feature 'evex512', but would be inlined into function 'adler32_x86_avx512_vl512_vnni' that is compiled without support for 'evex512'
197 | const vec_t ones = VSET1_8(1);
| ^
/wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:116:23: note: expanded from macro 'VSET1_8'
116 | # define VSET1_8(a) _mm512_set1_epi8(a)
| ^
/wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:197:21: error: AVX vector return of type '__m512i' (vector of 8 'long long' values) without 'evex512' enabled changes the ABI
/wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:116:23: note: expanded from macro 'VSET1_8'
116 | # define VSET1_8(a) _mm512_set1_epi8(a)
| ^
[9 lines not shown]
SysV SHM: move SHMSEG constants to sys/shm.h
There are planned consumers in linprocfs.
Tested by: Ricardo Branco <rbranco at suse.de>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D45175
linuxkpi: Provide a non-NULL value for THIS_MODULE
THIS_MODULE is used to differentiate modules on Linux. We currently
completely stub out any Linux struct module usage, but THIS_MODULE
is still used to populate the "owner" fields of various drivers.
Even though we don't actually dereference these "owner" fields they
are still used by drivers to check if devices/dmabufs/etc come
from different modules. For example, during DRM GEM import some
drivers check if the dmabuf's owner matches the dev's owner. If
they match because they are both NULL drivers may incorrectly think
two resources come from the same module.
This adds a general purpose __this_linker_file which will point to
the linker file of the module that uses it. We can then use that
pointer to have a valid value for THIS_MODULE.
Reviewed by: bz, jhb
Differential Revision: https://reviews.freebsd.org/D44306
makeman: extend duplicate option warning to OPT_ options
In a local tree I accidentally had OPT_INIT_ALL defaulting to zero in
userland and none in kernel. This resulted in the INIT_ALL text
appearing twice in src.conf.5.
Reviewed by: brooks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45184
ctladm: fix resource leak
The str variable in cctl_nvlist_end_element() does not get free()'d when
converted to an integer value. (name is "trtype")
Reported by: Coverity Scan
Coverity ID: 1545039
Sponsored by: The FreeBSD Foundation
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1237
bhyve: avoid resource leak
In bhyve_parse_config_option(), a string is allocated and passed to
nvlist_add_string() but not free'd afterwards.
Reported by: Coverity
CID: 1544049
Sponsored by: The FreeBSD Foundation
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1234
netstat(1): increase width of Netif column
The previous width of Netif (10 or 8) was too short for modern interface
names; make it 12, which is long enough to display "epair0a.1000".
This came up in practice with genet(4) interfaces, since the base
interface name is long enough that with the previous limit, VLAN
identifiers would be truncated at 1 character in the IPv6 output:
"genet0.100" becomes "genet0.1".
The width is now fixed, and doesn't depend on the address family,
because there's no reason that length of the interface name would vary
based on the AF.
Reviewed by: imp,zlei,Mina Galić
Pull Request: https://github.com/freebsd/freebsd-src/pull/1223
netstat(8): for -W, use IFNAMSIZ
If -W is specified, use IFNAMSIZ as the width of the Netif column,
instead of the default 12.
Reviewed by: imp,zlei,Mina Galić
Pull Request: https://github.com/freebsd/freebsd-src/pull/1223
man filesystems: move driver pages to section four
Filesystem manual pages describe drivers, not formats;
except for fs, which describes the structures of ffs/ufs,
not how to use it in the system.
Reported by: emaste
Reviewed by: des, imp, meena (previous version)
Pull Request: https://github.com/freebsd/freebsd-src/pull/1077
contrib/bsddialog: Import version 1.0.2
Implicitly import also 1.0.1, both versions are for fixing and
feature requests.
Fixing:
Change --mixedform behavior to fix a bsdinstall fault avoiding
to change the command line in wlanconfig.
Feature requests:
* Add keys to navigate menus.
* Add key to redraw dialogs.
* Avoid to handle env NCURSES_NO_UTF8_ACS in PuTTY.
See '2024-04-11 Version 1.0.2' and '2023-11-16 Version 1.0.1' in
/usr/src/contrib/bsddialog/CHANGELOG for more detailed information.
PR: 274472
Differential Revision: D42380
[2 lines not shown]
contrib/bsddialog: Import version 1.0.2
Implicitly import also 1.0.1, both versions are for fixing and
feature requests.
Fixing:
Change --mixedform behavior to fix a bsdinstall fault avoiding
to change the command line in wlanconfig.
Feature requests:
* Add keys to navigate menus.
* Add key to redraw dialogs.
* Avoid to handle env NCURSES_NO_UTF8_ACS in PuTTY.
See '2024-04-11 Version 1.0.2' and '2023-11-16 Version 1.0.1' in
/usr/src/contrib/bsddialog/CHANGELOG for more detailed information.
PR: 274472
Differential Revision: D42380
pf: always mark states as unlinked before detaching them
Users have reported crashes in pf_test_state_udp() where at least one state key
is NULL.
That suggests that pf_detach_state() ran concurrently with pf_test_state_udp().
pf_test_state_udp() holds the state lock (aka the id lock), but
pf_detach_state() does not.
The intent is that detached states are not returned by STATE_LOOKUP/
pf_find_state(), as the state's timeout is set to PFTM_UNLINKED and thus
pf_find_state() does not find the state.
There are other paths to pf_detach_state() (outside of pf_unlink_state())
though, where we did not set the timeout to PFTM_UNLINKED. Fix those, and assert
that the timeout is set correctly when we enter pf_detach_state().
MFC after: 1 week
See also: https://redmine.pfsense.org/issues/15413
Sponsored by: Rubicon Communications, LLC ("Netgate")
[3 lines not shown]
linuxkpi: refcount: Use atomic_t directly
Simply use a typedef for refcount_t on atomic_t, this allow us
to use a nativ type and also changing struct kref to directly use
a refcount_t like Linux.
Reviewed by: bz
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D45207