Otherwise it's impossible to install from a read-only objdir.
Fixes: f81cdf24ba ("bhyve: Add support for XML register definitions")
Reported by: olivier
In modes -p or -s, add an option -l to start each line
with a device name separated with a tab. Update the manual page.
Add an example to list names with corresponding serial numbers:
diskinfo -ls /dev/da?
MFC after: 2 weeks
If cnt == 0 we access element 0 unconditionally, which is out of bounds,
and then if that doesn't crash and happens to be 0 we will access
element - 1, also out of bounds, and then if that doesn't crash will add
1 to whatever junk is there and use that for the variable. On CHERI,
though, this does crash. This code is also overly complicated, with
unnecessary special cases and tracking more state than needed.
Rewrite it in a more general manner that doesn't need those special
cases and naturally works for cnt == 0.
Found by: CHERI
Reviewed by: imp
Fixes: 1285bcc833 ("Import Netflix's efibootmgr to help manage UEFI boot variables")
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D44029
This is useful for exposing additional registers to debuggers. For
instance, control registers are now available on amd64 when using gdb to
debug a guest.
The stub indicates support by including the string
"qXfer:features:read+" in its feature list. The debugger queries for
target descriptions by sending the query "qXfer:features:read:" followed
by a file path.
The XML definitions are copied from QEMU and installed to
/usr/share/bhyve/gdb.
Note that we currently don't handle the SIMD registers at all, since
that's of somewhat limited utility (for me at least) and since that
requires new ioctls to fetch the register values.
Reviewed by: jhb
MFC after: 2 weeks
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D43666
When setting a permanent ARP entry, the route(4) would use
rtm->rtm_rmx.rmx_expire == 0 as a flag for installing a static entry, but
netlink(4) is looking for explicit NTF_STICKY flag in the request. The
arp(8) utility was adopted to use netlink(4) by default, but it has lots
of route-era guts internally. Specifically there is global variable 'opts'
that shares configuration for both protocols, and it is still initialized
with route(4) specific RTF_xxx flags. In set_nl() these flags are
translated to netlink(4) parameters. However, RTF_STATIC is a flag that is
never set by default, so attempt to use it as a proxy flag manifesting
-s/-S results in losing it. Use zero opts.expire_time as a manifest of
-s/-S operation. This is a minimal fix. A better one would be to fully
get rid of route(4) legacy.
The change also corrects the logic to set NUD_PERMANENT flag for
consistency. This flag is ignored by our kernel (now).
Reviewed by: melifaro, tuexen, emaste
PR: 277063
Fixes: 6ad73dbf65
Differential Revision: https://reviews.freebsd.org/D43983
On a router with many connected devices (~10k+) `ndp -an` can fail
with ENOMEM because of some additional NDP records were added
between sysctl() buffer size estimate and data fetch calls.
Allocate more space based on size estimate: 1/64 (~2%) of additional
space, but not less that 4 m_rtmsg structures.
Obtained from: Yandex LLC
MFC after: 2 weeks
Sponsored by: Yandex LLC
Differential Revision: https://reviews.freebsd.org/D43956
In FreeBSD the crontabs are stored in /var/cron/tabs directory and not
in /var directory.
Approved by: kevans
Differential Revision: https://reviews.freebsd.org/D43181
- For some reason we don't build it as a PIE, but I don't have any
problems doing so with either clang or gcc.
- There is no apparent need to override WARNS, so don't.
- Some building with -O0, presumably that's left over from debugging.
MFC after: 1 week
Reviewed by: imp, brooks
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D43923
In 2024, users are more likely to have working HTTP than working FTP.
Present http://ftp.FreeBSD.org as the first option in the installer.
Keep ftp://ftp.FreeBSD.org as the second option.
MFC after: 3 weeks
If we use the -d option to change the default unit, close the current
mixer and open the one we set as the default to avoid printing and
applying changes (if any) to the old one.
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: dev_submerge.ch, markj
Differential Revision: https://reviews.freebsd.org/D43809
The input options of "dev.mute" (+, -, ^) and "dev.recsrc" (+, -, ^, =)
are quite cryptic. Allow the input to also be an actual description of
what these options do.
+ -> add (recsrc)
- -> remove (recsrc)
^ -> toggle (recsrc, mute)
= -> set (recsrc)
0 -> off (mute)
1 -> on (mute)
Also, deprecate the use of the symbol options in the EXAMPLES section of
the man page, by using the new descriptive options.
In the future, we might want to get rid of the symbol options
altogether, but preserve backwards compatibility for now.
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: dev_submerge.ch, imp
Differential Revision: https://reviews.freebsd.org/D43796
246e0457d9 ("mixer.8: Add terse example
for increasing volume") mentions that the example changes the volume of
the "first mixer found", while the example shows how the change the
volume of the current mixer's "vol" device. Re-phrease sentence to
reflect the actual behavior of the command.
Also, improve the example by using the % operator, instead of hardcoding
0.05.
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: dev_submerge.ch, markj
Differential Revision: https://reviews.freebsd.org/D43795
The -d option is a wrapper around hw.snd.default_unit. Currently
mixer(8) expects the option argument to be just the unit's number (e.g
pcm0 -> 0). To avoid confusion, allow full device names of the form
"pcmN" as well.
While here, improve the -d option's description in the man page.
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: dev_submerge.ch, imp
Differential Revision: https://reviews.freebsd.org/D43794
This changes the OK / Cancel buttons into Auto / Manual / Cancel, with
Auto being the default. Manual behaves like OK used to, i.e. presents a
series of dialogs asking exactly how to configure the interface, and
Cancel is unchanged, exiting with exit code 1. Auto will attempt to
configure IPv4+DHCP and IPv6+SLAAC with no interaction, failing only if
neither can be configured, thereby supporting all of IPv4-only,
IPv6-only and dual-stack environments. If at least one DNS server is
provided, it will also skip asking for DNS settings, otherwise it will
act like Manual mode for the purposes of DNS settings and prompt. For a
standard dual-stack environment this cuts down the number of netconfig
dialogs from 6 (interface, IPv4, DHCP, IPv6, SLAAC, DNS) to just the
first one.
Reviewed by: brooks
Differential Revision: https://reviews.freebsd.org/D43731
traceroute used a series of #defines to specify what features are
available on the host platform. As traceroute is now in source, these
are unnecessary and complicate the code, so remove them.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1100
traceroute hasn't had a vendor import since 2002, while since then it's
had several significant FreeBSD-specific commits. Since it's unlikely
another vendor import will happen, and to make the merge of traceroute6
into traceroute easier, import traceroute into usr.sbin.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1100
This lets gdb query individual registers. It's easy to implement and is
used by gdb when attaching to a CHERI target, so let's support it.
Sponsored by: Innovate UK
Reviewed by: corvink, jhb
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D43664
The commit 147585b489 introduces
whitlabeling. This commit addresses couple more places where the
os name was missed.
Reviewed by: imp, asiciliano, brd
Differential Revision: https://reviews.freebsd.org/D43638
The replacement of echo >> with sysrc -f used sysrc key value, which
means "read variables key and value" and thus did nothing useful (and in
fact emitted errors to the log about neither existing). Instead use the
correct sysrc key=value form so the installed system comes back up with
working networking.
Fixes: 60b37735f3 ("bsdinstall netconfig: avoid duplicate entries in rc.conf")
This isn't inherently an error. It is if you're attempting to download
dist tarballs or later install packages, but a FreeBSD system with no
NIC is a reasonable setup to have, especially in a throwaway VM setting,
so we shouldn't say it is one.
Leaving the exit code as 1 is still fine, since auto will ignore it, and
avoids breaking other uses.
MFC after: 1 week
The script uses [ -z "$INTERFACES" ] to check if the list of interfaces
is empty and will exit early if so, but INTERFACES always contains at
least a space due to the way it appends the list of wireless devices.
Fix this by only adding the space when there are devices to append,
mirroring the behaviour for non-wireless devices above (both will result
in a redundant leading space when the list is non-empty, but that one is
harmless).
Fixes: 159ca5c844 ("Adapt to new wireless scheme where base wlan interfaces do not show up in ifconfig anymore.")
MFC after: 1 week
Firstly, my review comments were not addressed and instead totally
ignored. Secondly, and a more valid justification for the revert, this
completely breaks the installer, since selectdists isn't installed.
Given the blatant lack of testing, back out this commit until it has
actually been tested and review comments taken on board so that the
installer actually works.
This reverts commit 009d3f66cb.
The -l flag was used to tell traceroute6(8) to show both hostname and
address for each hop. However, traceroute(8) already does this by
default, and there's no reason for traceroute6 to behave differently.
Make this the default behaviour, and accept -l for backward
compatibility as a no-op flag.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1023
- 223.backup-zfs would previously honour the daily_backup_zfs_verbose
flag for zfs/zpool list, but not for the properties list. fix it to
show a diff for both of these if requested.
- if daily_backup_zfs_verbose was disabled, 223.backup-zfs would still
set rc=1 if the backup files changed, which caused periodic(8) to send
a useless email even if daily_show_success=NO was set.
change this so that it only sets rc=1 if diff output is enabled, i.e.
the output is actually useful to the admin.
MFC after: 2 weeks
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1091
Rather than assuming that the "root" is passed as directory and will be
marked by a trailing slash, we just assume that the directory, which has
been checked previously to be a directory, is a directory.
This fixes an inconsistency between `kldxref /boot/modules`, which tries
to create the temp file in `/boot/`, and `kldxref /boot/modules/`, which
tries to create it in `/boot/modules/` itself.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1093
The current macro always builds a full mask for a named field, so use
the M suffix for mask.
Reviewed by: chuck, imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D43601
This is not a functional change, but just being consistent instead of
omitting a shift by 0.
Reviewed by: corvink, chuck, imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D43600