Commit graph

291516 commits

Author SHA1 Message Date
Vladimir Kondratyev
ccfbbe2d8a rtlbtfw: Firmware loader for Realtek 87XX/88XX bluetooth USB adaptors
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)
2024-12-22 06:34:35 +03:00
Vladimir Kondratyev
5ce844d3da ng_ubt_intel: Allow to attach to 9260 bluetooth adaptors
with operational mode firmware.

Sponsored by:	Future Crew LLC
MFC after:	1 month
Reviewed by:	bz
Differential Revision:	https://reviews.freebsd.org/D46734

(cherry picked from commit 19a577ea5cae1238065106de9080cb6f3e66034d)
2024-12-22 06:34:24 +03:00
Vladimir Kondratyev
f5b685add0 ng_ubt(4): do not attach Realtek 87XX/88XX adaptors in bootloader mode.
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)
2024-12-22 06:34:09 +03:00
Vladimir Kondratyev
624635e2ad iwmbtfw(8): Ignore unexpected HCI events
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)
2024-12-22 06:33:54 +03:00
Vladimir Kondratyev
8e62ae9693 iwmbtfw(4): Add support for 9260/9560 bluetooth adaptors
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)
2024-12-22 06:33:43 +03:00
Matthew Nygard Dodd
c620dfb037 hidraw(4): update hgd_actlen in HIDRAW_GET_REPORT ioctl
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)
2024-12-22 06:33:27 +03:00
Matthew Nygard Dodd
4bbc69192e uhid(4): update ugd_actlen in USB_GET_REPORT ioctl
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)
2024-12-22 06:33:16 +03:00
Jose Luis Duran
0520d2ea9d
nanobsd: Remove dependency on bsdlabel
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)
2024-12-21 17:04:24 +00:00
Jose Luis Duran
a7d56527c2
geom: Allow BSD type '!0' partitions
Allow the creation of '!0' partition types.

Fix it by not considering "0" an invalid partition type.

Reviewed by:	emaste
Approved by:	emaste (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D47652

(cherry picked from commit accf71534c612b76ee2701f2dfcaa464748e527a)
2024-12-21 17:04:07 +00:00
Dmitry Morozovsky
859e098fd1 services: fix typo ucp -> udp
Fix two proto name typos

MFC after:	2 weeks

(cherry picked from commit 7aa7f4b5c324a0f698b3ae1e39856cc087a14e0c)
2024-12-21 14:50:35 +03:00
Rick Macklem
efe6a09973 fs: Add static asserts for the size of fid structures
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)
2024-12-20 14:07:12 -08:00
Konstantin Belousov
705337455f amd iommu: remove unused function
(cherry picked from commit 58d1fdfaa90a5365a5f951e2ac80e0fce02ca9bb)
2024-12-18 16:20:41 +02:00
Mark Johnston
9daf6d6419 shm: Handle swap pager allocation failures
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)
2024-12-18 13:43:56 +00:00
Mark Johnston
113875f916 iflib: Set the NUMA domain in receive packet headers
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)
2024-12-18 13:43:49 +00:00
Tobias Heider
0c5701ff8f pfkey: Fix some checks in kdebug_sadb()
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)
2024-12-18 13:43:42 +00:00
Mark Johnston
60786eb3fe sockstat: Ensure that there is always a space between columns
PR:		282978
Reviewed by:	asomers
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D47840

(cherry picked from commit fbd3448614fbd7bd92e7d34c3bfd2592a07391e3)
2024-12-18 13:43:34 +00:00
Colin Percival
2f57e37c43 release: Standardize on *-${FS}.* VM image naming
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)
2024-12-16 16:54:16 -08:00
Jose Luis Duran
8e8ccdf02e
nanobsd: Fix typos
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)
2024-12-16 15:12:23 +00:00
Jose Luis Duran
7f50357e0d
nanobsd: Fix cust_comconsole search patterns
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)
2024-12-16 15:12:15 +00:00
Jose Luis Duran
7594f6ce25
nanobsd: Use the real path for NANO_PACKAGE_DIR
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)
2024-12-16 15:12:05 +00:00
Jose Luis Duran
4b26b3d2ac
nanobsd: Update fill_pkg.sh
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)
2024-12-16 15:11:57 +00:00
Jose Luis Duran
897c8ff0df
nanobsd.8: Chase usage string updates
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)
2024-12-16 15:11:49 +00:00
Jose Luis Duran
6df2857eaa
nanobsd: Avoid read-only file system warnings
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)
2024-12-16 15:11:39 +00:00
Jose Luis Duran
67dd41cdb1
nanobsd: Fix parallel make
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)
2024-12-16 15:11:31 +00:00
Jose Luis Duran
3e93a090b5
nanobsd: Add missing options to usage()
-B suppress installs (both kernel and world)
-I build disk image from existing build/install
-W suppress installworld

