FreeBSD/src f276adclib/libcompiler_rt Makefile.inc

libcompiler_rt Makefile.inc: update _Float16/__bf16 checks

Clang supports __bf16 for riscv from version 18.0 onwards, so update the
checks for it. While here, rewrite the checks so they are hopefully more
readable, and also handle gcc a little better.

In addition, define COMPILER_RT_HAS_FLOAT16 and COMPILER_RT_HAS_BFLOAT16
when these features should be available, since there are some parts in
compiler-rt that check for these defines.

PR:             276104
MFC after:      1 month
DeltaFile
+28-5lib/libcompiler_rt/Makefile.inc
+28-51 files

FreeBSD/src f122045usr.sbin/crunch/crunchgen crunched_main.c crunchgen.c

crunchgen: add --list option

"bsdbox --list" will print all tools in the binary, one per line. The
main use case for this is to make it easier to create links:

        for t in $(bsdbox --list); do
                ln -s bsdbox $t
        done

The name --list was taken from busybox.

This just adds a new "program" with the name "--list". I don't think we
need to do real argument parsing here, and this is also how busybox does
it.

An additional minor change is that just "bsdbox" will no longer print
the binary name itself ("bsdbox" in this case). Before it would do:

        % bsdbox

    [44 lines not shown]
DeltaFile
+40-18usr.sbin/crunch/crunchgen/crunched_main.c
+8-2usr.sbin/crunch/crunchgen/crunchgen.c
+48-202 files

FreeBSD/src 219b6e4crypto/heimdal/lib/asn1 gen.c

heimdal: asn1: Use unsigned bitfields for named bitsets

Import upstream 6747e1628:

  asn1: Use unsigned bitfields for named bitsets

  Signed 1-bit bitfields are undefined in C.

This should fix the following warnings, which for unknown reasons are
errors in CI:

  /usr/src/crypto/heimdal/lib/hx509/ca.c:1020:22: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
   1020 |         ku.digitalSignature = 1;
        |                             ^ ~
  /usr/src/crypto/heimdal/lib/hx509/ca.c:1021:21: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
   1021 |         ku.keyEncipherment = 1;
        |                            ^ ~
  /usr/src/crypto/heimdal/lib/hx509/ca.c:1028:17: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
   1028 |         ku.keyCertSign = 1;

    [8 lines not shown]
DeltaFile
+2-2crypto/heimdal/lib/asn1/gen.c
+2-21 files

FreeBSD/src 1b74875crypto/heimdal/lib/asn1 check-gen.c der_put.c

heimdal: Add 64-bit integer support to ASN.1 compiler

Import upstream 19d378f44:

  ASN.1 INTEGERs will now compile to C int64_t or uint64_t, depending
  on whether the constraint ranges include numbers that cannot be
  represented in 32-bit ints and whether they include negative
  numbers.

  Template backend support included.  check-template is now built with
  --template, so we know we're testing it.

  Tests included.

Also adjusts the generated files:
* asn1parse.c, asn1parse.h (not strictly necessary, but nice to have)
* der-protos.h, which needs a bunch of new prototypes. I copied these
  from a der-protos.h generated by the upstream build system, which
  uses a perl script for this.

    [31 lines not shown]
DeltaFile
+120-0crypto/heimdal/lib/asn1/check-gen.c
+72-0crypto/heimdal/lib/asn1/der_put.c
+57-0crypto/heimdal/lib/asn1/der_length.c
+50-0crypto/heimdal/lib/asn1/der-protos.h
+42-3crypto/heimdal/lib/asn1/der_get.c
+13-9crypto/heimdal/lib/asn1/gen_template.c
+354-1215 files not shown
+446-5221 files

FreeBSD/src 75eda00share/man/man7 networking.7 Makefile

networking.7 : create network quickstart guide

Now that the handbook has been moved to ports, I think it's very nice to
have a network quickstart guide in-band, in base, in the system manual.
If the user uses any of the following terms "man -k
{network,networking,wifi,quickstart}" this page will come up, which is I
think a very common use case for new users.

