The rc_fast_and_loose variable allowed rc(8) to start services
by sourcing them into rc's own shell environment. Normally, each rc
service script is started by being sourced into its own subshell
instead. The feature was meant to speed up rc(8) by avoiding the extra
forking necessary to spawn subshells.
In practice, the feature has been broken for a long time now. One of the
reasons is that some rc service scripts call the exit builtin to return
non-zero error codes, which not only terminates the service subshell
but also rc(8) when rc_fast_and_loose is enabled. For example,
a system running any of the supported FreeBSD releases
with rc_fast_and_loose=yes would abort rc(8) as early as rc.d/hostid,
due to an "exit 0".
Fixing rc_fast_and_loose support would require rewriting some rc scripts
to support being sourced directly into rc(8) process. This would muddy
the code base and also would prove difficult to maintain long term
as this is simply not how rc(8) users write scripts. The potential
performance benefits are unlikely to be significant even for use cases
such as Morello under qemu.
Instead, remove support for rc_fast_and_loose completely from rc(8)
and inform users about the change.
PR: 282255
Reviewed by: brooks, christos, mhorne
Approved by: christos (mentor), markj (mentor)
MFC after: 2 weeks
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D47264
So this is a gross hack to fix the 'noclean' build since we changed to
text-only loader. We have to fix it in a better way, but for the moment,
this will fix non-meta no-clean builds. A better hack is to fix this so
we build either vidconsole.c or textvidc.c, but some minor refactoring
and variable renaming is needed.
Fixes: 23dee252daf2
Sponsored by: Netflix
Previously, the rule validation only checked the primary GID (cr_gid).
This caused issues when applying GID-based rules, as users with matching
secondary groups were not considered valid. This patch modifies both
functions to iterate through all groups in cr_groups to ensure all group
memberships are considered when validating GID-based rules.
For example, a user's primary group is staff (20) and they are also in
the wheel (0) group, this change allows the rule gid=0:any to enable
them to run commands as any user.
Reviewed by: delphij (earlier version), bapt
Differential Revision: https://reviews.freebsd.org/D47304
Building world using WITH_ASAN results in an assertion when compiling
certain source files referencing ifuncs:
Assertion failed: (isa<Function>(Callee) || isa<GlobalAlias>(Callee)), function analyzeAllUses, file /root/freebsd/contrib/llvm-project/llvm/lib/Analysis/StackSafetyAnalysis.cpp, line 514.
This was already reported upstream a while ago, in
<https://github.com/llvm/llvm-project/issues/87923>, but now there is
finally a candidate fix, which seems trivial so I am importing it right
away.
Reported by: markj
PR: 280936
Pull Request: https://github.com/llvm/llvm-project/pull/113841
MFC after: 3 days
With gcc we are seeing the following -Werror warnings:
/workspace/src/sys/contrib/openzfs/include/os/freebsd/spl/sys/simd.h:53:33: error: statement with no effect [-Werror=unused-value]
53 | #define simd_stat_init() 0
| ^
/workspace/src/sys/contrib/openzfs/module/zcommon/zfs_prop.c:1092:9: note: in expansion of macro 'simd_stat_init'
1092 | simd_stat_init();
| ^~~~~~~~~~~~~~
/workspace/src/sys/contrib/openzfs/module/zcommon/zfs_prop.c: In function 'zcommon_fini':
/workspace/src/sys/contrib/openzfs/include/os/freebsd/spl/sys/simd.h:54:33: error: statement with no effect [-Werror=unused-value]
54 | #define simd_stat_fini() 0
| ^
/workspace/src/sys/contrib/openzfs/module/zcommon/zfs_prop.c:1100:9: note: in expansion of macro 'simd_stat_fini'
1100 | simd_stat_fini();
| ^~~~~~~~~~~~~~
Both `simd_stat_init()` and `simd_stat_fini()` are defined in the
FreeBSD specific version of `simd.h`:
#define simd_stat_init() 0
#define simd_stat_fini() 0
These should both be defined as `do {} while (0)` instead, similar to
other macros in this file.
Reviewed by: mav, tsoome (upstream)
Obtained from: https://github.com/openzfs/zfs/pull/16693
MFC after: 3 days
Differential Revision: <https://reviews.freebsd.org/D47297>
The fnmatch function matches a string against a shell-style filename
pattern. It is a complex function and cannot easily be implenented
using regular expressions. Adding fnmatch to flua increases the amd64
binary by less than 1 KB.
Approved by: markj
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D46849
These were reported by `mandoc -T lint ...` as warnings.
Signed-off-by: Graham Percival <gperciva@tarsnap.com>
Reviewed by: mhorne
MFC after: 3 days
Sponsored by: Tarsnap Backup Inc.
Pull Request: https://github.com/freebsd/freebsd-src/pull/1475
These were reported by `mandoc -T lint ...` as errors.
Signed-off-by: Graham Percival <gperciva@tarsnap.com>
Reviewed by: mhorne, Alexander Ziaee <concussious.bugzilla@runbox.com>
Sponsored by: Tarsnap Backup Inc.
Pull Request: https://github.com/freebsd/freebsd-src/pull/1472
Similar to how the network stack needs to use mb_unmapped_to_ext() to
convert mbufs before passing them to an unsupported driver, if_bridge
needs to avoid passing M_EXTPG mbufs to interfaces that don't support
them. Thus, clear IFCAP_MEXTPG on the bridge if any member interfaces
don't handle unmapped mbufs.
PR: 278245
Reviewed by: jhb, gallatin
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D47294
In the hammer2 label reader, make sure to check for a NULL return from
read_buf().
In the NTFS label reader,
- Avoid an infinite loop if a record length is 0.
- Avoid walking past the end of the buffer.
- When a label is found, avoid reading past the end of the buffer.
PR: 278281
Reviewed by: emaste
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D47292
This adds support for the Realtek 8922AE PCI
wireless network (Wi-Fi 7) adapter.
This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
98f7e32f20d28ec452afb208f9cffc08448a2652 ( tag: v6.11 ).
Sponsored by: The FreeBSD Foundation
MFC after: 14 days
This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
98f7e32f20d28ec452afb208f9cffc08448a2652 ( tag: v6.11 ).
Sponsored by: The FreeBSD Foundation
MFC after: 14 days
This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
98f7e32f20d28ec452afb208f9cffc08448a2652 ( tag: v6.11 ).
Sponsored by: The FreeBSD Foundation
MFC after: 14 days
Bring in the LinuxKPI 802.11 compat bits which are altering
the mac80211 KPI.
* In struct ieee80211_bss_conf chandef -> chanreq.
* Various struct ieee80211_ops gained a link_id arguemnt,
stop gained a suspend flag.
* Various functions gained a link_id argument.
* ieee80211_tx_status() was renamed to ieee80211_tx_status_skb()
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
I tried to use LINUXKPI_VERSION to work out a plan which allows us to
compile linuxkpi_wlan and the LinuxKPI based wireless drivers without
interruption and flip a switch on the go.
I assume, with a lot of extra detours making the linuxkpi_wlan
implementation KPI changes compile time dependent would have been
possible and might be needed in the future.
One problem is that the various drivers currently in main were from
different sources or different hashes of the Linux wireless-testing.git
repository at last and we have no common base to use and
LINUXKPI_VERSION checks seem to slightly overlap.
Pulling drivers from official Linux version releases now will avoid
that problem and keep all drivers on the same KPI level in the future
which should avoid this problem.
The other problem is that the merges from the vendor branches are
independent and so the first merge will need to have the LinuxKPI
changes before but in between the (old) drivers will not compile
(unless linuxkpi_wlan can deal with both KPI versions).
For this time it was simply not possible to align all the changes
and instead we disable building the drivers over the merge window
only not to break intermediate builds. After LinuxKPI 802.11 was
updated and drivers are merged from vendor branches we will
re-attach them to the build.
Sponsored by: The FreeBSD Foundation
Bring ing the LinuxKPI 802.11 compat bits which are not altering
the mac80211 ops KPI.
* Add various functions for drvier updates.
* Add functions (some compat code to I assume cleanup some
mac80211 ops) emulating chanctx changes doing (*config) updates.
* Adjust structs and defines.
* Deal with an enum growing more than 32 bits in printf.
* Add a mtx to struct wiphy which is exposed to the drivers.
Handle initialization and destruction for now.
* Implementation of wiphy_work and wiphy_delayed_work.
* Set was_assoc for deassoc/deauth in prep_tx_info.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
There is no actual need for the VM object to be locked when initializing
a VM page iterator.
Reviewed by: dougm
Differential Revision: https://reviews.freebsd.org/D47298
Using short temp filenames as /tmp/temp.XXXX (4 or 6 X) was probably ok
20 years ago, but not anymore. Best practice is to use 10 X. Given that our
users often copy & paste examples from our manual pages we need to
update the documentation.
PR: 261437
Using short temp filenames as /tmp/temp.XXXX (4 or 6 X) was probably ok
20 years ago, but not anymore. Best practice is to use 10 X. Given that our
users often copy & paste examples from our manual pages we need to
update the documentation.
PR: 261437
+ add controller name to title for search keywords
- remove "for the freebsd operating system" from title/search keywords
- remove `(R)` from the page title for consistency with other drivers
- increase specificity of HARDWARE for inclusion in Release HW Notes
- order HARDWARE in reverse chronological so non-eol appear first
- s/PCI/PCIe/
MFC after: 3 days
Reported by: kbowling (additional hardware supported)
Pull Request: https://github.com/freebsd/freebsd-src/pull/1494
In the QEMU workaround code in if_ixv.c, the ixv driver calls
pci_find_cap(dev, PCIY_MSIX, &rid). It is not checking the return code
from that function and the function appears to always be failing. This
then causes the driver to use the rid variable uninitialized, which
will mean setting a bit at an arbitrary offset in pci config space. For
now, this seems to have no adverse impact, but it could easily cause
very subtle problems.
PR: 207037
MFC after: 3 days
Sponsored by: BBOX.io
If MTU of the if_ixv VF driver is configured between 1501 and 2030, and
if a peer box have bigger MTU and sends a packet bigger than MTU into
this guest, kernel could crash.
Dynamically calculate the receive packet size on rx_mbuf_sz as ix(4)
does.
PR: 268092
Reported by: Kumara Babu <nkumarababu@gmail.com>
MFC after: 3 days
Sponsored by: BBOX.io
As explained in PR 277038, iflib calls IFDI_DETACH() and then
IFDI_QUEUES_FREE(). With igc, the latter writes to a register after it
has been unmapped.
igc_if_detach() already calls igc_release_hw_control(), and looking at
callers of igc_if_queues_free(), that appears to be sufficient. So,
just remove the igc_release_hw_control() call.
PR: 277038
Reported by: Mike Belanger <mibelanger@qnx.com>
Reviewed by: kbowling
Tested by: kbowling
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D47293
Flow-director support is not fully implemented and will cause
errors if enabled. Mention this in the ixgbe(4) manual.
PR: 202663
MFC after: 3 days
Co-authored-by: Alexander Ziaee <concussious@runbox.com>
Pull Request: https://github.com/freebsd/freebsd-src/pull/1493
Some kernel modules will print informative messages when they are
loaded, making the output confusing. Print everything up front instead.
Fixes: 152382e6613d ("rc.d/kld: Print the kernel modules being loaded")
C23 (ISO/IEC 9899:2024) is not out yet, but will be shortly.
SVID1 is needed for the history section of memccpy(3).
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D47284
Use pctrie iterators for swblk traversal in more swap_pager
functions: swap_pager_haspage, swp_pager_meta_lookup, and
swap_pager_getpages.
Reported by: markj
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D47232
The purpose of this script is to detect absolute symlinks on
a machine, e.g.:
/etc/localtime -> /usr/share/zoneinfo/UTC
Some of these absolute symbolic links can be created intentionally,
but it is usually better to use relative symlinks.
You can run the script after `make installworld', or any other
make targets thats installs files.
You can also check your local ports with:
env ABSOLUTE_SYMLINK_DIRS=/usr/local ./absolute-symlink.sh