| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
Add missing mtree directory entries. Without them, the resulting
worldstage METALOG file would produce an invalid (incomplete) mtree
specification file.
Reviewed by: ivy
Differential Revision: https://reviews.freebsd.org/D56013
|
| |
|
|
|
|
| |
MFC after: 3 days
Reviewed by: olce
Differential Revision: https://reviews.freebsd.org/D56024
|
| |
|
|
|
|
|
|
| |
because cancel_delayed_work_sync() might need to sleep, which cannot be
done in the interrupt thread where the completion runs.
Sponsored by: Nvidia networking
MFC after: 1 week
|
| |
|
|
|
|
|
| |
OpenBSD fixed this separately (in their 6a338f3f70). We appear to not
have had this bug, but test for it anyway.
Sponsored by: Rubicon Communications, LLC ("Netgate")
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Ignoring the error may cause pfctl(8) to load inconsistent ruleset
preventing pf(4) to enforce desired policy.
Issue reported and fix suggested by berts _from_ fastmail _dot_ com
'Looks good.' @deraadt
MFC after: 1 week
Obtained from: OpenBSD, sashan <sashan@openbsd.org>, 9fd28a8cca
Sponsored by: Rubicon Communications, LLC ("Netgate")
|
| |
|
|
| |
Sponsored by: Orange Business Services
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The chroot_cleanup routine handles any cleanup needed post-chroot_setup,
etc. This consists of purely tearing down `${CHROOTDIR}/dev` today, but
might involve additional steps, as needed for custom functions. This
allows end-users to override the various chroot functions without having
to modify code in main() or replicate the unmount procedure in an
equivalent routine setup via the trap builtin.
This change modifies the /dev unmount process to use `umount -f` instead
of `umount`. The latter can result in failures if resources are still
mounted or are running post-build, whereas the former will clean up any
resources still in use by processes running in the chroot at time of
build. Moreover, the `chroot_cleanup` routine is now called when the
script is killed with `SIGINT` and `SIGTERM`, as well as at `EXIT`,
better ensuring that the script's resources are cleaned up in relatively common
scenarios that can be detected/handled.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D55450 (as part of a larger change)
|
| |
|
|
|
|
|
| |
This helps others attempting to customize the behavior of `release.sh`.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D55450 (as part of a larger change)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
After patch 9d26b82, we don't provide recursive call protection anymore.
Therefore, to pass the test, we adjust the testcase by protecting on
caller and the testcase is to make sure the dtors is properly handled.
Reported by: siva
Reviewed by: kib
Approved by: markj (mentor)
Fixes: 9d26b82826d9 ("libc: Fix dtor order in __cxa_thread_atexit")
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55893
|
| |
|
|
|
|
|
|
|
|
| |
We separate the code of CPPC and legacy pstate driver to make it easier
to read.
Reviewed by: olce
Approved by: markj (mentor)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55604
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This change modifies the libcrypto PIC objects to always compile with
`-DOPENSSL_PIC -fPIC` to restore parity with the upstream build process.
This ensures that the legacy provider is built with parity to the
upstream legacy provider.
MFC after: 12 days
Tested with: `make check` (legacy provider), `make universe`
Fixes: 14b9955e
Differential Revision: https://reviews.freebsd.org/D44896
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Trying to use the grown struct trapframe for IDT case broke in cases
where code supposed that hardware consumed sizeof(struct trapframe) of
the stack space when delivering interrupt or exception. In particular,
this was broken for #NM/#DB/#MC. Naive attempt of using IDT-trapframe
size for stack consumption caused later problems with larger C type.
Instead of pretending that IDT event delivery pushed two never-accessed
doubleword to the stack, keep it honest and provide separate type for
the FRED interrupt frame, i.e. struct trapframe_fred.
Convert between trapframe_fred and trapframe can be done by trivial pointer
arithmetic.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Compiling drm-kmod on !X86 does not include asm/smp.h which includes
preempt.h on FreeBSD. In order to compile drm-kmod on other
architectures add the secondary #includes for preempt.h to
spinlock.h and hardirq.h (which now also gets included from highmem.h)
to connect the #include chain.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
PR: 279864
Reviewed by: jhibbits, emaste
Differential Revision: https://reviews.freebsd.org/D55974
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Saying that we are called with an (un)finished or corrupted sbuf
is like saying "error" (though [un]finished is an extra hint).
Add the pointer to the sbuf so one could easily check it,
add the flags we are checking so one could see quickly about
a possible state mismatch.
Given we already dereference the pointer in the KASSERT there is no
extra harm adding it to the message.
Found while: testing lindebugfs changes
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D55919
|
| |
|
|
|
| |
MFC after: 3 days
Sponsored by: Amazon
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 6a13aeac3c1f98db7cf156f24a4d6bc8d3c321f6.
The "bogus dependencies being installed" issue was traced down to pkg
confusion surrounding libclang_rt.asan-i386.so linking to a 32-bit
libgcc_s.so.1, and a more minimal workaround of "install clibs-lib32"
has been applied, so this hack is no longer required.
MFC after: 3 days
Sponsored by: Amazon
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The FreeBSD-clang package on amd64 contains libclang_rt.asan-i386.so,
which links to the 32-bit version of libgcc_s.so.1. It is not clear
if that file belongs in FreeBSD-clang or if it should be placed into
a different package.
For unknown reasons, pkg *sometimes* recognizes this and decides that
it needs to install a package to supply libgcc_s.so.1:32.
In particular, when we initially install the VM with 'pkg install
[long list of FreeBSD-* packages]', pkg does not recognize that it
wants this; but the *next* time 'pkg install' runs, it decides that
it needs libgcc_s.so.1:32 -- even though that particular library is
not needed by the particular package we're trying to install -- and
goes looking for it... and ends up picking gcc12-devel as a provider.
Later in the EC2 image building process, we run 'pkg autoremove' (which
was added during 15.0 to get rid of the "bogus dependencies" which were
added while installing other packages) and pkg is once again confused:
It decides that gcc12-devel is an automatic port which is not required
by anything else, but upon determining that it should be removed it
then determines that FreeBSD-clang depends upon a port which is being
removed and deletes FreeBSD-clang as well.
It's not clear what is breaking in pkg, but as a temporary workaround
add the FreeBSD-clibs-lib32 package to the "small" and "builder" EC2
image flavours in order to satisfy the libgcc_s.so.1 demand.
This commit should be reverted if libclang_rt.asan-i386.so moves out
of FreeBSD-clang, (i.e. if it becomes possible to install a 32-bit-free
amd64 system) or when the pkg issue is resolved (i.e. pkg consistently
recognizes the shared library dependency and installs clibs-lib32
automatically as a FreeBSD-clang dependency).
MFC after: 3 days
Sponsored by: Amazon
Differential Revision: https://reviews.freebsd.org/D55978
|
| |
|
|
|
|
|
|
|
|
| |
GEOM journaling shouldn't be used at the same time as soft updates, so
don't enable one if the other is already in use.
MFC after: 1 week
PR: 293896
Reviewed by: mckusick
Differential Revision: https://reviews.freebsd.org/D56002
|
| |
|
|
|
|
|
|
|
|
|
| |
GEOM journaling shouldn't be used at the same time as soft updates, so
don't enable soft updates if GEOM journaling has been requested, and
error out if both are explicitly requested.
MFC after: 1 week
PR: 293896
Reviewed by: mckusick
Differential Revision: https://reviews.freebsd.org/D55999
|
| |
|
|
|
|
|
|
|
|
| |
ZSTDIO is not just for core dumps, and it is now required by ZFS, so
move it (and GZIO, which is still just for dumps) to a new “Compression
support” section in GENERIC, and add them both to MINIMAL.
MFC after: 1 week
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D55940
|
| |
|
|
|
|
| |
We don't need to check for NULL before calling free().
Sponsored by: The FreeBSD Foundation
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The previous S1-S5 options are still accepted for compatibility, but
they are now deprecated in favour of the new generic sleep types.
Reported by: markj
Reviewed by: markj
Approved by: markj
Fixes: 97d152698f48 ("acpi: Use sleep types defined in sys/power.h")
Event: AsiaBSDCon 2026
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56008
|
| |
|
|
|
|
|
| |
Reported by: markj
Fixes: 97d152698f48 ("acpi: Use sleep types defined in sys/power.h")
Event: AsiaBSDCon 2026
Sponsored by: The FreeBSD Foundation
|
| |
|
|
|
| |
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
|
| |
|
|
|
| |
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
|
|
| |
We no longer put pcb on stack, it is part of the struct thread.
Similarly, we do not put user fpu save area on stack. There is no
constraints on the pcb size due to the XSAVE area required alignment.
Reviewed by: jhb, markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D55931
|
| |
|
|
|
|
| |
Requested by: jhb
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
as provided by the Intel document 346446-009 AKA FRED 8.0 and SDM v90,
February 2026.
Note that the layout of the struct trapframe does not change with
FRED. The differences are in addition of two fields at the end of the
structure. Other members are carved from existing tf_cs and tf_ss by
limiting hw-written segments to 16 bits officially, and reusing rest
from the doubleword for the new data.
Reviewed by: jhb, markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D55831
|
| |
|
|
|
|
|
|
|
|
|
| |
This change only checks that the values from the user-supplied context
are not truncated by C implicit type convertions. The validity of the
segment selectors is still checked by hardware.
Reviewed by: jhb, markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D55861
|
| |
|
|
|
|
|
| |
Reviewed by: jhb, markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D55809
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit broke the build with some build options.
Some validation needs to be done to confirm that moving the preprocessor
argument to `secure/lib/libcrypto/Makefile.inc` works without breaking
the build, but revert for now until a `tinderbox` run can be done with
the change.
PR: 293934
Reported by: Jenkins, Trond Endrestøl
This reverts commit 14b9955e57cc28b61e785165b9effcbe620edb46.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Because of this setting we were still using ELF Tool Chain tools for
buildworld. The sets of binary utilities are largely equivalent and
this went unnoticed after commit 1cae7121c667 ("Enable LLVM_BINUTILS
by default").
This was discovered recently because ELF Tool Chain objcopy produces
standalone debug files without phdrs and this caused an issue with a
3rd party ELF parser [1]. Remove the forced setting so that we use
LLVM's binutils to build the system.
[1] https://sourceware.org/bugzilla/show_bug.cgi?id=33876
Re-commit after fixing a bootstrapping issue with LLVM binutils (in
17494c6e6b7d "build: Boostrap LLVM_BINUTILS for cross-tools").
Reviewed by: imp, jhb
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55650
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The TPM driver currently has a single buffer per instance to hold the
result of a command, and does not allow subsequent commands to be sent
until the current result is read by the same OS thread that sent the
command, with a timeout to throw away the result after a while if the
result is not read in a timely fashion. This has a couple problems:
- The timeout code has a bug which causes all subsequent commands to
hang forever if a different OS thread tries to read the result
before the OS thread which sent the command, and the OS thread
which sent the command never tries to read the result.
- Even if the first problem is fixed, applications expect to be able
to read the result from a different OS thread than the OS thread
which sent the command. The particular case that we saw was a go
application where the go runtime scheduled the goroutine which read
the result to a different OS thread from one where the goroutine
that sent the command ran, and there's no way to force these to
always run on the same OS thread.
Fix all of this by replacing the global result buffer with a per-open
result buffer via devfs_set_cdevpriv(), so that we no longer need to
block subsequent commands until the results of a previous command are
retrieved or care about which OS thread is reading the result of a
command.
Sponsored by: Netflix
Reviewed by: olivier, imp
Differential Revision: https://reviews.freebsd.org/D52328
|
| |
|
|
|
|
| |
Sponsored by: Netflix
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D55335
|
| |
|
|
|
| |
Reviewed by: tuexen, rrs
Differential Revision: https://reviews.freebsd.org/D55969
|
| |
|
|
|
|
|
| |
The tcp_close() will perform both actions.
Reviewed by: pouria, tuexen, rrs
Differential Revision: https://reviews.freebsd.org/D55965
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change SS_FATAL to SS_FAIL for SCSI sense code 0x3A (Medium not present)
to suppress console spam when card readers or other removable media
devices have no media inserted.
The error is still returned to callers (ENXIO), but no longer prints to
dmesg during boot/probe.
Verified with Apple SD Card Reader - reduced boot messages from 4 to 2.
Reviewed by: emaste, imp
Differential Revision: https://reviews.freebsd.org/D55287
|
| |
|
|
|
|
|
|
| |
Create visibility in apropos and the Hardware Release Notes.
MFC after: 3 days
Reviewed by: pauamma, ray
Differential Revision: https://reviews.freebsd.org/D53287
|
| |
|
|
|
|
|
|
|
|
|
|
| |
A loader built with MD_IMAGE_SIZE is almost always meant for use with
its embedded image and should try that as currdev before anything else.
Recent changes (d69fc3a9dc71, 784150fd2535) seem to have relaxed the ZFS
code's search for a rootfs and exposed this problem.
Reviewed by: imp, tsoome
MFC after: 1 week
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D55979
|
| |
|
|
|
|
|
|
| |
Reported by: vexeduxr, jrtc27
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Pull request: https://github.com/freebsd/freebsd-src/pull/2084
Differential Revision: https://reviews.freebsd.org/D55923
|
| | |
|
| |
|
|
|
| |
Reviewed by: manu, bdrewery (previous version)
Differential Revision: https://reviews.freebsd.org/D55895
|
| |
|
|
| |
Pointed out by: Alex "the PS/2 guy"
|
| |
|
|
|
|
|
|
|
| |
Do not report EVFILT_READ after reading a discontinuous clock jump.
This makes the kqueue filter consistent with Linux epoll behavior
and timerfd_poll(), which already checks tfd_jumped != TFD_READ before
reporting POLLIN.
MFC after: 2 weeks
|
| |
|
|
|
|
|
|
| |
If a discontinous realtime clock change occurs and sets any TFD_JUMPED
bits on the timerfd, then wake up waiting readers. This fixes failures
from the timerfd_root__clock_change_notification test case.
MFC after: 2 weeks
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some timerfd consumers set expirations with timespec tv_sec components
larger than 2^31 - 1. In such cases, converting that timespec to
sbintime results in data loss or sign flip, yielding a shorter
expiration than desired.
To avoid this problem, use saturating timespec-to-sbintime conversion
functions. These will clamp the converted sbintime to SBT_MAX under
circumstances where the normal conversion functions would overflow.
Saturating conversions still result in data loss, but the consequences
are less severe, causing problems only after SBT_MAX (~68 years) of
system uptime elapses.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D55792
MFC after: 2 weeks
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When converting from timespec to sbintime, the timespec's 64-bit tv_sec
component is shifted to the left 32 bits, causing any information in the
upper 32 bits to be lost.
This data loss during conversion can turn timespecs with very large
tv_sec counters into sbintimes that represent much smaller time
durations.
Add tstosbt_sat() and tvtosbt_sat(), which are saturating versions of
tstosbt and tvtosbt. With these routines, any overflow resulting from
the conversion is clamped to [-SBT_MAX - 1, SBT_MAX].
Reviewed by: imp, markj
Differential Revision: https://reviews.freebsd.org/D55791
MFC after: 2 weeks
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a timerfd interval callout misses its scheduled activation time, a
differential is calculated based on the actual activation time and the
scheduled activation time. This differential is divided by the timerfd's
interval time and the quotient is added to the timerfd's counter.
Before this change, the next callout was scheduled to activate at:
scheduled activation time + timerfd interval.
This change fixes the scheduling of the next callout to activate at:
actual activation time + timerfd interval - remainder.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D55790
MFC after: 2 weeks
|
| |
|
|
|
|
|
|
|
| |
Take Jan Kokemuller's timerfd tests from the epoll-shim project,
stripping out code that isn't directly related to FreeBSD.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D55789
MFC after: 2 weeks
|
| |
|
|
|
| |
Fixes: 1a7151f79664 cam: Add probes for xpt actions
Event: AsiaBSDCon 2026
|