Currently, this document explains connecting to a basic Ethernet
network, a basic wifi network, scanning for wifi networks, and airplane
mode, as well as linking to other sections, including the handbook

Co-authored-by: Graham Perrin <grahamperrin at gmail.com>
Reviewed by: imp, bcr, freebsd at igalic.co
Pull Request: https://github.com/freebsd/freebsd-src/pull/833
DeltaFile
+101-0share/man/man7/networking.7
+5-0share/man/man7/Makefile
+106-02 files

FreeBSD/src b7e4666sys/fs/nfsserver nfs_nfsdkrpc.c

nfsserver: Rate-limit messages about requests from unprivileged ports

If access from unreserved ports is disabled, then a remote host can
cause an NFS server to log a message by sending a packet.  This is
useful for diagnosing problems but bad for resiliency in the case where
the server is being spammed with a large number of rejected requests.

Limit prints to once per second (racily).

Reviewed by:    rmacklem, emaste
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D44819
DeltaFile
+14-4sys/fs/nfsserver/nfs_nfsdkrpc.c
+14-41 files

FreeBSD/src ca8e2e4sys/netinet tcp_var.h

tcp: Make tcp_var.h more self-contained

struct tcpcb embeds a struct osd and a struct callout.  Rather than
forcing all consumers to pull in the same headers, include the headers
directly.

No functional change intended.

Reviewed by:    glebius
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D44685

(cherry picked from commit 1d14e88e5332cfddbec1893f6b5332f81d378d61)
DeltaFile
+3-0sys/netinet/tcp_var.h
+3-01 files

FreeBSD/src 1f85f06sys/vm vm_reserv.c

vm_reserv_reclaim_contig: Return NULL not false

Reviewed by:    dougm, zlei
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D44667

(cherry picked from commit 989a2cf19d053954f0bad28790114a374b05c9c1)
DeltaFile
+2-2sys/vm/vm_reserv.c
+2-21 files

FreeBSD/src b6a4776libexec/rc/rc.d nuageinit

nuageinit: start the script after zfs

It prevents the home directory for the new users to be hidden
by late mount of the home directory
DeltaFile
+1-1libexec/rc/rc.d/nuageinit
+1-11 files

FreeBSD/src 994f9c9sys/netinet/tcp_stacks rack.c

tcp rack: fix sending

In rack_output(), idle is used as a boolean variable. So don't use it
as an int and don't clear it afterwards.
This avoids setting idle to false, when it is not intended.

Reported by:            olivier
Reviewed by:            rrs, rscheff
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D44610

(cherry picked from commit 7df0ef5f48e1c67b3f1df7c7964bfa59bc56f4e4)
DeltaFile
+3-3sys/netinet/tcp_stacks/rack.c
+3-31 files

FreeBSD/src 1348844sys/netinet/tcp_stacks rack.c

Revert "tcp rack: fix sending"

This reverts commit b5ee7411bfabaf85f226fdfc4f2d8e0515d66691.
DeltaFile
+3-6sys/netinet/tcp_stacks/rack.c
+3-61 files

FreeBSD/src b5ee741sys/netinet/tcp_stacks rack.c

tcp rack: fix sending

In rack_output(), idle is used as a boolean variable. So don't use it
as an int and don't clear it afterwards.
This avoids setting idle to false, when it is not intended.

Reported by:            olivier
Reviewed by:            rrs, rscheff
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D44610

(cherry picked from commit 7df0ef5f48e1c67b3f1df7c7964bfa59bc56f4e4)
DeltaFile
+6-3sys/netinet/tcp_stacks/rack.c
+6-31 files

FreeBSD/src 14d7784sys/netinet/tcp_stacks bbr.c

tcp bbr: improve code consistency

Improve code consistency with the RACK stack.
Reviewed by:            gallatin, rscheff
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D44800

(cherry picked from commit 605a00660eadb210ed76d49df551f3f33bbb4da7)
DeltaFile
+3-3sys/netinet/tcp_stacks/bbr.c
+3-31 files