PR:		277269
Reviewed by:	imp, emaste
Approved by:	emaste (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D47475

(cherry picked from commit 999f288a0eeb230d3655da94c1186ca03c0cc404)
2024-12-16 15:11:22 +00:00
Dag-Erling Smørgrav
efefeefd43 uniq: Correctly document the -D option.
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)
2024-12-16 10:38:06 +00:00
Dag-Erling Smørgrav
259dcedc4a strptime: Fix day-of-week calculation.
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)
2024-12-16 10:37:08 +00:00
Ed Maste
453f6aa428 Cirrus-CI: Switch default job to llvm19-amd64
Clang/LLVM19 matches the default in-tree toolchain.

Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 5e310866c3733cbf2e38e15c3f16cba16136829e)
2024-12-15 19:39:08 -05:00
Ed Maste
6d1d5577ce Makefile.inc1: Require DISTDIR be set for make distributeworld
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)
2024-12-15 19:39:08 -05:00
Pat Maddox
d6b36d1c83 newvers: Set explicit git revision length
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)
2024-12-15 19:39:08 -05:00
Zhenlei Huang
005b6caf26 netinet: Use NULL for VNET_SYSINIT's last arg, which is a pointer type
MFC after:	3 days

(cherry picked from commit ac51711cab6e55a99ee0a565fe0ae30c0305c854)
2024-12-15 10:20:54 +08:00
Zhenlei Huang
3c3a622a75 inpcb: Use NULL for VNET_SYSINIT's last arg, which is a pointer type
MFC after:	3 days

(cherry picked from commit ec6e7677a0dbfbcdb4b740b28a1105256f1fc93e)
2024-12-15 10:20:53 +08:00
Zhenlei Huang
8293bd6285 rtsock: Use NULL for VNET_SYS[UN]INIT's last arg, which is a pointer type
MFC after:	3 days

(cherry picked from commit adc573c8e2179310777cef4d6bda19db2ae63dd5)
2024-12-15 10:20:53 +08:00
Zhenlei Huang
bca3a925b0 routing: Use NULL for VNET_SYS[UN]INIT's last arg, which is a pointer type
MFC after:	3 days

(cherry picked from commit 12b2d68bed37e379929cd9b5e0afe34c387be360)
2024-12-15 10:20:53 +08:00
Zhenlei Huang
23c1619970 cuse: Use NULL for SYSUNINIT's last arg, which is a pointer type
MFC after:	3 days

(cherry picked from commit 6854a1488932cd043da940b87eb956d6df7d8522)
2024-12-15 10:20:53 +08:00
Zhenlei Huang
3021a0bcb0 init_main: Fix logging of the SYSINIT process
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)
2024-12-15 10:20:53 +08:00
Zhenlei Huang
9c6454fe70 init_main: Use TUNABLE_INT_FETCH to initialize verbose_sysinit
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)
2024-12-15 10:20:52 +08:00
Ed Maste
8f944cba50 Cirrus-CI: Add manual LLVM 19 jobs
The base system compiler is now Clang/LLVM 19.

Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 944f45b8094ce70eef14d07afc333250ad063a49)
2024-12-14 13:07:21 -05:00
Kristof Provost
ac92792bbd pfctl: clear statistic for specified addresses
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)
2024-12-14 11:03:27 +01:00
Brooks Davis
9bc9cf4a2a style(9): deprecate blank lines without local vars
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)
2024-12-13 21:37:40 +00:00
Warner Losh
1ad44b7f0e style: Allow C++ comments
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)
2024-12-13 21:35:28 +00:00
Warner Losh
ecfe308542 style(9): Add comments about branch prediction
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)
2024-12-13 21:34:08 +00:00
Warner Losh
76ec0faf1c style(9): Delete __FBSDID straggler
We no longer need advice on __FBSDID, so delete it.

Sponsored by:		Netflix

(cherry picked from commit a1cfe4c7646bcae56276ba89c1fe316f426c3d8c)
2024-12-13 21:31:15 +00:00
Warner Losh
2317a68524 style(9): Note larger divergence than implied
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)
2024-12-13 21:30:43 +00:00
Minsoo Choo
8664202799 style(9): Remove $FreeBSD$ recommendation.
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)
2024-12-13 21:30:25 +00:00
Brooks Davis
960665e47f style(9): Remove ancient SCCS tags.
This is a partial, manual merge of 97759ccc as not merging it here
causes every docdate bump to conflict.
2024-12-13 21:27:04 +00:00
Zhihao Yuan
c71b427bfa nvi: Replace Clang-only __builtin_is_aligned with C code (#124)
We should use alignof in the future.

Obtained from: 25c4d7db4e

(cherry picked from commit 06a98fefd3d3ff42b7e7832af6c0736b98f167ac)
2024-12-13 21:05:24 +00:00
Brooks Davis
3e9f61464e nvi: use memmove to realign buffers
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)
2024-12-13 21:05:19 +00:00
Jessica Clarke
f69b6410a6 depend-cleanup.sh: Extend clean_dep to support a custom regex
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)
2024-12-13 20:58:38 +00:00
Dmitry Salychev
795e9c9b55
dpaa2: Fix kernel built with ACPI_DEBUG
PR:			282800
Reported by:		phk
Tested by:		bz
MFC after:		3 days
Differential Revision:	https://reviews.freebsd.org/D47666

(cherry picked from commit c2dd2be344fbf59cf95f6773d4b09cc7dda0f876)
2024-12-13 21:05:53 +01:00