| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
pdwait's capsicum/enotcap and procdesc's pdopenpid_capmode enter capability mode.
Require security_capability_mode (and security_capabilities for enotcap) so the
cases skip cleanly on kernels built without CAPABILITIES instead of failing.
Approved by: asomers, gallatin
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D58545
|
|
|
This fixes a bug where we do not report all lanes when
a NIC configures a breakout. Eg, we reported all 4
lanes when a NIC configured the optics as 1x400g, but
only printed the first lane's strength when configured as
4x100g.
Fix this by actually parsing the active lane count, rather
than pulling it from the default descriptor.
While here, optionally print page 10h when -vvvv is
specified. This aids in determining how a breakout is configured.
I put it under an extra level of verbosity, as I don't want
to let things get out of hand printing CMIS pages.
Sponsored by: Netflix
Reviewed by: kib, sumit.saxena_broadcom.com
Differential Revision: https://reviews.freebsd.org/D58263
|
|
|
A RST segment can be sent in response to
(a) received segment or
(b) by the upper layer protocol.
The SEG.SEQ validation consists of two checks:
(1) the in-window check of SEG.SEQ and
(2) the exact match check of SEG.SEQ.
For the in-window check (1), the left edge of the window needs to be
based on tp->last_ack_sent to cover the delayed ACK case, whereas the
right edge needs to be based on tp->rcv_nxt + tp->rcv_wnd. This both
assumes that tp->rcv_wnd is not zero. For the special case of
tp->rcv_wnd being zero, add checks against tp->last_ack_sent for (a)
and on tp->rcv_nxt for (b). This applies to all TCP stacks.
When the exact match (2) of SEG.SEQ is performed, it should be based
on tp->last_ack_sent for (a) and on tp->rcv_nxt for (b). To cover both,
check for both. Add this only to the base stack, since the RACK and
BBR stacks already do this.
PR: 296594
Reviewed by: rscheff
MFC after: 3 days
MFC to: stable/14
MFC to: stable/15
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D58594
|
|
|
The child exited immediately after pdfork(), so the parent's pdopenpid() could
catch it mid-exit (P_WEXIT) and fail with EBUSY.
Block the child on a pipe until the parent has opened the second descriptor,
then release it
Approved by: markj
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D58546
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This change hooks everything up to the pmc command and improves the
usage to document all functions. There are a couple older commands that
are currently broken that I have hidden from the usage, but left in the
code for those using it. I won't remove those until we have our
replacements upstreamed that depend on the AMD PMC multiplexing patches.
Sponsored by: Netflix
Reviewed by: adrian, imp
Differential Revision: https://reviews.freebsd.org/D57780
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The frontend command uses AMD IBS frontend events to analyze the major
sources of frontend stalls. It displays a table breakind down the major
causes of front end stalls. This is a simple demonstration of the tools
as you can use the filtering tools to limit the analysis to a subset of
the samples including filtering by fetch latencies.
Sponsored by: Netflix
Reviewed by: adrian, imp
Differential Revision: https://reviews.freebsd.org/D57779
|
| |
|
|
|
|
|
|
|
| |
Prints the log header including machine, cpu and kernel details along
with what counters were selected.
Sponsored by: Netflix
Reviewed by: adrian, imp
Differential Revision: https://reviews.freebsd.org/D57778
|
| |
|
|
|
|
|
|
|
|
|
| |
The record command is designed around the idea of predefined studies.
While you can still select individual counters, the predefined studies
are meant to enable the best hardware options for a given generation.
It implements all of the base studies that I have built so far.
Sponsored by: Netflix
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D57777
|
| |
|
|
|
|
|
|
|
|
|
| |
View is a class for building PMC log processing tools it is designed to
work with the new PMC record command that adds a header with additional
CPU information. The new framework processes PMC logs about 2.5 times
faster and in about half the code as libpmcstat.
Sponsored by: Netflix
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D57776
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Initializes the terminal rendering code used by the new pmc tools. Then
provides a table abstraction for collecting, sorting and rendering
tables. It provides pretty printed results with typed fields that print
several types used throughout the new PMC tools. By default the fields
are formatted in engineering notation.
Sponsored by: Netflix
Reviewed by: adrian, imp
Differential Revision: https://reviews.freebsd.org/D57775
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
{em,igb}_determine_rsstype() mapped only the TCP and bare-IP RSS descriptor
types; the UDP types returned M_HASHTYPE_NONE.
The hardware does hash UDP, but with a NONE hashtype iflib skips its
flowid-based TX queue spread, so all forwarded UDP egressed on a single queue
and serialized transmit on one core.
Add the three UDP cases (IPV4_UDP, IPV6_UDP, IPV6_UDP_EX) so egress spreads
across all TX queues.
Reviewed by: kbowling, gallatin
Approved by: kbowling
MFC after: 1 week
MFC to: stable/14, stable/15
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D58513
|
|
|
amd_allocate_pmc() chose the pmu-events code path whenever pmc_cpuid was
non-empty, and rejected any allocation lacking PMC_F_EV_PMU.
But pmc_cpuid is set for every AMD CPU, while the pmu-events tables only cover
Zen and later.
On older families (K8, Bobcat, Jaguar/16h, Bulldozer) libpmc finds no
pmu-events entry and falls back to the legacy path, which never sets
PMC_F_EV_PMU.
Reviewed by: mhorne
Approved by: mhorne
MFC after: 1 week
MFC to: stable/14, stable/15
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D58468
|
|
|
The latest version of draft-ietf-tcpm-tcp-ghost-acks changed
a condition. This should make no substantial difference, but makei
it compliant to the latest version of the specification.
Reviewed by: rscheff, Peter Lei
MFC after: 3 days
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D58411
|
|
|
Different command sets have different encoding for op codes, etc. While
one can normally puzzle out which is which, it's better to explicitly
tag the command set used.
Sponsored by: Netflix
|
| |
|
|
| |
Sponsored by: Netflix
|
|
|
Somehow, I wound up with space indents rather than tab indents, so fix
this.
Sponsored by: Netflix
|
|
|
These were overlooked when I added compression support.
Fixes: 86d719ae68aa ("loader: Add xzfs, like gzipfs but with xz.")
Fixes: c61ee49cd06a ("loader: zstd based filesystem, zstdfs like gzipfs")
Sponsored by: Netflix
|
| |
|
|
| |
Sponsored by: Netflix
|
|
|
This is a script that eventually will test boot with qemu all the
supproted combinations for the boot loader. There's several things that
could be done with gptboot or boot0sio (or not) that aren't tested. We
don't test the 10-odd hardware root devices we support, nor do we test
complex scenarios like RELAXED vs STRICT zfs efi booting.
However, the scenarios we do support are included here. We test aarch64,
amd64, armv7, powerpc64, powerpc64le, and riscv64 for BIOS, UEFI, and
Prep and OpenFirmware (as appropriate) crossed with CDROM, MBR and GPT
(and some hybrid) crossed with lua, 4th and simple loaders. Plus some
linuxboot and memdisk scenarios, including the recently added
compression for ram disk scenarios:
=== Results: 67 passed, 3 failed, 9 timed out (of 79) ===
The timeouts are well understood, usually failure to find the root
disk. The failures are bad console assumptions. netboot-bios fails
because TFTP with a single packet buffer in qemu gives horrible
throughput, so the test takes 18-20 minutes. Now that I have a
dashboard, I can fix the rest one by one.
There's also a powerpc architecture that you can request specifically,
but it's just for convenience and tests with the non-functional mac99
qemu machine. I will eventually eliminate this architecture. I added it
to make sure the FreeBSD version wasn't too hard coded since this
framework pulls from CD images to get the binaries for the minimal root
used in testing and there's no 15.x 32-bit powerpc images.
We need to add http and nfs root booting tests, but that's for the
future. Plus there's some other functional tests that we should also add
for different types of root (usb, sata, sas, nvme, ufs, emmc, sd, etc)
that would be useful to test, especailly the non-sata/non-nvme ones.
How we do that is still TBD.
I leaned on claude to iterate over the recipes that I've developed over
the years, collected off the internet or got on IRC recently to produce
this framework. Most of this code is fairly good, while a few parts,
especailly some of the comments, are detectable as AI produced. My plans
are to iteratively improve those. Since this is just a test, and since
I've broken many scenarios w/o realizing, it's a good tradeoff. I've not
made it an ATF test since we test all the architectures, but I'm open to
feedback in this area.
Total time to test all the architectures is about 10 minutes. It assumes
you've built GENERIC* and the boot loader for all the architectures too.
In the future, I plan on moving to MINIMAL for all the boot testing, but
likely only after PCI devmatch is integrated into it. That would be
incrementally faster test times.
The man page is decent, but was also generated by Claude with only
trivial edits by me to date.... But at least there's a man page for it,
though neither it nor the script is installed onto the system.
Sponsored by: Netflix
Assisted-by: Claude Code (Opus 4.6, Opus 4.8(1M) and Sonet 5.0)
Differential Revision: https://reviews.freebsd.org/D58008
|
| |
|
|
|
|
|
|
|
|
|
| |
For the BIOS, add xzfs support. This is a tiny increase in the loader
size, but allows us to fetch compressed files from any of the
filesystems we support, including over the network.
For EFI, also add gzipfs and bzip2fs support we well. The increment for
these files is tiny.
Sponsored by: Netflix
|
| |
|
|
|
|
| |
Off by default.
Sponsored by: Netflix
|
| |
|
|
|
|
|
| |
This is just like gzipfs or bzipfs, except done with the newer xz
program. This is off by default for the moment.
Sponsored by: Netflix
|
|
|
We can now decompress .xz compressed memory disks, like
FreeBSD-15.1-RELEASE-amd64-disc1.iso.xz
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D58073
|
| |
|
|
|
|
|
|
| |
-I${SRCTOP}/sys/contrib/xz-embedded/linux/lib/xz isn't used, and
.PATH: ${SRCTOP}/sys/contrib/xz-embedded/freebsd isn't used either.
Remove them both to simplify things a little.
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
|
| |
kldxref -m <file> will print the same data that the '-d' flag produces,
except restrict the output to one file. This should be the full path to
the file, and the directory name to process is omitted.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D57902
|
| |
|
|
|
|
|
|
|
|
|
|
| |
We have two sets of BIOS loaders: One that lives in stand/i386 and one
that lives in stand/userboot. Add knows to turn these on/off, with the
default being on. These often aren't needed when creating a minimal UEFI
system, so add knobs to turn them off. Given light-weight VMs have
created a new use cases for these loaders, there's no plans at all to
eliminate them.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D58072
|
| |
|
|
|
|
|
|
|
|
|
| |
This reverts commit 3e3fd1fde8e168910edc538966111c0b5f03cd5f.
This appears to break chainbooting with boot1.efi and similar scenarios
with Root-on-ZFS scenarios. Revert until it's better understood.
PR: 296309
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D58071
|
| |
|
|
|
|
|
|
|
| |
This code is simpler when we spell it the Unix way. Also, add sanity
checks to make sure the offset is where we think it is.
Fixes: afee781523e4 ("loader.efi: Recognize new memdisk=<url> and memcd=<url> options")
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D58070
|
| |
|
|
|
|
|
|
|
| |
The end address is the final byte in the array, not one byte past the
end of the array, so we need to add 1 to get the full length.
Fixes: 59219fc76a4b ("loader.efi: efiblk_memdisk_preload passes the VirtualDisks to FreeBSD")
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D58069
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The download protocol calls download_data with FileOffset and
BufferLength of 0 first to start the download (no data yet
available). Calls it again with BufferLength == 0 and FileOffset the
size of the download (again, no data). It then starts calling with
BufferLength != 0 and FileOffset == 0 to start the download. The
heuristic I used to detect the start was wrong, so we'd allocate the
buffer twice. Fix that by being more explicit and not using the
heuristic that was bogus.
Fixes: afee781523e4 ("loader.efi: Recognize new memdisk=<url> and memcd=<url> options")
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D58068
|
|
|
This can't be a loadable module, so add it to MINIMAL
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D58067
|
|
|
Some nic drivers (including iflib) do not initialize if_hwassist
until after the interface is brought up. If a lagg member is included
in a lagg when its not yet been brought up, that will cause lagg to see
if_hwassist=0 and will disable all checksum offload, etc, on the interface.
This is almost impossible to debug without kgdb or dtrace, as ifconfig does
not surface if_hwassist.
Fix this by re-calculating lagg caps (including if_hwassist) after adding a port.
I encountered this problem when I had a commented-out if_foo1=up entry in
my rc.conf that i neglected to uncomment when I was re-configuring a lagg.
Sponsored by: Netflix
Reviewed by: markj, zlei
Differential Revision: https://reviews.freebsd.org/D58062
|
| |
|
|
|
|
|
|
|
|
| |
This tool supports two commands. The list command outputs a summary
of injectable errors supported by the current system. The inject
command injects the requested error.
Reviewed by: gallatin, imp
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D58026
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This driver parses the ACPI EINJ table and builds a list of
instructions associated with known actions. It then exports ioctls to
fetch the set of supported errors and inject system errors by
executing specific sequences of actions. This can be used to test
error reporting facilities for events such as ECC errors.
Reviewed by: gallatin
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D58025
|
|
|
Different APEI tables can reuse the same registers (and sometimes
different views of the same register, e.g. 32- vs 64-bit mappings of
the same register). To enable this sharing, apei0 now acts as a bus
device managing a pool of allocated resources and handing out mappings
to child devices which handle individual tables.
Most of the previous apei(4) driver has been moved into a new
hest0 device that is a child of apei0.
Reviewed by: gallatin
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D58024
|
|
|
This fixes an endianness bug in sys/netinet/ip_reass_test.
Just use the code from RFC 1071.
Reported by: glebius
Reviewed by: glebius, Timo Völker
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D57988
|
|
|
TLS receive offload is really only beneficial for in-kernel use cases
(such as NFS over TLS) or when using a hardware offload. In addition,
several recent SAs have involved the TLS receive path, but the only
current mitigation for those is to disable TLS offload entirely.
Reviewed by: ziaee, gallatin, markj
Relnotes: yes
Sponsored by: Netflix
Sponsored by: Chelsio Communications
Co-authored-by: John Baldwin <jhb@FreeBSD.org>
Differential Revision: https://reviews.freebsd.org/D57974
|
| |
|
|
|
|
|
|
|
|
| |
Sicne we have gcc15 in Jenkins, and since people are actually using it,
add cross building tests to universe.sh to avoid build breakage when
hacking on loader.efi (and others). UEFI makes it too easy to mix
pointers and integers since it deals in an odd mix of
EFI_PHYSICAL_ADDRESS and pointers...
Sponsored by: Netflix
|
|
|
Use (uintptr_t) casts to cast the EFI_PHYSICAL_ADDDRESS to a pointer.
Fixes: afee781523e4 ("loader.efi: Recognize new memdisk=<url> and memcd=<url> options")
Sponsored by: Netflix
Reviewed by: rlibby
Differential Revision: https://reviews.freebsd.org/D57893
|
| |
|
|
|
|
|
|
| |
We have a ltitle wiggle room, so go ahead and bump the pxeldr size.
It should be a little larger than the limit we have for the /boot/loader
since we embed that in this loader...
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Support ipxe downloading of a memory disk (either presented to the OS as
a harddisk or a cd). This requires an ipxe server since it uses the ipxe
download protocol to grab the disk. If there is a disk, we add it to the
environment as a disk, and then the rest of the bootloader just sees it
and boots from it.
I've cribbed code from https://github.com/russor/memdisk_uefi and
adapted it to work in the context of the FreeBSD bootloader.
The ipxe_download.h file was created from the documentation of the
interface.
So a .ipxe file with the line
chain http://10.2.0.1/loader.efi memdisk=${cwduri}FreeBSD-15.1-RELEASE-amd64-bootonly.iso
would use the FreeBSD boot loader to boot the FreeBSD 15.1 release.
md(9) has a bug at the moment that prevents it from probing the
partitions on it.
Also, we'll automatically decompress gzip, bzip2 and zstd files
automatically.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D57677
|
| |
|
|
|
|
|
|
|
|
|
| |
Set hint.md.%d.physaddr and hint.md.%d.len for each of the VirtualDisks.
The memory for these remains after we exit boot services so FreeBSD can
use them. This leverages the BIOS work we did for memdisks. In
hindsight, I should have passed this in via metadata, but it's been in a
release.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D57806
|
| |
|
|
|
|
|
|
|
|
| |
When we're searching the system for all the disks in relaxed mode, we
need to do a final pass over all the non-boot disks. We no longer need
to have two loops since ZFS on boot device is selected properly in
try_boot_device_partitions. This also simplifies the code a bit.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D57805
|
| |
|
|
|
|
|
| |
Expand the tring MD message a little to make it clearer.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D57804
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
uefi_rootdev had to be the exact device to work. This is often difficult
to arrange and awkward. Instead, have it search the specified device: As
a partition if it specifies the partition, and as the whole disk if the
specified partition didn't work or it specifies a disk. This brings it
into lone what we do with other devices. This overrides the boot manager
search we do before we do this for the boot device, but this knob has
always been meant to overload the boot manager search.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D57803
|
| |
|
|
|
|
|
|
| |
Break out the probing into try_disk_and_partitions and adjust the trying
message slightly to be a little clearer what we're doing.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D57802
|
| |
|
|
|
|
|
|
| |
Since we print almost everywhere before we call this, centralize the
devpath to text dance here.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D57801
|
| |
|
|
|
|
|
|
| |
These are scattered in several places, so centralize the setting of
these flags.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D57861
|
|
|
These are zfs-only flags, don't add them when we're building ZSTD.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D57860
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
We need to report the actual link speed, rather than a hard-coded
100Gbs for a variety of reasons, but most importantly, as reporting
100Gbs on a 10g link breaks lacp when this NIC is in an LACP bundle
with other vendors' NICs after e98ed8d99fd4 (lacp:
Simplify lacp_compose_key()), as the fake 100g puts this nic
into a different aggregation group.
Sponsored by: Netflix
Reviewed by: glebius
Tested by: glebius
|