FreeBSD/src 5344772sys/netinet tcp_input.c

tcp: add some debug output

Also log, when dropping text or FIN after having received a FIN.
This is the intended behavior described in RFC 9293.
A follow-up patch will enforce this behavior for the base stack
and the RACK stack.
Reviewed by:            rscheff
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D44669

(cherry picked from commit e8c149ab85c7834f76325864f22ca89298e65f75)
DeltaFile
+29-0sys/netinet/tcp_input.c
+29-01 files

FreeBSD/src 90cde57sys/netinet tcp_input.c tcp_timewait.c

tcp: improve consistency

No functional change intended.

Reported by:            Coverity Scan
CID:                    1523781
Reviewed by:            rscheff
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D44645

(cherry picked from commit 3e1c8a35f741a5d114d0ba670b15191355711fe9)
DeltaFile
+1-1sys/netinet/tcp_input.c
+1-1sys/netinet/tcp_timewait.c
+2-22 files

FreeBSD/src c6770e8sys/netinet/tcp_stacks rack.c

tcp rack: fix memory corruption

When in rack_output() jumping to the label out, don't write errno into
the log buffer, since the pointer is not initialized.

Reported by:            Coverity Scan
CID:                    1523773
Reviewed by:            rscheff
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D44647

(cherry picked from commit d902c8f55b8da6902ab45e67ed756cc99f5a9d5a)
DeltaFile
+2-2sys/netinet/tcp_stacks/rack.c
+2-21 files

FreeBSD/src 7a01956sys/kern uipc_socket.c

uipc_socket: handle socket buffer locks in sopeeloff

PR:                     278171
Reviewed by:            markj
Fixes:                  a4fc41423f7d ("sockets: enable protocol specific socket buffers")
Differential Revision:  https://reviews.freebsd.org/D44640

(cherry picked from commit 681711b77cde2cf3d64dc1e4951ec8287bc4f3e8)
DeltaFile
+4-0sys/kern/uipc_socket.c
+4-01 files

FreeBSD/src 6572d12sys/netinet tcp_log_buf.h

tcp bblog: cleanup

Remove redundant checks and improve error checking.

Reported by:            Coverity Scan
CID:                    1523780
Reviewed by:            rscheff
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D44616

(cherry picked from commit 60bc195745b8c1e1896c535a491906cdf11fe057)
DeltaFile
+4-6sys/netinet/tcp_log_buf.h
+4-61 files

FreeBSD/src 60898a7sys/netinet tcp_hpts.c

tcp hpts: initialize variable

Ensure that  tv.tv_sec is zero in all code paths.

Reported by:            Coverity Scan
CID:                    1527724
Reviewed by:            rscheff
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D44584

(cherry picked from commit aaaa01c0c858fd703194c6cbd515dd514574381f)
DeltaFile
+1-1sys/netinet/tcp_hpts.c
+1-11 files

FreeBSD/src f3e2bebsys/netinet tcp_subr.c

tcp: address a warning

t_state is an unsigned variable, so no need for testing that it is
non-negative.

Reported by:            Coverity Scan
CID:                    1390885
Reviewed by:            glebius
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D44619

(cherry picked from commit 6b454da6bbaa3327cf9b7185d198c96ffc1b88f4)
DeltaFile
+1-1sys/netinet/tcp_subr.c
+1-11 files

FreeBSD/src 7ebfafasys/netinet tcp_subr.c

tcp: fix conversion of rttvar

A wrong variable and wrong scaling factors were used.

Reported by:            Coverity Scan
CID:                    1508689
Reviewed by:            rscheff
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D44612

(cherry picked from commit e0bd180130b8c95f568483d0df6abff00d7d2153)
DeltaFile
+4-4sys/netinet/tcp_subr.c
+4-41 files

FreeBSD/src be30b22sys/netinet tcp_var.h

tcp: fix comment

Make the comment consistent with the code.

Reviewed by:            rscheff
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D44611

(cherry picked from commit 5a268d868890dbbfe96361906be20d01cc252b2f)
DeltaFile
+4-4sys/netinet/tcp_var.h
+4-41 files

