]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 weeks agotzsetup: be explicit about *timezone* abbreviation
Ed Maste [Mon, 25 Mar 2024 20:25:23 +0000 (16:25 -0400)]
tzsetup: be explicit about *timezone* abbreviation

During the install process tzsetup asks a question like

    Does the abbreviation `EDT' look reasonable?

The installer asks lots of questions, some that relate to the previous
screen or topic and some that do not.  A new user installed FreeBSD for
the first time and was confused by this question, not realizing that it
was asking whether the abbreviation is correct for the selected
timezone.

Reviewed by: bapt, brooks, imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D44500

7 weeks agomv: Set file flags after setting file times
Ricardo Branco [Sat, 16 Mar 2024 17:13:10 +0000 (18:13 +0100)]
mv: Set file flags after setting file times

Some file flags prevent modification of file times, so they should be
set later.  This matches NetBSD's behaviour.

Reviewed by: markj
MFC after: 1 week
Pull Request: https://github.com/freebsd/freebsd-src/pull/1138

7 weeks agostress2: Add an option to exit on error
Peter Holm [Tue, 16 Apr 2024 08:22:03 +0000 (10:22 +0200)]
stress2: Add an option to exit on error

7 weeks agostress2: Add new unionfs test scenarios
Peter Holm [Tue, 16 Apr 2024 08:21:14 +0000 (10:21 +0200)]
stress2: Add new unionfs test scenarios

7 weeks agox86/xen: fix accounted interrupt time
Roger Pau Monné [Tue, 5 Mar 2024 13:15:03 +0000 (14:15 +0100)]
x86/xen: fix accounted interrupt time

The current addition to the interrupt nesting level in
xen_arch_intr_handle_upcall() needs to be compensated in
xen_intr_handle_upcall(), otherwise interrupts dispatched by the upcall handler
end up seeing a td_intr_nesting_level of 2 or more, which makes them assume
there's been an interrupt nesting.

Such extra interrupt nesting count lead to statclock() reporting idle time as
interrupt, as the call from interrupt context will always be seen as a nested
one (td->td_intr_nesting_level >= 2) due to the nesting count increase done by
both xen_arch_intr_handle_upcall() and intr_execute_handlers().

Fix this by adjusting the nested interrupt count before dispatching interrupts
from xen_intr_handle_upcall().

PR: 277231
Reported by: Matthew Grooms <mgrooms@shrew.net>
Fixes: af610cabf1f4 ('xen/intr: adjust xen_intr_handle_upcall() to match driver filter')
Sponsored by: Cloud Software Group
Reviewed by: Elliott Mitchell <ehem+freebsd@m5p.com>

7 weeks agotcp bbr: improve code consistency
Michael Tuexen [Mon, 15 Apr 2024 21:52:08 +0000 (23:52 +0200)]
tcp bbr: improve code consistency

Improve code consistency with the RACK stack.
Reviewed by: gallatin, rscheff
MFC after: 3 days
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D44800

7 weeks agosrc.libnames.mk: fix LIBPFCTL definition
Lexi Winter [Sun, 14 Apr 2024 10:37:46 +0000 (11:37 +0100)]
src.libnames.mk: fix LIBPFCTL definition

Following the convention used in the rest of this file, ${LIBPFCTLDIR}
should refer to the directory, and ${LIBPFCTL} to the library itself.

Instead, both values were assigned to ${LIBPFCTL}, and ${LIBPFCTLDIR} was
not set at all.

This appears to be a simple typo and not a deliberate choice, so fix it
by assigning the directory name to ${LIBPFCTLDIR} instead.

7 weeks agosys/acl.h: reduce header pollution
Brooks Davis [Mon, 15 Apr 2024 16:55:07 +0000 (17:55 +0100)]
sys/acl.h: reduce header pollution

In commit d1dfd921774f0 the acl allocator was switched from malloc(9) to
uma(9) and done in a way required vm/uma.h and prerequisites.  This added
considerable header pollution to sys/sysproto.h.  The uma details were
hidden in commit b998d381f2868, but the header pollution remained.  Add
less broad includes as required to keep the header self contained.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D44468

7 weeks agoacl_to_text: include sys/param.h for MAXLOGNAME
Brooks Davis [Mon, 15 Apr 2024 16:54:53 +0000 (17:54 +0100)]
acl_to_text: include sys/param.h for MAXLOGNAME

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D44474

7 weeks agosysproto.h: sys/acl.h -> sys/types.h
Brooks Davis [Mon, 15 Apr 2024 16:54:28 +0000 (17:54 +0100)]
sysproto.h: sys/acl.h -> sys/types.h

In sysproto.h, stop including sys/acl.h as syscall defintions now use
__acl* types from sys/_types.h.  Add sys/types.h to provide types
previously provided by sys/param.h (via sys/acl.h).

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D44467

7 weeks agosys/_{cpu,domain}set.h: don't require sys/param.h
Brooks Davis [Mon, 15 Apr 2024 16:53:39 +0000 (17:53 +0100)]
sys/_{cpu,domain}set.h: don't require sys/param.h

Add machine/param.h for MAXCPU and MAXMEMDOM in the _KERNEL case of
sys/_cpuset.h and sys/_domainset.h, making them more self contained.

This eliminates the need to include sys/param.h before sys/cpuset.h and
sys/domainset.h.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D44466

7 weeks agoReduce reliance on sys/sysproto.h pollution
Brooks Davis [Mon, 15 Apr 2024 16:53:05 +0000 (17:53 +0100)]
Reduce reliance on sys/sysproto.h pollution

Add sys/errno.h, sys/malloc.h, sys/queue.h, and vm/uma.h as needed.

sys/sysproto.h currently includes sys/acl.h which currently includes
sys/param.h, sys/queue.h, and vm/uma.h which in turn bring in
sys/errno.h sys/malloc.h.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D44465

7 weeks agosys/malloc.h: move sys/proc.h MALLOC_DECLAREs here
Brooks Davis [Mon, 15 Apr 2024 16:52:40 +0000 (17:52 +0100)]
sys/malloc.h: move sys/proc.h MALLOC_DECLAREs here

This avoids the need to explicitly include sys/malloc.h before
sys/proc.h.

Suggested by: kib
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D44766

7 weeks agoLinuxKPI: add __counted_by() and __nonstring
Bjoern A. Zeeb [Tue, 2 Apr 2024 09:41:54 +0000 (09:41 +0000)]
LinuxKPI: add __counted_by() and __nonstring

Add checks for __counted_by(_x) and __nonstring as and depending
on compiler support enable the attribute/feature.

This is needed to make mtk76 and ath1xk drivers compile.

Sposnored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: emaste, dim
Differential Revision: https://reviews.freebsd.org/D44587

7 weeks agogit/mfc-candidates.sh: allow comments in exclude file
Bjoern A. Zeeb [Tue, 28 Nov 2023 19:09:07 +0000 (19:09 +0000)]
git/mfc-candidates.sh: allow comments in exclude file

As branches ages, the list of unmerged or unmergable changes may grow
longer.  In some cases it is helpful to group and or annotate them
in an exclude file.  Filtering out lines starting with "#" allows adding
comment lines to aid tracking.

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D42790

7 weeks agoLinuxKPI: 802.11: disable early queue wakeup workaround; better classify
Bjoern A. Zeeb [Fri, 16 Feb 2024 21:14:02 +0000 (21:14 +0000)]
LinuxKPI: 802.11: disable early queue wakeup workaround; better classify

We used to call lkpi_wake_tx_queues() for all queues early on in order
to make sure they are ready.  Turns out whatever logic in iwlwifi
startup is working correctly these days under LinuxKPI so this is no
longer needed.  As the comment indicated the "workaround" did not
always work.  Disable it for now.

The second part of the improvement is to properly classify Non-QOS
non-data frames (mgmt and ctl frames for now, unless we have to be
even more careful in the future about certain sub-types) as TID 7/VO.
Contrary to net80211 we must not promote PAE frames.

PR: 274382
MFC after: 3 day
Reviewed by: cc
Differential Revision: https://reviews.freebsd.org/D43944

7 weeks agonet80211: amrr_init: change order of commands
Bjoern A. Zeeb [Mon, 5 Feb 2024 14:48:08 +0000 (14:48 +0000)]
net80211: amrr_init: change order of commands

First run the KASSERT before trying to do the free operation.
Better for reporting and debugging.
Add a guard setting the value to NULL afterwards.  NULL pointers
are a lot easier to test for.

MFC after: 3 days
Reviewed by: cc
Differential Revision: https://reviews.freebsd.org/D43751

7 weeks agoLinuxKPI: 802.11: remove unneeded re-lookup in lkpi_80211_txq_tx_one()
Bjoern A. Zeeb [Sun, 18 Feb 2024 18:07:00 +0000 (18:07 +0000)]
LinuxKPI: 802.11: remove unneeded re-lookup in lkpi_80211_txq_tx_one()

Given we are passed the lsta in as a function argument there is no
need to re-lookup the sta by ni and possibly not find it.
We know the sta and ni from the lsta and whether it is uploaded to
firmware or not we can check directly from the local lsta flag.

MFC after: 3 days
Reviewed by: cc
Differential Revision: https://reviews.freebsd.org/D43965

7 weeks agoLinuxKPI: add devm_kfree()
Bjoern A. Zeeb [Tue, 2 Apr 2024 09:45:43 +0000 (09:45 +0000)]
LinuxKPI: add devm_kfree()

mt76 calls devm_kfree() directly, so alias it to our
lkpi_devm_kmalloc_release() function.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D44589

7 weeks agoMerge commit 37b7207651b4 from llvm-project (by zhongyunde@huawei.com):
Dimitry Andric [Mon, 15 Apr 2024 16:24:39 +0000 (18:24 +0200)]
Merge commit 37b7207651b4 from llvm-project (by zhongyunde@huawei.com):

  [SimplifyCFG] Fix crash when there is unreachable large index (#88616)

  The large case index out of scope is dead code, but it is still be
  created for TableContents in SwitchLookupTable::SwitchLookupTable,
  so make sure the table size after growing should not get smaller.

  Fix https://github.com/llvm/llvm-project/issues/88607

This should fix "Assertion failed: (idx < size()), function operator[]"
when building the science/dynare port.

PR: 276104, 278320
Reported by: yuri
MFC after: 1 month

7 weeks agoLinuxKPI: napi_schedule() requires return value, implement napi_is_scheduled()
Bjoern A. Zeeb [Sun, 31 Mar 2024 17:27:45 +0000 (17:27 +0000)]
LinuxKPI: napi_schedule() requires return value, implement napi_is_scheduled()

A newer version of iwlwifi requires a return value from napi_schedule();
unclear if the function always should have been bool. Add the bool to test
based on the napi_schedule_prep() result.

Also add napi_is_scheduled() for rtw89.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: emaste (previous version)
Differential Revision: https://reviews.freebsd.org/D44591

7 weeks agoLinuxKPI: sk_buff: implement skb_queue_splice_tail_init()
Bjoern A. Zeeb [Tue, 2 Apr 2024 09:17:31 +0000 (09:17 +0000)]
LinuxKPI: sk_buff: implement skb_queue_splice_tail_init()

Implement skb_queue_splice_tail_init() and SKB_DATA_ALIGN() as
needed by the mt76 wireless driver.

Sponsord by: The FreeBD Foundation
MFC after: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D44590

7 weeks agoiflib: Fix compiler warnings
Stephen J. Kiernan [Wed, 3 Apr 2024 20:21:55 +0000 (16:21 -0400)]
iflib: Fix compiler warnings

Some of the QUAD sysctls are actually for unsigned quad values.
Switch to using UQUAD instead, as that is meant for unsigned.

Reviewed by: erj, jhb
Obtained from: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D44620

7 weeks agosnd_hda: fix "duplicated free" on module unloading
Michael Zhilin [Sat, 13 Apr 2024 09:59:24 +0000 (12:59 +0300)]
snd_hda: fix "duplicated free" on module unloading

This is trivial fix of hdacc_detach to avoid duplicated free on snd_hda
unloading.

The first try of detaching (kldunload) may results into "device busy" error,
but codec->fgs is freed by detach. Second try attempts to free codec->fgs again
and system panicks.

Here is example:

pcm0: unregister: channel pcm0:virtual:dsp0.vp0 busy (pid 3428)
pulseaudio[3428] [oss] module-oss.c: DSP shutdown.
pcm0: detached
hdaa0: detached
panic: Duplicate free of 0xfffff80412ee7d20 from zone 0xfffffe006bc0ba00
(malloc-32) slab 0xfffff80412ee7fc8(105)
cpuid = 6
time = 1712999565
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe0202f859e0
vpanic() at vpanic+0x135/frame 0xfffffe0202f85b10
panic() at panic+0x43/frame 0xfffffe0202f85b70
uma_dbg_free() at uma_dbg_free+0x105/frame 0xfffffe0202f85b90
uma_zfree_arg() at uma_zfree_arg+0x95/frame 0xfffffe0202f85be0
free() at free+0xa1/frame 0xfffffe0202f85c20
hdacc_detach() at hdacc_detach+0x2f/frame 0xfffffe0202f85c40
device_detach() at device_detach+0x197/frame 0xfffffe0202f85c80
devclass_driver_deleted() at devclass_driver_deleted+0x66/frame 0xfffffe0202f85c
devclass_delete_driver() at devclass_delete_driver+0x81/frame 0xfffffe0202f85d00
driver_module_handler() at driver_module_handler+0xff/frame 0xfffffe0202f85d50
module_unload() at module_unload+0x32/frame 0xfffffe0202f85d70
linker_file_unload() at linker_file_unload+0x1eb/frame 0xfffffe0202f85db0
kern_kldunload() at kern_kldunload+0x18e/frame 0xfffffe0202f85e00
amd64_syscall() at amd64_syscall+0x153/frame 0xfffffe0202f85f30
fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe0202f85f30

MFC after:              3 days
Reviewed by:            markj, christos
Differential Revision:  https://reviews.freebsd.org/D44778
Sponsored by:           Postgres Professional

7 weeks agosnd_hda: Add the full Intel Meteor/Arrow/Lunar Lake HD Audio PCI IDs
Michael Zhilin [Sat, 13 Apr 2024 09:57:59 +0000 (12:57 +0300)]
snd_hda: Add the full Intel Meteor/Arrow/Lunar Lake HD Audio PCI IDs

This is based off the Linux file sound/hda/intel-dsp-config.c.

Tested on:              Lenovo Thinkbook 16 G6+ IMH
MFC after:              3 days
Reviewed by:            markj, christos
Differential Revision:  https://reviews.freebsd.org/D44777
Sponsored by:           Postgres Professional

7 weeks agorelease: Build dvd image before staging pkgs
Colin Percival [Sun, 14 Apr 2024 22:31:26 +0000 (15:31 -0700)]
release: Build dvd image before staging pkgs

This missing dependency is only visible with -jN (which was otherwise
broken until recently) and only when building DVD images (which aren't
included in weekly snapshots and thereby slipped past testing).

MFC after: 3 days

7 weeks agoMakefile.vm: Set CLEANDIRS correctly for vm-image
Colin Percival [Sun, 14 Apr 2024 22:27:19 +0000 (15:27 -0700)]
Makefile.vm: Set CLEANDIRS correctly for vm-image

With multiple filesystems and disk image formats, we now use different
staging directories; we need to include them all in CLEANDIRS.

Fixes: 97bd53ef4d20b "Makefile.vm: Fix duplicate rc.conf files"
MFC after: 3 days

7 weeks agorelease: Use the ABI of the target release to fetch packages
John Baldwin [Sat, 13 Apr 2024 21:16:01 +0000 (14:16 -0700)]
release: Use the ABI of the target release to fetch packages

- Point --rootdir at the installed destdir in the dvd tree.  This
  causes pkg to determine the ABI from the installed destdir instead
  of the host's binaries.  Previously the result was that packages
  for the host's ABI were always downloaded breaking cross-releases
  (e.g. arm64 releases built on an amd64 host included amd64
  packages on the DVD ISO image rather than arm64 packages).  This
  also handles version mismatches, and I tested this by cross-building
  a 15.x arm64 release on a 14.x amd64 host.

- As a result, pkg now does a chdir(3) to the rootdir before running,
  so the -o argument to fetch needs to be updated to be relative to
  rootdir instead of the CWD as make runs.

- Add a new ROOTDIR variable to limit references to "dvd" to one
  place.  Ideally ROOTDIR would be an argument to this script so
  that it didn't really know about the dvd layout at all.

- While here, simplify creation of symlinks by just using a longer
  path to the link name instead of using 'cd' in the shell before
  invoking ln(1).  Also use ln -sf to create the pkg.pkg symlink
  rather than rm + ln.

PR: 278273
Reported by: gatekeeper <tiago.gasiba@gmail.com>
Reviewed by: imp, delphij
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D44749

7 weeks agocloudware: allow disk format to be a list
Colin Percival [Sun, 14 Apr 2024 17:44:07 +0000 (10:44 -0700)]
cloudware: allow disk format to be a list

Make basic-cloudinit available both in qcow2 and raw formats

MFC After: 3 days
Co-Authored-By: bapt
Sponsored by: OVHCloud (original patch from bapt)
Differential Revision: https://reviews.freebsd.org/D44747

7 weeks agonet8011: radiotap: add more EHT constants
Bjoern A. Zeeb [Tue, 2 Apr 2024 23:34:22 +0000 (23:34 +0000)]
net8011: radiotap: add more EHT constants

MFC after: 3 days

7 weeks agofreebsd-update: Add check for kernel modules
Fernando Apesteguía [Wed, 19 Apr 2023 16:08:47 +0000 (18:08 +0200)]
freebsd-update: Add check for kernel modules

People get confused when some software (VirtualBox, etc) does not work as
expected (or at all) after a major upgrade.

We have a nice way to deal with this when using sources, namely including
PORTS_MODULES in /etc/make.conf, but we lack something similar for binary
updates.

This patch retrieves a list of kernel modules installed from packages and
advises the user to recompile from ports to avoid problems.

Approved by: zlei@
Differential Revision: https://reviews.freebsd.org/D39695

7 weeks agosanitizers: mark __elf_aux_vector as weak, to allow linking without libsys
Dimitry Andric [Sun, 14 Apr 2024 17:38:42 +0000 (19:38 +0200)]
sanitizers: mark __elf_aux_vector as weak, to allow linking without libsys

After libsys was introduced, linking sanitized programs started failing
with:

  # c++ -fsanitize=address main.cc
  ld: error: undefined symbol: __elf_aux_vector
  >>> referenced by sanitizer_linux_libcdep.cpp:950 (/usr/src/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp:950)
  >>>     sanitizer_linux_libcdep.o:(__sanitizer::ReExec()) in archive /usr/lib/clang/17/lib/freebsd/libclang_rt.asan-x86_64.a
  c++: error: linker command failed with exit code 1 (use -v to see invocation)

Mark __elf_aux_vector as weak in the internal sanitizer declaration, so
the linker will accept it at link time. The dynamic linker will then
take care of the symbol at run time.

Suggestion by: brooks
PR: 276104, 277393
MFC after: 1 month

7 weeks agombuf: restore m_uiotombuf() feature of returning a zero length mbuf
Gleb Smirnoff [Sun, 14 Apr 2024 17:21:07 +0000 (10:21 -0700)]
mbuf: restore m_uiotombuf() feature of returning a zero length mbuf

PR: 278340
Fixes: aba79b0f4a3f69f070ace6effd5700d65226bd20

7 weeks agotests/unix_stream: test that send(2) of zero bytes is successful
Gleb Smirnoff [Sun, 14 Apr 2024 17:19:20 +0000 (10:19 -0700)]
tests/unix_stream: test that send(2) of zero bytes is successful

Put this simple test into an existing file.  We don't have a designated
file for all unix/stream tests.  There is extensive unix_seqpacket_test,
but (at least right now) unix/seqpacket is not a superset of unix/stream,
but a different implementation.  We have one file that does one test for
unix/stream - unix_socketpair_test.  So rename it to unix_stream and start
collecting all unix/stream tests in it.

7 weeks agoObsoleteFiles.inc: fix timestamps of the recent entries
Gleb Smirnoff [Sun, 14 Apr 2024 17:19:20 +0000 (10:19 -0700)]
ObsoleteFiles.inc: fix timestamps of the recent entries

7 weeks agoamdsmn(4), amdtemp(4): add support for AMD Family 19h Models 10h-1Fh.
Xin LI [Sun, 14 Apr 2024 07:45:17 +0000 (00:45 -0700)]
amdsmn(4), amdtemp(4): add support for AMD Family 19h Models 10h-1Fh.

Tested on AMD Threadripper 7960X.

PR: kern/278311
Tested by: jbo
MFC after: 1 week

7 weeks agodaemon: fix -R to enable supervision mode
Mathieu [Sun, 14 Apr 2024 03:10:06 +0000 (22:10 -0500)]
daemon: fix -R to enable supervision mode

If we're doing restarts, then we must supervise -- the 'R' case simply
got missed.

PR: 278342
Fixes: f907027b49d ("daemon: set supervise_enabled during [..]")

7 weeks agosys: Retire the ISCSI_INITIATOR_DEBUG option
John Baldwin [Sun, 14 Apr 2024 02:16:13 +0000 (19:16 -0700)]
sys: Retire the ISCSI_INITIATOR_DEBUG option

This was used by the old iSCSI initiator, not the current one.

Reported by: trasz

7 weeks agox86 NOTES: Move shared options from amd/i386 NOTES to x86 NOTES
John Baldwin [Sun, 14 Apr 2024 02:12:07 +0000 (19:12 -0700)]
x86 NOTES: Move shared options from amd/i386 NOTES to x86 NOTES

While here, reorder some of the entries using headers more aligned
with sys/conf/NOTES.  Also add a pointer from the amd64/i386 NOTES
files to x86 NOTES.

The "extra" ACPI device drivers were only present in i386 NOTES
previously.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D44787

7 weeks agoNOTES: Move ENABLE_ALART option to MI NOTES next to intpm device
John Baldwin [Sun, 14 Apr 2024 02:11:49 +0000 (19:11 -0700)]
NOTES: Move ENABLE_ALART option to MI NOTES next to intpm device

This option is for this driver.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D44786

7 weeks agox86 NOTES: Move NKPT and PMAP_SHPGPERPROC options to VM OPTIONS section
John Baldwin [Sun, 14 Apr 2024 02:11:21 +0000 (19:11 -0700)]
x86 NOTES: Move NKPT and PMAP_SHPGPERPROC options to VM OPTIONS section

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D44785

7 weeks agox86 NOTES: Remove some obsolete comments
John Baldwin [Sun, 14 Apr 2024 02:11:06 +0000 (19:11 -0700)]
x86 NOTES: Remove some obsolete comments

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D44784

7 weeks agoi386: Use DEV_HYPERV to enable HyperV APIC vector
John Baldwin [Sun, 14 Apr 2024 02:10:44 +0000 (19:10 -0700)]
i386: Use DEV_HYPERV to enable HyperV APIC vector

This avoids requiring both 'device hyperv' and 'options HYPERV' for
kernel configs.  Instead, just 'device hyperv' can now be used
matching the kernel configuration used for amd64.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D44783

7 weeks agoNOTES: Move the VirtIO entries to the MI NOTES file
John Baldwin [Sun, 14 Apr 2024 02:10:27 +0000 (19:10 -0700)]
NOTES: Move the VirtIO entries to the MI NOTES file

While here, add virtio_gpu

Reviewed by: imp, emaste
Differential Revision: https://reviews.freebsd.org/D44782

7 weeks agofiles: Sort the VirtIO device entries
John Baldwin [Sun, 14 Apr 2024 02:10:14 +0000 (19:10 -0700)]
files: Sort the VirtIO device entries

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D44781

7 weeks agoNOTES: Move safe(4) to the MI NOTES file
John Baldwin [Sun, 14 Apr 2024 02:09:57 +0000 (19:09 -0700)]
NOTES: Move safe(4) to the MI NOTES file

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D44780

7 weeks agoNOTES: Move IEEE80211_DEBUG_REFCNT to the MI NOTES file
John Baldwin [Sun, 14 Apr 2024 02:09:38 +0000 (19:09 -0700)]
NOTES: Move IEEE80211_DEBUG_REFCNT to the MI NOTES file

This option is not specific to amd64

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D44779

7 weeks agosound: Remove leftover references to snd_clone
Christos Margiolis [Sat, 13 Apr 2024 17:12:27 +0000 (19:12 +0200)]
sound: Remove leftover references to snd_clone

The snd_clone framework does not exist as of
e8c0d15a64fadb4a330f2da7244becaac161bb70 ("sound: Get rid of snd_clone
and use DEVFS_CDEVPRIV(9)"), so remove leftover references to it from
unit.c.

Sponsored by: The FreeBSD Foundation
MFC after: 2 months
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D44758

7 weeks agonullfs: Show correct exported flag.
Dag-Erling Smørgrav [Sat, 13 Apr 2024 15:20:49 +0000 (17:20 +0200)]
nullfs: Show correct exported flag.

MFC after: 3 days
Reviewed by: allanjude, kib
Differential Revision: https://reviews.freebsd.org/D44773

7 weeks agoRevert commit 925a11a5f221 from llvm-project (by Nikolas Klauser):
Dimitry Andric [Sat, 13 Apr 2024 08:44:26 +0000 (10:44 +0200)]
Revert commit 925a11a5f221 from llvm-project (by Nikolas Klauser):

  [libc++] Simplify is_convertible

  GCC 13 has added __is_convertible(), so we don't need to keep the fallback implementation around.

  Reviewed By: #libc, Mordante

  Spies: Mordante, libcxx-commits

  Differential Revision: https://reviews.llvm.org/D157939

This should allow buildworld with gcc 12 to work again.

PR: 276104
MFC after: 1 month

7 weeks agorelease: Fix powerpc boot block uudecoding
Colin Percival [Sat, 13 Apr 2024 00:50:15 +0000 (17:50 -0700)]
release: Fix powerpc boot block uudecoding

Confusingly, uuencode writes to stdout by default, but uudecode does not.

Fixes: 6c3e01bf8578 "release: Randomize powerpc boot block file name"
MFC after: 3 days

7 weeks agozfsd: fix unit tests after 89f4f91dbfdcabe65bc7476bc5f13dfb837870fe
Alan Somers [Wed, 10 Apr 2024 20:55:03 +0000 (14:55 -0600)]
zfsd: fix unit tests after 89f4f91dbfdcabe65bc7476bc5f13dfb837870fe

Reported by: markj
MFC after: 1 week
MFC with: 89f4f91dbfdcabe65bc7476bc5f13dfb837870fe
Sponsored by: Axcient
Reviewed by: Alek Pinchuk <pinchuk.alek@gmail.com>
Differential Revision: https://reviews.freebsd.org/D44744

7 weeks agoLinuxKPI: add dev_alloc_pages()
Bjoern A. Zeeb [Tue, 2 Apr 2024 09:44:29 +0000 (09:44 +0000)]
LinuxKPI: add dev_alloc_pages()

Add dev_alloc_pages() though it seems a weird KPI, not passing a dev
despite its name.  Used by updated wireless driver.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D44588

7 weeks agoLinuxKPI: add BITS_TO_BYTES()
Bjoern A. Zeeb [Tue, 2 Apr 2024 23:48:05 +0000 (23:48 +0000)]
LinuxKPI: add BITS_TO_BYTES()

Just like BITS_TO_LONG() ... used in rtw89.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D44603

7 weeks agoLinuxKPI: implement memzero_explicit()
Bjoern A. Zeeb [Tue, 2 Apr 2024 09:30:49 +0000 (09:30 +0000)]
LinuxKPI: implement memzero_explicit()

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D44586

7 weeks agoLinuxKPI: add further constants to pci.h
Bjoern A. Zeeb [Sun, 31 Mar 2024 17:26:29 +0000 (17:26 +0000)]
LinuxKPI: add further constants to pci.h

Updated wireless drivers require more knowledge about PCI (BAR) bits.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D44573

7 weeks agokldxref: Prefer sys/cdefs.h __unreachable over the builtin
Collin Funk [Fri, 12 Apr 2024 22:38:19 +0000 (16:38 -0600)]
kldxref: Prefer sys/cdefs.h __unreachable over the builtin

The __builtin_unreachable macro provided by Clang and GCC is a hint to
the compiler used for optimization. The programs work fine even if the
compiler doesn't support it. The sys/cdefs.h has had __unreachable for
9 years (commit 732b31de5d9244bd1cc98192e09ee1881e9f55e9). It expands
to the builtin if it is available. In the rare case that it is
unsupported it expands to a null statement so compilation does not
fail.

Signed-off-by: Collin Funk <collin.funk1@gmail.com>
Reviewed by: imp, freebsd@igalic.co
Pull Request: https://github.com/freebsd/freebsd-src/pull/1117

7 weeks agodaemon: Prefer sys/cdefs.h __unreachable over the builtin
Collin Funk [Fri, 12 Apr 2024 22:38:18 +0000 (16:38 -0600)]
daemon: Prefer sys/cdefs.h __unreachable over the builtin

The __builtin_unreachable macro provided by Clang and GCC is a hint to
the compiler used for optimization. The programs work fine even if the
compiler doesn't support it. The sys/cdefs.h has had __unreachable for
9 years (commit 732b31de5d9244bd1cc98192e09ee1881e9f55e9). It expands
to the builtin if it is available. In the rare case that it is
unsupported it expands to a null statement so compilation does not
fail.

Signed-off-by: Collin Funk <collin.funk1@gmail.com>
Reviewed by: imp, freebsd@igalic.co
Pull Request: https://github.com/freebsd/freebsd-src/pull/1117

7 weeks agonproc: Prefer sys/cdefs.h __unreachable over the builtin
Collin Funk [Fri, 12 Apr 2024 22:38:18 +0000 (16:38 -0600)]
nproc: Prefer sys/cdefs.h __unreachable over the builtin

The __builtin_unreachable macro provided by Clang and GCC is a hint to
the compiler used for optimization. The programs work fine even if the
compiler doesn't support it. The sys/cdefs.h has had __unreachable for
9 years (commit 732b31de5d9244bd1cc98192e09ee1881e9f55e9). It expands
to the builtin if it is available. In the rare case that it is
unsupported it expands to a null statement so compilation does not
fail.

Signed-off-by: Collin Funk <collin.funk1@gmail.com>
Reviewed by: imp, freebsd@igalic.co
Pull Request: https://github.com/freebsd/freebsd-src/pull/1117

7 weeks agolibc(bt_utils.c): fix "contiguous" spelling
rilysh [Tue, 13 Feb 2024 08:48:39 +0000 (14:18 +0530)]
libc(bt_utils.c): fix "contiguous" spelling

From "contigous" to "contiguous".

Signed-off-by: rilysh <nightquick@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1119

7 weeks agolibc(bt_seq.c): fix "uninitialized" spelling
rilysh [Tue, 13 Feb 2024 08:47:03 +0000 (14:17 +0530)]
libc(bt_seq.c): fix "uninitialized" spelling

From "unitialized" to "uninitialized".

Signed-off-by: rilysh <nightquick@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1119

7 weeks agolibc(xdr_reference.c): fix "referenced" spelling
rilysh [Fri, 12 Apr 2024 22:32:06 +0000 (16:32 -0600)]
libc(xdr_reference.c): fix "referenced" spelling

From "referneced" to referenced".

Signed-off-by: rilysh <nightquick@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1119

7 weeks agolibc(xdr.c): fix "discriminated" spelling
rilysh [Fri, 12 Apr 2024 22:32:06 +0000 (16:32 -0600)]
libc(xdr.c): fix "discriminated" spelling

From "descriminated" to "discriminated".

Signed-off-by: rilysh <nightquick@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1119

7 weeks agolibc(inet_net_pton.c): fix "Fiery" spelling
rilysh [Fri, 12 Apr 2024 22:32:05 +0000 (16:32 -0600)]
libc(inet_net_pton.c): fix "Fiery" spelling

From "Firey" to "Fiery".

Signed-off-by: rilysh <nightquick@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1119

7 weeks agolibc(localeconv.c): fix "appropriate" spelling
rilysh [Fri, 12 Apr 2024 22:32:05 +0000 (16:32 -0600)]
libc(localeconv.c): fix "appropriate" spelling

From "approprate" to "appropriate".

Signed-off-by: rilysh <nightquick@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1119

7 weeks agostyle.mdoc.5: maintenence
Alexander Ziaee [Fri, 12 Apr 2024 22:28:12 +0000 (16:28 -0600)]
style.mdoc.5: maintenence

- description: increase visibility by s/file/manual page/
- examples: s/No Doing Something/Doing Something/
- examples: remove depreciated .Li macro
- examples: remove extra newline (one display block)
- see also: link roff language reference for mandoc

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1130

7 weeks agomsun: Fix math error in comment explaining y reduction
Henri Chataing [Fri, 12 Apr 2024 22:08:01 +0000 (16:08 -0600)]
msun: Fix math error in comment explaining y reduction

x = k + y for some integer k and |y| < 1/2
exp2(x) = exp2(k + y) = exp2(k) * exp2(y)
which can be written as 2**k * exp2(y)

The original had x = 2**k + y, which is has an extra 2** in it which
isn't correct.

Confirmed by forumula 2 in Gal and Bachelis referenced in the comments
for the source of this method
https://dl.acm.org/doi/pdf/10.1145/103147.103151

The actual code is correct.

Reviewed by: imp (who added s_exp2.c and wrote the commit message)
Pull Request: https://github.com/freebsd/freebsd-src/pull/1127

7 weeks agogenet: add module (if_genet.ko)
Lexi Winter [Fri, 12 Apr 2024 21:41:11 +0000 (15:41 -0600)]
genet: add module (if_genet.ko)

The driver already had the appropriate module macros, it just wasn't
hooked into the build system.

Since this device is specific to the Raspberry Pi 4, only build it for
AArch64.

Reviewed by: imp, emaste (earlier version)
Pull Request: https://github.com/freebsd/freebsd-src/pull/1139

7 weeks agofiles.x86: Pull in some more duplicate lines from files.{amd64,i386}
John Baldwin [Fri, 12 Apr 2024 21:35:45 +0000 (14:35 -0700)]
files.x86: Pull in some more duplicate lines from files.{amd64,i386}

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D44759

7 weeks agodefaults/rc.conf: Remove /usr/lib32 from ldconfig32_paths
John Baldwin [Fri, 12 Apr 2024 21:35:23 +0000 (14:35 -0700)]
defaults/rc.conf: Remove /usr/lib32 from ldconfig32_paths

Commit 99132daf6f70cb0cc969c555d3612547fa3cf1db prepends /usr/lib32 to
the list of paths in ldconfig32_paths since it is a standard library
path in ld-elf32.so.1.  Remove /usr/lib32 from the value in rc.conf so
that it is not listed twice.

Reviewed by: olce, kib
Sponsored by: University of Cambridge, Google, Inc.
Differential Revision: https://reviews.freebsd.org/D44752

7 weeks agorc.d/ldconfig: Compute ldconfig paths in a function
Konrad Witaszczyk [Fri, 12 Apr 2024 21:34:59 +0000 (14:34 -0700)]
rc.d/ldconfig: Compute ldconfig paths in a function

Move logic that computes paths passed to ldconfig(8) to a
ldconfig_paths() function that can be called for multiple ABIs.

Reviewed by: olce, kib
Obtained from: CheriBSD
Differential Revision: https://reviews.freebsd.org/D44751

7 weeks agolibc: Remove support for pre-C99 C standards
Minsoo Choo [Fri, 12 Apr 2024 19:05:09 +0000 (12:05 -0700)]
libc: Remove support for pre-C99 C standards

Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D43254

7 weeks agosound: Update some LICENSE headers
Christos Margiolis [Fri, 12 Apr 2024 18:34:27 +0000 (20:34 +0200)]
sound: Update some LICENSE headers

The following commits introduced substantial changes to pcm/dsp.c,
pcm/sndstat.c and pcm/sound.c.

9da3b645dbaaad724d524727d003fed7be05ff7c ("sound: Move
sndstat_prepare_pcm() to pcm/sndstat.c and remove
sndstat_entry->handler")
e8c0d15a64fadb4a330f2da7244becaac161bb70 ("sound: Get rid of snd_clone
and use DEVFS_CDEVPRIV(9)")

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D44757

7 weeks agomath: Add long double constant definitions
Collin Funk [Fri, 12 Apr 2024 17:12:59 +0000 (11:12 -0600)]
math: Add long double constant definitions

These constants are GNU libc extensions that are likely to be adopted
by the next POSIX revision [1]. The definitions can be verified in
a PARI-GP shell session:

* M_El: exp (1)
* M_LOG2El: log (exp (1)) / log (2)
* M_LOG10El: log (exp (1)) / log (10)
* M_LN2l: log (2)
* M_LN10l: log (10)
* M_PIl: Pi
* M_PI_2l: Pi / 2
* M_PI_4l: Pi / 4
* M_1_PIl: 1 / Pi
* M_2_PIl: 2 / Pi
* M_2_SQRTPIl: 2 / sqrt (Pi)
* M_SQRT2l: sqrt (2)
* M_SQRT1_2l: 1 / sqrt (2)

[1] https://austingroupbugs.net/view.php?id=828

Put these behind __BSD_VISIBLE || __XSI_VISIBLE >= 800 to future-proof
these changes. They shouldn't be defined at lower levels of XSI, but don't
have other XSI 800 stuff in place yet.

Signed-off-by: Collin Funk <collin.funk1@gmail.com>
Reviewed by: imp, allanjude
Pull Request: https://github.com/freebsd/freebsd-src/pull/1121

7 weeks agorelease: Randomize powerpc boot block file name
Colin Percival [Fri, 12 Apr 2024 17:42:05 +0000 (10:42 -0700)]
release: Randomize powerpc boot block file name

With parallel builds enabled, we can end up building multiple ISOs at
once, which causes problems if mkisoimages.sh uses a consistent file
name "/tmp/hfs-boot-block".

MFC after: 3 days

7 weeks agorelease: Support r/o /usr/ports for cloudware
Colin Percival [Fri, 12 Apr 2024 17:20:25 +0000 (10:20 -0700)]
release: Support r/o /usr/ports for cloudware

Set WRKDIRPREFIX=/tmp/ports DISTDIR=/tmp/distfiles when building tools
needed for uploading cloudware images.

While I'm here, adjust the bsdec2-image-upload build target to match
the style used by the Azure/GCE/Vagrant Makefiles.

MFC after: 3 days

7 weeks agoinstall: Don't skip syncing in the common case.
Dag-Erling Smørgrav [Fri, 12 Apr 2024 17:30:55 +0000 (19:30 +0200)]
install: Don't skip syncing in the common case.

In `copy()`, if no digest was requested (which is the common case), we
use `copy_file_range()` to avoid needlessly copying the contents of the
file into user space and back.  When `copy_file_range()` returns
successfully (which, again, is the common case), we simply return, and
therefore never get to the point where we call `fsync()` if the `-S`
option was specified.  Fix this.

MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D44756

7 weeks agoinstall: Simplify path construction.
Dag-Erling Smørgrav [Fri, 12 Apr 2024 17:30:52 +0000 (19:30 +0200)]
install: Simplify path construction.

There's no need to copy the path twice to split it into base and dir.
We simply call `basename()` first, then handle the two trivial cases in
which it isn't safe to call `dirname()`.

While here, add an early check that the destination is not an empty
string.  This would always fail eventually, so it may as well fail
right away.  Also add a test case for this shortcut.

MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D44743

7 weeks agoinstall: Always use a temporary file.
Dag-Erling Smørgrav [Fri, 12 Apr 2024 17:30:48 +0000 (19:30 +0200)]
install: Always use a temporary file.

Previously, we would only use a temporary file if explicitly asked to
with the `-S` option, and even then, only if the target file already
existed.  This meant that an outside observer looking for the target
file might see a partial file, and might see the file disappear and
then reappear.

With this patch, we always use a temporary file, ensuring atomicity.
The downside is slightly increased disk usage.  The upside is never
having to worry about, for instance, cron jobs randomly failing if
they happen to run simultaneously with `make installworld`.

The `-S` option is retained, partly for compatibility, and partly
to control the use of `fsync(2)`, which has a non-negligible cost
(approximately 10% increase in wall time for `make installworld`).

MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: 0mp, brooks, imp, markj
Differential Revision: https://reviews.freebsd.org/D44742

7 weeks agoefidev: Allow for optionally including efidev and efirtc into the kernel
Stephen J. Kiernan [Wed, 10 Apr 2024 21:44:59 +0000 (17:44 -0400)]
efidev: Allow for optionally including efidev and efirtc into the kernel

Require both "efirt" and "efidev" in order to build in efidev
Require both "efirt" and "efirtc" in order to build in efirtc

Update FIRECRACKER, GENERIC, and NOTES for amd64
Update NOTES and std.arm for arm64

Reviewed by: imp
Obtained from: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D44745

7 weeks agoibcore: Remove the use of NULL_IB_OBJECT
Ka Ho Ng [Fri, 12 Apr 2024 16:57:35 +0000 (16:57 +0000)]
ibcore: Remove the use of NULL_IB_OBJECT

LinuxKPI's XArray implementation accepts NULL as an input as of the
following commit:
 - linuxkpi: Accept NULL as a value in linux_xarray (3102ea3b15b6)

Sponsored by: Juniper Networks, Inc.
MFC after: 1 week
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D44533

7 weeks agouart_snps: Register a device xref for UARTs
Ka Ho Ng [Fri, 12 Apr 2024 16:56:42 +0000 (16:56 +0000)]
uart_snps: Register a device xref for UARTs

This is useful for other drivers to be able to find the UART (such as
the case of UARTs where hardware flow control lines are handled by
another device.)

Sponsored by: Juniper Networks, Inc.
MFC after: 1 week
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D44532

7 weeks agointro.1: 2024 edition
Alexander Ziaee [Fri, 12 Apr 2024 16:57:54 +0000 (10:57 -0600)]
intro.1: 2024 edition

Modernize intro.1, attempting to preserve style and brevity,
including a paragraph about installing more commands, a FILES
section explaining where the commands are located and why, and
adding section number to HISTORY for clarity.

Advances: #248562
Reviewed by: imp, mhrone
Pull Request: https://github.com/freebsd/freebsd-src/pull/1136

7 weeks agosys/netinet6/in6_pcb.c: fix compile without INET
Lexi Winter [Fri, 12 Apr 2024 16:54:24 +0000 (10:54 -0600)]
sys/netinet6/in6_pcb.c: fix compile without INET

in6_mapped_sockaddr() and in6_mapped_peeraddr() both define a local
variable named 'inp', but in the non-INET case, this variable is set
and never used, causing a compiler error:

/src/freebsd/src/lf/sys/netinet6/in6_pcb.c:547:16: error:
variable 'inp' set but not used [-Werror,-Wunused-but-set-variable]
  547 |         struct  inpcb *inp;
      |                        ^
/src/freebsd/src/lf/sys/netinet6/in6_pcb.c:573:16: error:
variable 'inp' set but not used [-Werror,-Wunused-but-set-variable]
  573 |         struct  inpcb *inp;

Fix this by guarding all the INET-specific logic, including the variable
definition, behind #ifdef INET.

While here, tweak formatting in in6_mapped_peeraddr() so both functions
are the same.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1155

7 weeks agosys/dev/irdma/irdma_cm: fix compile without INET
Lexi Winter [Fri, 12 Apr 2024 16:47:16 +0000 (10:47 -0600)]
sys/dev/irdma/irdma_cm: fix compile without INET

irdma_get_vlan_ipv4() calls ip_ifp_find() even if INET isn't defined, in
which case this function isn't available.

Stub this out for the non-INET case to return an error (0xffff) instead.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1156

7 weeks agosys/netipsec: fix IPSEC_SUPPORT for non-INET kernels
Lexi Winter [Fri, 12 Apr 2024 16:30:20 +0000 (10:30 -0600)]
sys/netipsec: fix IPSEC_SUPPORT for non-INET kernels

The functions ipsec_kmod_udp_input() and ipsec_kmod_udp_pcbctl() are
used by netinet6 for IPSEC_SUPPORT, but are guarded behind #ifdef INET.

Since neither of these require INET, remove the guard so they're built
even without INET.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1158

7 weeks agoNow that D44168 has been merged to stable/14, update the manpage
Mark Murray [Fri, 12 Apr 2024 15:33:54 +0000 (16:33 +0100)]
Now that D44168 has been merged to stable/14, update the manpage
to correctly reflect history.

7 weeks agoSupport BTI in rtld
Andrew Turner [Wed, 5 Apr 2023 12:44:31 +0000 (13:44 +0100)]
Support BTI in rtld

Read the elf note to decide when to set the guard page on arm64.

Reviewed by: kib
Sponsored by: Arm Ltd
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39452

7 weeks agoatrtc(4): Fix a typo in a sysctl description
Gordon Bergling [Fri, 12 Apr 2024 12:32:48 +0000 (14:32 +0200)]
atrtc(4): Fix a typo in a sysctl description

- s/emtpy/empty/

MFC after: 5 days

8 weeks agoarm64: Support hardware breakpoints
Andrew Turner [Tue, 12 Mar 2024 17:14:38 +0000 (17:14 +0000)]
arm64: Support hardware breakpoints

As with watchpoints allow the kernel debugger to set hardware
breakpoints on arm64.

These have been tested to work in both the ddb and gdb backends.

Reviewed by: jhb (earlier version)
Sponsored by: Arm Ltd
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D44355

8 weeks agosys/gdb: Support hardware breakpoints
Andrew Turner [Thu, 14 Mar 2024 15:09:03 +0000 (15:09 +0000)]
sys/gdb: Support hardware breakpoints

Support the use of hardware breakpoints in the kernel gdb stub.

Reviewed by: jhb (earlier version)
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D44354

8 weeks agosys/ddb: Add hardware breakpoint support to ddb
Andrew Turner [Tue, 12 Mar 2024 17:01:26 +0000 (17:01 +0000)]
sys/ddb: Add hardware breakpoint support to ddb

As with hardware watchpoints add support for hardware breakpoints. The
command is only enabled on architectures that report support for them.
Currently no architectures do, however arm64 will add support in a
future change.

Reviewed by: jhb (earlier version)
Sponsored by: Arm Ltd
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D22191

8 weeks agoddb: Start to generalise breakpoints
Andrew Turner [Thu, 21 Mar 2024 14:11:17 +0000 (14:11 +0000)]
ddb: Start to generalise breakpoints

To allow for hardware breakpoints it is useful to reuse the same
management code. Start to generalise the code by moving common data
into a new struct and pas this to internal functions to work with.

Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D44461

8 weeks agobcm2838_xhci: Need to generate ofw_bus_if.h
Warner Losh [Fri, 12 Apr 2024 01:00:45 +0000 (19:00 -0600)]
bcm2838_xhci: Need to generate ofw_bus_if.h

Add ofw_bus_if.h to SRCS so that this will always be generated so this
can build standalone, or when FDT isn't in the kernel.

Fixes: ac83063d37e5e92ad048cc4ed958654c02103f74 (for LINT-ACPI)
Sponsored by: Netflix

8 weeks agoMerge commit 55c466da2f2f from llvm-project (by Benjamin Kramer):
Dimitry Andric [Thu, 11 Apr 2024 21:12:42 +0000 (23:12 +0200)]
Merge commit 55c466da2f2f from llvm-project (by Benjamin Kramer):

  [X86][AVX512BF16] Add a few missing insert/extract patterns

  These are really the same as the f16 (and i16) instructions, but we need
  them for any type that can occur.

Merge commit 2e4e04c59043 from llvm-project (by Phoebe Wang):

  [X86][BF16] Do not lower to VCVTNEPS2BF16 without AVX512VL (#86395)

Fixes: #86305
These should fix "fatal error: error in backend: Cannot select: t71:
v32bf16 = insert_subvector t67, t64, Constant:i32<16>" when building the
misc/ncnn port.

PR: 278305
Reported by: yuri
MFC after: 1 month

8 weeks agoec2: homedir bug fixed in 24.1.4
Mina Galić [Thu, 11 Apr 2024 20:16:58 +0000 (21:16 +0100)]
ec2: homedir bug fixed in 24.1.4

This bug fix is due to be released in Quarterly:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275896

While here, overwrite the `doas` stanza, which needs to correspond to
the user that we are creating.

MFC after: 5 days
Sponsored by: The FreeBSD Foundation
Pull Request: https://github.com/freebsd/freebsd-src/pull/1163

8 weeks agonfscl: Purge name cache when readdir_plus is done
Zaphrod Beeblebrox [Thu, 11 Apr 2024 20:27:27 +0000 (13:27 -0700)]
nfscl: Purge name cache when readdir_plus is done

The author reported that this patch was needed to avoid
crashes on a fairly busy RISC-V system.  The author did not
provide details w.r.t. the crashes.  Although I
have not seen any such crash, the patch looks reasonable
and I have not found any regressions when testing it.

Since "rdirplus" is not a default option, the patch is
only needed if you are doing NFS mounts with the "rdirplus"
mount option and seeing crashes related to the name cache.

MFC after: 1 week

2 months agods1307: use the correct Microchip part number in enum and device description
Josef 'Jeff' Sipek [Thu, 11 Apr 2024 17:41:18 +0000 (13:41 -0400)]
ds1307: use the correct Microchip part number in enum and device description

During a minor refactoring two years ago (part of 2486b446), the newly
created enum used the wrong part number - MCP7491x instead of MCP7941x.  The
device description string got the same transposition of digits.

This change swaps the digits back to what they should be.

Reviewed by: emaste, tsoome, imp
Differential Revision: https://reviews.freebsd.org/D44436

8 weeks agofdwrite.c: initialize pointers to NULL and a few other cleanups
rilysh [Thu, 11 Apr 2024 18:23:33 +0000 (12:23 -0600)]
fdwrite.c: initialize pointers to NULL and a few other cleanups

1. Both trackbuf and vrfybuf are initialized to
zero (NULL). While it's okay to initialize pointers
to zero, to keep consistency, as they're explicitly
pointers, it's better to just use NULL ((void *)0)
instead of 0 (both are equivalent to the compilers).

2. Call free() for both trackbuf and vrfybuf after
their job has been done.

3. Remove the register keyword. Compilers generally
ignore this keyword (except for very very old compilers
and CPUs).

4. Remove the ctype.h header. It's not being used
anywhere in the file.

Signed-off-by: rilysh <nightquick@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1059

8 weeks agoadduser(8): support creation of ZFS dataset
John Grafton [Thu, 11 Apr 2024 18:11:18 +0000 (12:11 -0600)]
adduser(8): support creation of ZFS dataset

On systems utilizing ZFS, default to creating a ZFS dataset for a new
user's home directory if the parent directory resides on a ZFS dataset.
Add a flag that disables this behavior if the administrator explicitly
does not want it.

If run during installation from within a chroot, set mountpoint to legacy
after dataset creation and mount directly into the chroot.  Then umount
and reset the mountpoint to inherit from parent.

Also support ZFS default encryption on user's home directory.

Feedback by: delphij
Reviewed by: imp, kevans
Pull Request: https://github.com/freebsd/freebsd-src/pull/881