rc.8: Remove false information about rc.d/local
It does not handle scripts in /usr/local/etc/rc.d/. Instead, it takes
care of /etc/rc.local and /etc/rc.shutdown.local.
MFC after: 2 weeks
printf(): Save errno earlier.
The manual page says %m is replaced with “the string representation of
the error code stored in the errno variable at the beginning of the
call”. However, we don't actually save `errno` until fairly late in
`__vfprintf()`. Make sure it is saved before we do anything that
might perturb `errno`.
MFC after: 1 week
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D46718
mips: Allow sysctl hw.machine in capability mode
This is a direct commit to stable/13.
Reviewed by: emaste, manu
Differential Revision: https://reviews.freebsd.org/D28703
mac_veriexec_parser: Fix open_file error handling
NDFREE_PNBUF should be called after checking the return value of
vn_open(), and should only be called once.
Reviewed by: imp, zlei, Kornel Dulęba <mindal at semihalf.com>, Elliott Mitchell
Pull Request: https://github.com/freebsd/freebsd-src/pull/1338
netstat: Add missing "shutdown-ack-timer" key to libxo output
The key "shutdown-timer" was present twice in the libxo output. The second
occurence of "shutdown-time" has been renamed to "shutdown-ack-timer".
PR: 254672
Reviewed by: imp, zlei
Pull Request: https://github.com/freebsd/freebsd-src/pull/1331
netstat: Resolve duplicate "dropped-packets" key from libxo output
The current libxo output uses the "dropped-packets" key for both incoming and
outgoing packets. This commit distinguishes between the two by adding an "in"
and "out" suffix. The original "dropped-packets" key is kept for backwards
compatibility for now.
PR: 244589
Reviewed by: imp, zlei
Pull Request: https://github.com/freebsd/freebsd-src/pull/1331
Copy the new ia32 loader
This handles copying in install-boot.sh and bsdinstall's bootconfig.
install-boot.sh:
make_esp_file now optionally takes extra arguments so it can copy
multiple files. This is used by the amd64 release scripts.
make_esp_device also takes an extra optional argument for efibootname.
This is currently unused, but it can be used in the future to do
something like:
make_esp_device loader.efi bootx64
make_esp_device loader_ia32.efi bootia32
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1098
Add a new sysctl in order to diffrentiate UEFI architectures
With the new 32-bit UEFI loader, it's convenient to have a sysctl to
figure out how we booted. Can be accessed at machdep.efi_arch
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1098
stand: Add support for 64-bit machines with 32-bit UEFI implementations
Some machines have 64-bit capable cpus but are stuck on 32-bit uefi
firmware.
Add support for them by building a new "loader_ia32" with
LOADER_DEFAULT_INTERP along with the 64-bit one. The loader
can be disabled using MK_LOADER_IA32.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1098
loader: Fix 32-bit compatibility
main.c - Fix rsdp cast.
framebuffer.c -
- Use temp variable instead of directly passing pointer when
EFI_PHYSICAL_ADDRESS is expected.
Also fix FreePages cast.
- Mask framebuffer address given to us by UEFI.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1098
loader: Fix shadow_fb allocation
Using AllocateMaxAddress here means that gfx_state->tg_shadow_fb is
treated as the highest address we can receive. Since
gfx_state->tg_shadow_fb is NULL, we never receive anything. Use
AllocateAnyPages instead.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1098
stand/efi: Add a 32-bit variant of libefi
In preparation for supporting 64-bit machines with 32-bit UEFI firmware,
add a 32-bit variant of libefi since we need to compile both the 64-bit
version and the 32-bit version at the same time.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1098
Add build option for the ia32 loader
In preparation for supporting 64-bit machines with 32-bit UEFI firmware,
add a build option for compiling the ia32 loader. Currently unused.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1098
manuals: Fix errors in .2 pages
These were reported by `mandoc -T lint ...` as errors.
fhlink.2, fhreadlink.2: remove unneeded block closing.
getfh.2, procctl.2: add necessary block closing.
ptrace.2: -width only takes one argument.
swapon.2: <sys/vmparam.h> and <vm/swap_pager.h> weren't being displayed,
because .It is for a list item whereas .In is for included files.
Also, we want a blank line between <sys/ > headers and the other
one.
Signed-off-by: Graham Percival <gperciva at tarsnap.com>
PR: 281597
Reviewed by: mhorne
Sponsored by: Tarsnap Backup Inc.
pipe: use pipe subsystem KVA counter instead of pipe_map size
to calculate the superuser-reserved amount of the pipe space
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
agp.4: Add a deprecation notice to the man page
The driver is giant-locked and thus already prints a deprecation warning
when attaching. The device file interface was broken in 14.0 and 14.1,
see commit 12500c14281d, but it took a very long time for anyone to
notice, and in that case it was only because of some code which probes
all device files.
Relnotes: yes
Reviewed by: imp, jhb, emaste
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D46542
ifconfig: Add an allmulti verb
Similar to "promisc", this allows the IFF_ALLMULTI flag to be toggled
from userspace if it happens to be useful to disable multicast packet
filtering. One use-case is when implementing IPv6 neighbour discovery
over netmap.
Reviewed by: zlei, glebius
MFC after: 2 weeks
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D46525
(cherry picked from commit 00c9a6806c9cf3357b62f6708e5acd1ffd166613)
netinet: Explicitly disallow connections to the unspecified address
If the V_connect_ifaddr_wild sysctl says that we shouldn't infer a
destination address, return an error. Otherwise it's possible for use
of an unspecified foreign address to trigger a subsequent assertion
failure, for example in in_pcblookup_hash_locked().
Similarly, if no interface addresses are assigned, fail quickly upon an
attempt to connect to the unspecified address.
Reported by: Shawn Webb <shawn.webb at hardenedbsd.org>
MFC after: 2 weeks
Reviewed by: zlei, allanjude, emaste
Differential Revision: https://reviews.freebsd.org/D46454
(cherry picked from commit 0c605af3f9d9e66be6af0a3bbc36dbedc5dfe516)