FreeBSD/src 8375db0sys/netinet tcp_hpts.c

tcp hpts: improve consistency

The target_slot argument of max_slots_available() can be NULL.
Therefore, check for this in all places.
Right now, all callers provide non-NULL pointer.

Reported by:            Coverity Scan
CID:                    1527732
Reviewed by:            rrs
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D44527

(cherry picked from commit b600644fdd6cefb1b90d76fdd5aa595946611a7d)
DeltaFile
+2-1sys/netinet/tcp_hpts.c
+2-11 files

FreeBSD/src fbc8dfdsys/netinet tcp_log_buf.c

tcp bblog: use correct length

The length of tldl_reason is TCP_LOG_REASON_LEN, not TCP_LOG_ID_LEN.
No functional change intended.
Reported by:            Coverity Scan
CID:                    1418074
CID:                    1418276
Reviewed by:            glebius, rscheff
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D44510

(cherry picked from commit ed505f893ab08aa61e2a1046ae54df357a108260)
DeltaFile
+2-2sys/netinet/tcp_log_buf.c
+2-21 files

FreeBSD/src fd2a580sys/netinet tcp_output.c

tcp: no data on SYN segments unless doing TFO

Ensure that there is no data on SYN segments unless doing TFO.
This check is already in RACK and BBR.

Reported by:            glebius
Reviewed by:            rscheff
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D44384

(cherry picked from commit af700f430fd86ba3eae63e587985a12436db8f69)
DeltaFile
+6-0sys/netinet/tcp_output.c
+6-01 files

FreeBSD/src d69099esys/netinet tcp_lro_hpts.c

TCP LRO: add dtrace probe points

Add the IP, UDP, and TCP receive static probes to the code path,
which avoids if_input.

Reviewed by:            rrs, markj
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D43727

(cherry picked from commit 96ad640178ea0a8a9d1772687659dce5be18fbd9)
DeltaFile
+44-0sys/netinet/tcp_lro_hpts.c
+44-01 files

FreeBSD/src 8244b35sys/netinet tcp_lro_hpts.c

TCP LRO: disable mbuf queuing when packet filter hooks are in place

When doing mbuf queueing, the packet filter hooks in ether_demux(),
ip_input(), and ip6_input() are by-passed. This means that the packet
filters don't process incoming packets, which might result in
connection failures. For example bypassing the TCP sequence number
validation will result in dropping valid packets.
Please note that this patch is only disabling mbuf queueing, not LRO.

Reported by:            Herbert J. Skuhra
Reviewed by:            glebius, rrs, rscheff
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D43769

(cherry picked from commit d1ce01214a5540db8a7e09fdf46b7ea2d06ffc48)
DeltaFile
+22-3sys/netinet/tcp_lro_hpts.c
+22-31 files

FreeBSD/src be7586fsys/netinet sctp_output.c sctp_output.h

sctp: improve sending of packets containing an INIT ACK chunk

If the peer announced support of zero checksums, do so when sending
packets containing an INIT ACK chunk.

(cherry picked from commit 644cffe67f61ad5b36b60d621d1c630ff2a50412)
DeltaFile
+32-4sys/netinet/sctp_output.c
+3-1sys/netinet/sctp_output.h
+1-1sys/netinet/sctp_input.c
+36-63 files

FreeBSD/src 4955768sys/netinet sctp_output.c

sctp: improve consistency

(cherry picked from commit 533faf21c19d0fa4bc3c0a986c67667991f90883)
DeltaFile
+7-2sys/netinet/sctp_output.c
+7-21 files

FreeBSD/src c5e78e5cddl/lib/libdtrace ip.d

dtrace: allow NULL interface pointer for ifinfo_t translator

This is similar to other translators and will be used in static
probes where the interface is not known.

Reviewed by:            markj
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D43728

(cherry picked from commit e00fd24262945fdc7f16198c8abd977f743e66e4)
DeltaFile
+2-2cddl/lib/libdtrace/ip.d
+2-21 files