ifconfig: Use strlcpy(3) instead of strncpy(3) for interface name
No functional change intended.
Reviewed by: pouria, delphij, imp
Approved by: glebius (mentor)
Differential Revision: https://reviews.freebsd.org/D54752
Import latest mtree from NetBSD
Merge commit '7e59b238fcf32f3d365e78ddc702ca494e1ff68d'
This commit partially reverts the previous vendor import, given that the
"type" keyword has been historically mandatory and should not be removed
by "-R all". This was clarified in the man page.
Reported by: glebius
PR: 219467
MFC after: 1 week
(cherry picked from commit 4250d2ad991b7bb9915e4c6b6d93b17369747ff0)
Import latest mtree from NetBSD
Merge commit '7e59b238fcf32f3d365e78ddc702ca494e1ff68d'
This commit partially reverts the previous vendor import, given that the
"type" keyword has been historically mandatory and should not be removed
by "-R all". This was clarified in the man page.
Reported by: glebius
PR: 219467
MFC after: 1 week
(cherry picked from commit 4250d2ad991b7bb9915e4c6b6d93b17369747ff0)
Import latest mtree from NetBSD
Merge commit '7e59b238fcf32f3d365e78ddc702ca494e1ff68d'
This commit partially reverts the previous vendor import, given that the
"type" keyword has been historically mandatory and should not be removed
by "-R all". This was clarified in the man page.
Reported by: glebius
PR: 219467
MFC after: 1 week
(cherry picked from commit 4250d2ad991b7bb9915e4c6b6d93b17369747ff0)
GCE: ARM64 Support: Add hw.pci.honor_msi_blacklist=0.
This is required for MSI support on GCE ARM64 instances which is
prerequisite to gve(4) not panicking at boot, and nvme(4) also has
a real sad time without interrupts. Tested on a variety of c4a VMs.
This is meant to be a temporary hack; long term fix would be to
check for the hypervisor and quirk gve(4) device with
PCI_QUIRK_ENABLE_MSI_VM.
PR: kern/292081
(cherry picked from commit 9ae43352c89c776c8171f5881a984bc39acf5d6a)
GCE: ARM64 Support: Add hw.pci.honor_msi_blacklist=0.
This is required for MSI support on GCE ARM64 instances which is
prerequisite to gve(4) not panicking at boot, and nvme(4) also has
a real sad time without interrupts. Tested on a variety of c4a VMs.
This is meant to be a temporary hack; long term fix would be to
check for the hypervisor and quirk gve(4) device with
PCI_QUIRK_ENABLE_MSI_VM.
PR: kern/292081
MFC after: 1 week
(cherry picked from commit 9ae43352c89c776c8171f5881a984bc39acf5d6a)
pflog: tests: Fix rdr_action_head()
Fix a typo in the rdr_action_head() test.
Fixes: 685fb4253819 ("pf: Log the intended action when a NAT rule matches a packet")
MFC after: 1 week
dwc: add receive checksum offload for IPv6
This patch adds support for receive checksum offload for TCP/IPv6
and UDP/IPv6. Since receive checksum offload can't be configured
separately for IPv4 and IPv6, IFCAP_RXCSUM and IFCAP_RXCSUM_IPV6
can't be changed independently.
Reviewed by: Timo Völker
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D54756
dwc: add transmit checksum offload for IPv6
This patch adds support for transmit checksum offload for TCP/IPv6
and UDP/IPv6.
Reviewed by: Timo Völker
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D54754
powerpc/loader: Add CAS support for older CPUs
QEMU creates a "ibm,arch-vec-5-platform-support" property for all
pseries emulations. Add POWER7 and POWER6 to the CAS list, more can be
added later as needed/desired.
MFC after: 1 week
nanobsd: Add a NO_ROOT build option
Add a -U option to build NanoBSD images without root privileges. It
relies on makefs/mkimg and metalog (mtree) files, similar to what
release engineering uses to build images.
Keep the current way to build NanoBSD images untouched. Once this
method gets battle tested, it may be used to build images as root as
well.
Reviewed by: imp, emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D48793
nanobsd: Add a provisional populate /data function
Add a provisional _populate_data_part function. It populates the
optional /data partition, but using makefs(8), which is more in-line
with what release engineering uses to create images.
Reviewed by: emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D48792
nanobsd: Add a provisional populate /cfg function
Add a provisional _populate_cfg_part function. It populates the /cfg
partition, but using makefs(8), which is more in-line with what release
engineering uses to create images.
Reviewed by: imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D48791
nanobsd: Add a provisional populate_part function
Add a _populate_part(ition) function that mimics the current
populate_slice. Note however, that this function is not
backward-compatible with populate_slice, hence the different name. A
"_" is prepended to signal that it still experimental.
It can be used to populate the /cfg and /data partition using makefs(8).
Initially not wired.
Reviewed by: imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D48790
nanobsd: Add a nano_makefs function
Add a NANO_MAKEFS global variable with options equivalent to NANO_NEWFS
to be used with a nano_makefs function for creating images.
Also add a function that adjusts the code size calculation, so makefs -s
won't error about the minimum rounded size. Ideally this shim should be
removed, therefore the suspicious _xxx prefix.
Initially not wired.
Reviewed by: imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D48789
nanobsd: Switch the / partition in fstab
Introduce a function tgt_switch_root_fstab() that switches the root
partition in the target file system tab file. Initially not wired.
Reviewed by: imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D48788
nanobsd: Add a NANO_TIMESTAMP variable
Initially not wired, this variable will hold the time stamp for all the
files of the final image.
By default uses the last commit time stamp, if empty, it will use the
start time of the NanoBSD build.
Reviewed by: imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D48787
nanobsd: Add a function to create directories
Add tgt_dir(), that creates and adds directory entries to the metalog
specification file. Initially not wired.
Reviewed by: imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D48786
nanobsd: Prefer tgt_touch() instead of touch
Prefer tgt_touch() as it adds an entry to the metalog file.
Reviewed by: imp, emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D48785
nanobsd: Set the proper mode for /tmp
The correct mode for /tmp is 1777, keep the same mode when symlinking it
to /var/tmp.
Reviewed by: imp, emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D48784
nanobsd: Prefer tgt_dir2symlink() to create symlinks
Prefer tgt_dir2symlink() to create symlinks, as it has the benefit of
appending the entry to the metalog file.
Reviewed by: imp, emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D48783
nanobsd: Make tgt_dir2symlink() take a mode
Make tgt_dir2symlink() take an optional third argument that sets the
mode. By default, assume an absolute mode of 0777, to maintain
backward compatibility.
Reviewed by: imp, emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D48782
nanobsd: Add uname/gname to the spec
Also include the default NanoBSD uname/gname in the specification file.
By default, NANO_DEF_UNAME and NANO_DEF_GNAME map to root and wheel
respectively.
Reviewed by: imp, emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D48781