Firmware files are available in the comms/rtlbt-firmware port.
Sponsored by: Future Crew LLC
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D46739
(cherry picked from commit 5036d9652a5701d00e9e40ea942c278e9f77d33d)
Attempt to initialize FreeBSD bluetooth stack while such a device is in
bootloader mode locks the adapter hardly so it requires power on/off
cycle to restore.
This change blocks ng_ubt attachment unless operational firmware is
loaded thus preventing the lock up.
Sponsored by: Future Crew LLC
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D46738
(cherry picked from commit 24ae172a50352ad4fd22989477f29ecca5aed6e3)
If Intel firmware is already in operational mode at boot that takes
place at warm boot, BT adaptor can generate extra HCI events which
interferes with firmware mode detection logic. Ignore them.
Sponsored by: Future Crew LLC
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D46737
(cherry picked from commit aa0b938434a8af8eebf8f2634914f2d9fe8a5dc4)
Required firmware files are already included in to comms/iwmbt-firmware port
Sponsored by: Future Crew LLC
MFC after: 1 month
Reviewed by: bz
Differential Revision: https://reviews.freebsd.org/D46735
(cherry picked from commit c1643cedbf243424370162febf6d9180bdd1df58)
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
(cherry picked from commit f4f46a2eef3be6d19c65a4ca4ee70f365dd5be4f)
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
(cherry picked from commit 0b5d86b38ae9aec92ef96b9227a404a2df3c9234)
The bsdlabel utility is deprecated, gpart should be used instead:
- Offset the first 16 sectors, just like bsdlabel did (used for
metadata)
- Use a freebsd-ufs partition type (regardless bsdlabel creating a
'!0')
Reviewed by: emaste, imp
Approved by: emaste (mentor)
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D47653
(cherry picked from commit 87e87fecb139d60a00837f004de0d37dbecd205c)
File system specific *fid structures are copied into the generic
struct fid defined in sys/mount.h.
As such, they cannot be larger than struct fid.
This patch adds _Static_assert()s to check for this.
ZFS and fuse already have _Static_assert()s.
(cherry picked from commit 91b5592a1e1af97480d615cf508be05b5674d2f3)
shm_alloc() can fail if swap reservation fails (i.e., vm.overcommit is
non-zero) or racct is imposing some limits on swap usage.
PR: 282994
MFC after: 2 weeks
Reviewed by: olce, kib
Differential Revision: https://reviews.freebsd.org/D47839
(cherry picked from commit f3b7dbdad53b31492757417fc1336ed74ec80fd8)
Reading PR 273559 made me realize that commit 767723ddebe9 is
incomplete. iflib should set the NUMA domain of received packets before
passing them to protocol layers.
PR: 273559
Reviewed by: zlei, kbowling, erj
Fixes: 767723ddebe9 ("iflib: Use if_alloc_dev() to allocate the ifnet")
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D47841
(cherry picked from commit 3d642b0f71c501dd9ee7aa0487788f619900d297)
Besides not doing any sufficient check that the length of a parsed
message is not bigger than the actual allocated buffer, kdebug_sadb()
incorrectly compares ext->sadb_ext_len, the extension payload size in 8
byte chunks, with tlen, which is the full message payload size in bytes.
This should compare PFKEY_UNUNIT64(ext->sadb_ext_len) with tlen instead.
PR: 277456
MFC after: 2 weeks
(cherry picked from commit 0dab21248bc9fab09e92b0c037303c921ebb1b8d)
We publish three sets of VM images on download.freebsd.org:
* Generic VM images
* BASIC-CLOUDINIT VM images
* BASIC-CI VM images
Of these, the first had names like
FreeBSD-14.2-RELEASE-amd64-ufs.raw.xz,
the second had names like
FreeBSD-14.2-RELEASE-amd64-BASIC-CLOUDINIT.ufs.qcow2.xz,
and the third had names like
FreeBSD-14.2-RELEASE-amd64-BASIC-CI.ufs.raw.xz
but were listed in the CHECKSUM files with names like
FreeBSD-14.2-RELEASE-amd64-BASIC-CI-ufs.raw.xz
Standardize these to consistently use a hyphen before the filesystem
type rather than a period.
Note: On FreeBSD 14 we ship images without the -${FS} component in
their names; these are hardlinks to the -ufs images for compatibility
purposes. On FreeBSD 13 we only have UFS images and don't include the
filesystem in the name.
MFC after: 1 week
Reported by: jmg
Sponsored by: Amazon
(cherry picked from commit 35623ccc375846648f4dcdfc47c7e84fc9db4852)
Fix a number of typos in the code or comments.
Files under dhcpd, embedded, pcengines, and rescue were intentionally
omitted. These directories will be reviewed at a later date.
PR: 269884
Reviewed by: imp, zlei
Approved by: emaste (mentor)
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D47587
(cherry picked from commit 12cbad923dbcccb3d6f71a77ad3241508f186048)
The current patterns are outdated, and may produce "offifexists", after
e310437971 ("For video consoles, only launch a getty if the device
exists.").
Fix the expressions to:
1. Disable getty(8) on the virtual syscons(4) or vt(4) terminals
(/dev/ttyv*).
2. Enable the use of the first serial port as the system console.
Reviewed by: imp
Approved by: emaste (mentor)
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D47586
(cherry picked from commit 0f7b0db5dd07e7c48285db4cac19e15fc9a42622)
As users may have the Pkg directory as a symbolic link to the NanoBSD
"package dump directory". In commit 9af130ae8c, cust_pkgng() was
greatly improved, however as a side effect of using a nullfs mount, the
directories and files must not be symlinks.
Fix it by using NANO_PACKAGE_DIR realpath().
PR: 269884
Reviewed by: imp
Approved by: emaste (mentor)
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D47532
(cherry picked from commit 4223c668e4b9ba71e2c6cfabbd66795729b7ff8b)
fill_pkg.sh is a script that links a package and its dependencies from a
"package dump" directory (like /usr/ports/packages/All) to a specified
directory (NANO_PACKAGE_DIR), for cust_pkgng()[*].
Update the script by:
- Using `make package-name` instead of `make -V pkgname`
- Looking for package files with *.pkg instead of *.txz
- Adding a -c option that copies the files instead of linking them[*]
[*] After 9af130ae8c cust_pkgng() cannot be used with a directory
populated by fill_pkg.sh, because it uses a nullfs mount, which doesn't
follow symlinks, therefore the links inside NANO_PACKAGE_DIR will not
work.
PR: 269884
Reviewed by: imp
Approved by: emaste (mentor)
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D47531
(cherry picked from commit 4db04f5e3a9bd927ba1173bf8d3b6a70178eab5f)
Update the manual page for NanoBSD to match its usage.
Reviewed by: emaste, imp
Approved by: emaste (mentor)
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D47505
(cherry picked from commit f6f311d8cdacdc964967e83c8f6377d8465806d5)
The default setting of some loader or rc variables generate warnings
because the file system is read-only:
Set the following options to avoid printing these warnings:
/boot/defaults/loader.conf:
- hostuuid_load="NO" to disable loading /etc/hostid early at boot time
- entropy_cache_load="NO" to disable loading cached entropy at boot time
- kern.random.initial_seeding.disable_bypass_warnings="1" to disable
logging a warning if the 'bypass_before_seeding' knob is enabled
(enabled by default) and a request is submitted prior to initial
seeding
/etc/defaults/rc.conf:
- kldxref_enable="NO" to disable building linker.hints files with
kldxref(8)
- entropy_boot_file="NO" to disable very early (used at early boot-time)
entropy caching through reboots
- entropy_dir="NO" to disable caching entropy via cron
While here, move rc.conf options before sourcing vendor.conf, so they
can be overridden.
PR: 277601
Reviewed by: imp
Approved by: emaste (mentor)
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D47502
(cherry picked from commit e5579f98c02ff64b0c305f6731c3557ba69c2d25)
The NANO_NCPU (number of CPUs) value gets ignored by the build script
when setting the NANO_PMAKE (parallel make) value.
Fix it by setting the NANO_PMAKE later in the process.
PR: 277269
Reviewed by: imp, emaste
Approved by: emaste (mentor)
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D47476
(cherry picked from commit 3c5d19a40de7273bb478163639dd8532af425595)
The -D option takes an optional argument; modify the usage message
and the manual page's synopsis to correctly reflect this. Also
update the tests to exercise -D with and without an argument.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: asomers
Differential Revision: https://reviews.freebsd.org/D47999
(cherry picked from commit b93791f5e7b0246b121dd98c10d6563298d6b2b0)
uniq: Fix off-by-one bug in -cD case.
When printing only duplicated lines, the first line of each set is not
printed until we encounter the second. When that happens, we need to
increment the repetition count between printing the first and the
second line, so that if we are also printing counts, we don't print the
same (pre-increment) count twice.
MFC after: 1 week
PR: 275764
Reported by: Yu-Sheng Ma <s110062131@m110.nthu.edu.tw>
Submitted by: Daniel Tameling <tamelingdaniel@gmail.com> (original patch)
Sponsored by: Klara, Inc.
Reviewed by: tamelingdaniel_gmail.com, asomers, emaste
Differential Revision: https://reviews.freebsd.org/D48000
(cherry picked from commit c3f8900e696998c410dc16f9bd9d45c24c413e6b)
The day-of-week calculation used the raw year value without adjusting
for TM_YEAR_BASE, so it was off by one for 300 years out of every 400;
it just happened to be correct for 1901 through 2000. It also used a
loop where a simple addition would have sufficed.
While here, simplify our version of Gauss's algorithm, and document
that we assume the Gregorian calendar.
MFC after: 1 week
PR: 282916
Reviewed by: imp, allanjude, philip
Differential Revision: https://reviews.freebsd.org/D47977
(cherry picked from commit 4285e024baa80f81d13cdcc016fdf0721fe57862)
Clang/LLVM19 matches the default in-tree toolchain.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 5e310866c3733cbf2e38e15c3f16cba16136829e)
distributeworld is the target used to stage world for building dist sets
for release targets, and is not really intended for end-user use. If
DISTDIR is not set we would attempt to write to the root directory.
Error out in this case, serving as an assertion that an internal target
is not being used incorrectly.
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48030
(cherry picked from commit f6575ed0deb08026c5ee261495e000831688e5a2)
The --short flag is configurable. Setting an explicit length supports
reproducible builds.
Signed-off-by: Pat Maddox <pat@patmaddox.com>
Reviewed by: emaste, imp
Differential Revision: https://github.com/freebsd/freebsd-src/pull/1547
(cherry picked from commit a1097094c4c5d810287aca092f4ab5f9f86a426a)
The current subsystem, aka `sip->subsystem`, should be logged, rather
than the last one.
Reviewed by: mhorne
Fixes: 5a8fceb3bd boottrace: trace annotations for startup and shutdown
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D47903
(cherry picked from commit 5997b1933142116041af7549eb2f450b4714b823)
It is too late to initialize verbose_sysinit via TUNABLE_INT, as
TUNABLE_INT runs at the order of SI_SUB_TUNABLES, thus any subsystems
those have order prior or equal to SI_SUB_TUNABLES are not logged.
Reviewed by: kevans
Fixes: c7962400c9 Add debug.verbose_sysinit tunable for VERBOSE_SYSINIT
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D47907
(cherry picked from commit a7cfcb26451219d6f4e60c486c855adeea288397)
The base system compiler is now Clang/LLVM 19.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 944f45b8094ce70eef14d07afc333250ad063a49)
The ioctl DIOCRCLRASTATS provides the functionality of clearing stats
not only for the whole table for for addresses stored in that table. The
functionality was missing from pfctl, though. Add it now.
PR: 282877
Obtained from: OpenBSD, kirill <kirill@openbsd.org>, e496dff3a7
MFC after: 3 weeks
(cherry picked from commit 6463b6b59152fb1695bbe0de78f6e2675c5a765a)
Previously (208be1617c) such lines were made optional and several
of us had the impression that they were more completely deprecated.
Do that now.
Requiring a blank line at the top of a function if there are no local
declerations dates to the original style.9 commit (b030a30523) and was
present in the first version of admin/style/style from mckusick@ in 1991.
It's certainly consistant to have a blank line after a null-set of
variables, but today it's unique to BSD source code and an occational
point of friction to new developers.
Document the historic practice and encourage removal in the context of
other changes, but not sweeping removal commits for their own sake.
Reviewed by: imp, emaste
Differential Revision: https://reviews.freebsd.org/D47887
(cherry picked from commit ebfb117e2e04ea71b88e4285cbb1b54d9cc5248c)
(cherry picked from commit 028dae5d3e886fe4c171689d9fc733e1bd68be71)
Attempt to craft the more-or-less conesnsus view on C++ BCPL-style
comments. Allowing them seemed to have wide support. Consistent use was
highly desired. What constituted consistent use, however, didn't have
good consensus especially with multi-line comments. Craft something
that's a little vague to allow what appears to be a range in common
practices elsewhere and no good way to drive this do absolute agreement.
We should revisit this point in 6-12 months after we get some experience
with it.
Sponsored by: Netflix
Discussed with: many in the code reivew, see discussion there
Differential Revision: https://reviews.freebsd.org/D35960
(cherry picked from commit 0a59a6b02fccef82644439a5165b7e0b751049c3)
This is a partial merge of:
cdefs.h: Add back comment about branch prediction
Add back, with editing, the comments about branch prediction, when to
use it, etc. Offer stronger opinions about this in style(9). Add in the
convention for FreeBSD that we do only the entire expression in the if
expression. Advise use only when it makes things measurably faster.
Requested by: jhb
Sponsored by: Netflix
Reviewed by: brooks, jhb
Differential Revision: https://reviews.freebsd.org/D45837
(cherry picked from commit fd31c0946ee2240491db1301c2d33eb846221a54)
Times have changed, and we've diverged somewhat from the original style
guide, while still keeping much of the flavor and flair of its spirit as
the C language has evolved over the last 30 years since 4.4 was
released.
Sponsored by: Netflix
(cherry picked from commit a26b96a930da44bbc0cc28e5764b9b6a2cf5b352)
Now that stable/12 is now EOL, there's no reason to do this. They've
been proactively removed from the tree.
Reviewed by: imp, lwhsu
Differential Revision: https://reviews.freebsd.org/D43641
(cherry picked from commit bea67504c66d455ae2a5ebea2677682cdab8e576)
Replace a rather convoluted realignment algorithm with memmove(). In
addition to being hard to understand, the code would read beyond the end
of the input buffer in certain conditions (found on CheriBSD).
Sponsored by: DARPA
Pull Request: https://github.com/lichray/nvi2/pull/122
(cherry picked from commit 56ef9c872bc5b086d73fed6317159e40be32d40e)
This will avoid having to duplicate the loop every time the default
regex isn't good enough, and will be used by upcoming commits.
(cherry picked from commit cc30f4ae6790cf4f19bc4787d7528dfea79ef27a)