The rc_fast_and_loose variable allowed rc(8) to start services
by sourcing them into rc's own shell environment. Normally, each rc
service script is started by being sourced into its own subshell
instead. The feature was meant to speed up rc(8) by avoiding the extra
forking necessary to spawn subshells.
In practice, the feature has been broken for a long time now. One of the
reasons is that some rc service scripts call the exit builtin to return
non-zero error codes, which not only terminates the service subshell
but also rc(8) when rc_fast_and_loose is enabled. For example,
a system running any of the supported FreeBSD releases
with rc_fast_and_loose=yes would abort rc(8) as early as rc.d/hostid,
due to an "exit 0".
Fixing rc_fast_and_loose support would require rewriting some rc scripts
to support being sourced directly into rc(8) process. This would muddy
the code base and also would prove difficult to maintain long term
as this is simply not how rc(8) users write scripts. The potential
performance benefits are unlikely to be significant even for use cases
such as Morello under qemu.
Instead, remove support for rc_fast_and_loose completely from rc(8)
and inform users about the change.
PR: 282255
Reviewed by: brooks, christos, mhorne
Approved by: christos (mentor), markj (mentor)
MFC after: 2 weeks
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D47264
Back in July, jhb started a cleanup of our hints. We've removed several
that have been a problem for a long time (including some that had
workarounds for VM images). We've also moved uarts to ACPI only, so they
act more like wiring than enumeration hints. Add a note about this and
ways you can find if your system is affected. Old APU1 routers with
coreboot are affected, but newer APU2 devices are not. Others likely are
as well. The affected systems will be primarily very ancient systems
that pre-date ACPI (i586 arch pentium and older typically), as well as
some older coreboot and similar non-conventional boot firmware setups
(primarily in the embedded space). FreeBSD 15 will require ACPI or
PNPBIOS enumeration for everything by default, so any non-enumerated
devices via these means will require hints. Add notes on how to grep
for affected systems before upgrading.
Sponsored by: Netflix
The associated commit has been reverted and DMAR is not enabled by
default any longer.
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46474
As discussed on the freebsd-arch mailing list[1]. For historical
reasons FreeBSD's buildworld and buildkernel targets started by cleaning
the object tree, for traditional (non-metamode) builds.
Cleaning is not necessary when dependencies are properly tracked, and we
have a somewhat kludgey script[2] to handle some known cases where deps
were mishandled by traditional builds. Be consistent with the vast
majority of open source build systems by default, and do not clean at
the beginning of buildworld or buildkernel.
Users may set WITH_CLEAN in src.conf(5) to restore the previous
behaviour, or run `make cleanworld` and/or `make cleankernel` before
starting a build.
[1] https://lists.freebsd.org/archives/freebsd-arch/2024-July/000727.html
[2] tools/build/depend-cleanup.sh
Reviewed by: jhb, imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46172
With it planned that armv7 will be the only 32-bit kernel when 15.0 is
released remove support for armv6.
Remove the top level build infrastructure. It was already removed from
universe, this just stops it from being built directly.
Reviewed by: mmel, emaste
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D45634
In commit d8237b9555, as part of the deprecation of IPv4 address
classes, Mike Karels introduced a warning in ifconfig for setting an
address without a width or mask. The commit message says "This will
hopefully be an error in the future."
As the warning has been included in releases from FreeBSD 13.1 on, and
sufficient time has passed, turn this into an error.
Reviewed by: allanjude, olce, grembo, philip, gordon
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45585
Move auditing runtime (auditd, etc.) into the new FreeBSD-audit package.
Also move the runtime OpenBSM manual pages from libbsm into auditd so
they get installed with the right package.
Add an UPDATING entry noting the new packages.
Reviewed by: imp, manu
Pull Request: https://github.com/freebsd/freebsd-src/pull/1197
At runtime, when rtld loads libc it will also load libsys. For each
symbol that is present in both, the libsys one will override the libc
one. It continues to be the case that program need only link against
libc (usually implicitly). The linkage to libsys is automatic.
Reviewed by: kib, emaste, imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/908
Loader now also read configuration files listed in local_loader_conf_files.
Files listed here are the last ones read. And /boot/loader.conf.local was
moved from loader_conf_files to local_loader_conf_files leaving only
loader.conf and device.hints in loader_conf_files by default.
The idea is to ensure local_loader_conf_files, i.e., /boot/loader.conf.local,
can always be used to override other user defined settings.
So the sequencing is now as follow:
1. Bootstrap:
/boot/defaults/loader.conf
2. Read loader_conf_files files:
/boot/device.hints
/boot/loader.conf
3. Read loader_conf_dirs files:
/boot/loader.conf.d/*.conf
4. And finally, rread local_loader_conf_files files:
/boot/loader.conf.local
Reviewed by: imp, kevans
Pull Request: https://github.com/freebsd/freebsd-src/pull/759
Loader now also read configuration files listed in local_loader_conf_files.
Files listed here are the last ones read. And /boot/loader.conf.local was
moved from loader_conf_files to local_loader_conf_files leaving only
loader.conf and device.hints in loader_conf_files by default.
The idea is to ensure local_loader_conf_files, i.e., /boot/loader.conf.local,
can always be used to override other user defined settings.
So the sequencing is now as follow:
1. Bootstrap:
/boot/defaults/loader.conf
2. Read loader_conf_files files:
/boot/device.hints
/boot/loader.conf
3. Read loader_conf_dirs files:
/boot/loader.conf.d/*.conf
4. And finally, rread local_loader_conf_files files:
/boot/loader.conf.local
Old binaries do not set acpi.rsdp early enough. So when we boot with an
older loader.efi from an ESP that's not been updated, we assume there's
no ACPI on this system. This is unwise. Put a band-aide on this until we
can implement a proper 'feature' variable that the binary reports so we
can do conditionals for things like this in the future.
This is at best a rapid-response stop-gap.
Glanced at by: kevans
Sponsored by: Netflix
The pre-push testing I did turned out to be testing the old version with
the old testsuite (for reasons I don't understnad). There's issues with
the new version, the new test in the suite or (likely) both. Revert
until they can be chased down.
This should also fix the github CI that's gone red since this commit.
This reverts commit 3fd60a6b73, reversing
changes made to 194df014fe.
Sponsored by: Netflix
Merge in the November 2nd, 2023 version of one true awk.
This brings in Unicode support, CSV support and a number of bug fixes.
Sponsored by: Netflix
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D42447
The option was added to parallel the CLANG_IS_CC which was removed in
commit 20a66ab4bf.
Reviewed by: imp, dim, emaste
Differential Revision: https://reviews.freebsd.org/D42575
Forward compatibility code was added for running newer ino64 binaries on
older kernels as a transition aide. Now that ino64 has been in the tree
6 years, this code is no longer useful and should have been removed long
ago. Remove it now. Should be no user-visible changes at this point as
all the 'upgrade' scenarios it was intended for are long since past.
Also need to remove this stuff from rtld since the _foo versions
no longer exist.
Sponsored by: Netflix
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D42382
Document when stable/12, stable/13 and stable/14 were created. Once we
release 14.0, I'll trim the stable/11 branchpoint through stable/12
brnachpoint. Documenting all of these will make it easier in the future.
Sponsored by: Netflix
The pkg solver gets confused by the file moves and refuses to upgrade
without manually upgrading FreeBSD-utilities and FreeBSD-utilities-dev
first.
PR: 254173, 273859
MFC after: 1 week
Reviewed by: Mina Galić <freebsd@igalic.co>
Differential Revision: https://reviews.freebsd.org/D41892
This helps with building small container images using pkgbase.
Reviewed by: manu bapt
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D41861
This option replaces WITH_INIT_ALL_PATTERN and WITH_INIT_ALL_ZERO with
INIT_ALL=pattern and INIT_ALL=zero respectively. As these are
relatively rarely used options no backwards compatibility is
implemented.
Reviewed by: emaste
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D41675
9600 was a standard baud rate decades ago, but 115200 is now more common
so choose defaults that are useful to the largest number of users.
Note that boot0sio does not support rates above 9600 so it remains
unchanged.
Reviewed by: bz, imp, manu
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D36295
Following the removal of general MIPS support, there's no longer a need
to have the AHB bus-frontend in place, which according to Linux sources
also isn't used with any non-MIPS SoCs. For simplicity, PCI bus support
is only made conditional on the main one again, i. e. device ath_pci is
removed, and built into the main module, i. e. if_ath_pci.ko obsoleted,
respectively.
Effectively, this reverts the following commits and associated changes:
dba9c85977e849bb3ecb
Approved by: adrian
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D41354
Hardware with more than 256 CPU cores is currently available and will
become increasingly common over FreeBSD 14's lifetime. Increase MAXCPU
in the amd64 GENERIC kernel configuration to 1024.
Earlier commits increased some related limits. These prerequisite
commits include at least:
- d7ed40243769 Increase MAX_APIC_ID safeguard to 0x800
- d1639e43c5 cpuset: increase userland maximum size to 1024
Global and allocated arrays sized by MAXCPU result in excessive bloat
on systems with lower core counts. In addition, some code used u_char
(8 bits) to hold a CPU index, which is not valid if MAXCPU is greater
than 256.
A number of recent commits addressed these sorts of issues, including
at least:
- 133935d26f pf: atomically increment state ids
- 74ac712f72 vmm: Dynamically allocate a couple of per-CPU state save areas
- 78cfa762eb callout: Move per-CPU callout state into the dpcpu region
- 42f722e721 amd64: store pcids pmap data in pcpu zone
- 9801e7c275 smp_topo: dynamically allocate group array
- 9fb6718d1b smp: Dynamically allocate the stoppcbs array
- 2bb16c6352 x86: retire use of intr_bind
There are some additional allocations still to be converted and
more scalability work is required to make effective use of very high
core count systems, but this change allows us to boot on these systems
and provides a Kernel Binary Interface (KBI) for the FreeBSD 14 release
that supports these configurations.
Special thanks to AMD for providing hardware to test these changes.
PR: 269572
Reviewed by: des
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D36838
Older Chromebooks have issues in their embedded controller (EC) firmware
which need working around in atkbd and atkbdc. On these systems, rather
than use a standard EC, Google used their own arm-based EC. For a while,
its firmware incorrectly implemented the i8042, requiring workaroundsd
in the driver.
Implement a heuristic recommended by MrChromebox <mrchromebox@gmail.com>
to detect them: If the bios.version starts with Google_, or the maker is
either Google or GOOGLE, assume that it's a chromebook with the affected
bios. While this isn't strictly true, the number of updated systems
without the bug is very small and this will exclude all the non-Google
coreboot user that use a standard EC. There's no simple way to test the
hardware to see if it's implemented with the buggy EC.
Sponsored by: Netflix
Reviewed by: jon@thesoo.org, MrChromebox
Differential Revision: https://reviews.freebsd.org/D40789
This is disabled by default since it potentially changes the behavior of
existing filter rule sets. To enable this extra filter for packets being
delivered locally, use:
sysctl net.pf.filter_local=1
service pf restart
PR: 268717
Reviewed-by: kp
MFC-after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D40373
* Replace hand-rolled input tokenizer with openpam_readlinev() which supports line continuations and has better quoting and escaping.
* Simplify string handling by merging struct clnt_str and struct srvr_str into just struct tac_str.
* Each server entry in the configuration file can now have up to 255 AV pairs which will be appended to the ones returned by the server in response to a successful authorization request.
This allows nss_tacplus(8) to be used with servers which do not provide identity information beyond confirming the existence of the user.
This adds a dependency on libpam, however libtacplus is currently only used by pam_tacplus(8) (which is already always used with libpam) and the very recently added nss_tacplus(8) (which is extremely niche). In the longer term it might be a good idea to split this out into a separate library.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: pauamma_gundo.com, markj
Differential Revision: https://reviews.freebsd.org/D40285
Relnotes: yes