FreeBSD/src 5eb1d4esys/rpc/rpcsec_tls rpctls_impl.c

rpctls_impl.c: Use a direct cast to uintptr_t instead of __DECONST

This fixes the build on CHERI architectures where the compiler warns
about a direct cast between uint64_t and const void * inside of
__DECONST.  However, GCC would also complain about this on 32-bit
kernels due to uint64_t not being the same size as a pointer.  Also,
a direct cast to uintptr_t to right-size the cookie value is more
direct than using __DECONST given that there is no "const" pointer
involved in the expression.

Reviewed by:    brooks, glebius
Obtained from:  CheriBSD
Sponsored by:   AFRL, DARPA
Differential Revision:  https://reviews.freebsd.org/D54797
DeltaFile
+1-1sys/rpc/rpcsec_tls/rpctls_impl.c
+1-11 files

FreeBSD/src 2bee4bblibexec/rc/rc.d Makefile, sbin/devd Makefile

src.opts: Introduce MK_SOUND

PR:             291853
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    zarychtam_plan-b.pwste.edu.pl, markj
Differential Revision:  https://reviews.freebsd.org/D54456

(cherry picked from commit f74f891581bc4df20431607de9b761107f6a0aa7)
(cherry picked from commit 37164224eefd11278b0203e1367e1d9d1454da3f)
(cherry picked from commit 241a43cf9da8933f500e7d0df7fff621fd52168c)
(cherry picked from commit cf34eb8264954a8fd1e92081bcf67719bddbc2aa)
(cherry picked from commit 466bad427d74e666e85445729b2e63b82e10d18f)
DeltaFile
+13-0tools/build/mk/OptionalObsoleteFiles.inc
+7-5sbin/devd/Makefile
+4-4libexec/rc/rc.d/Makefile
+6-1share/man/man5/src.conf.5
+3-3usr.sbin/Makefile
+6-0share/mk/src.opts.mk
+39-134 files not shown
+48-1710 files

FreeBSD/src 0d33cddsys/dev/sound/midi midi.c

sound: Unlock around uiomove() in midi_{read,write}()

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D54130

(cherry picked from commit 6b69d6726a7d3455fb295abfcf9aedd48c580d4a)
DeltaFile
+6-2sys/dev/sound/midi/midi.c
+6-21 files

FreeBSD/src 4791738sys/dev/sound/midi midi.c midiq.h, sys/dev/sound/pci hdspe-pcm.c cs4281.c

sound: Replace MIN() with min()

We use min() in most places.

No functional change intended.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week

(cherry picked from commit eccd366b0a8ba7d902fcf0b1bec447926a75c36c)
DeltaFile
+5-5sys/dev/sound/midi/midi.c
+2-2sys/dev/sound/pci/hdspe-pcm.c
+2-2sys/dev/sound/midi/midiq.h
+2-2sys/dev/sound/usb/uaudio.c
+1-1sys/dev/sound/pci/cs4281.c
+12-125 files

FreeBSD/src 17ed747usr.sbin/sndctl sndctl.c sndctl.8

sndctl(8): Add libxo support

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    ziaee, mckusick
Differential Revision:  https://reviews.freebsd.org/D54032

(cherry picked from commit aa58af04dc88aabf9d2fade2c7d126031cb66f42)
DeltaFile
+100-51usr.sbin/sndctl/sndctl.c
+10-1usr.sbin/sndctl/sndctl.8
+1-1usr.sbin/sndctl/Makefile
+111-533 files

FreeBSD/src 631d6ccsys/netinet sctp_bsd_addr.c

sctp: support bridge interfaces

Reported by:    Timo Völker
Tested by:      Timo Völker

(cherry picked from commit 8d82dafa568baf7be46e5e443dd7310986a28aa9)
DeltaFile
+1-0sys/netinet/sctp_bsd_addr.c
+1-01 files

FreeBSD/src 35c9d8fsys/dev/dwc if_dwc.c

dwc: cleanup

Reviewed by:            Timo Völker
Differential Revision:  https://reviews.freebsd.org/D54788

(cherry picked from commit 3d771e0db66da77da5a7f323df1c0638e6b586ea)
DeltaFile
+9-13sys/dev/dwc/if_dwc.c
+9-131 files

FreeBSD/src ae83ce2sys/modules/sctp Makefile

sctp: improve compilation as module

When compiling SCTP as a module, don't compile sctp_crc32.c into
the module. This avoids code and variable duplication since
sctp_crc32.c is compiled into the kernel. In particular, the variable
system_base_info is not duplicated. This fixes the handling of the
statistic counters sctps_sendhwcrc and sctps_sendswcrc when using
sctp_delayed_cksum.

(cherry picked from commit 68a449f09e2a38def9df822d42f91ecd2f27b0e2)
DeltaFile
+0-1sys/modules/sctp/Makefile
+0-11 files

FreeBSD/src e873111usr.bin/netstat sctp.c

netstat: fix typo

(cherry picked from commit 0ef8f7133d0f1ee28af1689f013f18e002eeae9f)
DeltaFile
+1-1usr.bin/netstat/sctp.c
+1-11 files

FreeBSD/src d966528sys/dev/dwc if_dwc.c

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
Differential Revision:  https://reviews.freebsd.org/D54756

(cherry picked from commit 5d8777f3a7aee04eabbc9f3cf12138f9b56e3ebc)
DeltaFile
+3-3sys/dev/dwc/if_dwc.c
+3-31 files

FreeBSD/src 37de376.github CODEOWNERS

CODEOWNERS: Add myself for openssh and makefs
DeltaFile
+2-1.github/CODEOWNERS
+2-11 files

FreeBSD/src 76ca619. MAINTAINERS

MAINTAINERS: remove stale entry
DeltaFile
+1-1MAINTAINERS
+1-11 files

FreeBSD/src 81bddaesys/dev/dwc if_dwc.c

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
Differential Revision:  https://reviews.freebsd.org/D54754

(cherry picked from commit aca67c37a5215448828a2974a2ff44e75e9159bc)
DeltaFile
+8-2sys/dev/dwc/if_dwc.c
+8-21 files

FreeBSD/src 88249c1sys/dev/dwc if_dwc.c

dwc: prepare for IPv6 transmit checksum offloading

No functional change intended.

(cherry picked from commit 97b177f51fb939943ef920415e541d00789d12f4)
DeltaFile
+3-3sys/dev/dwc/if_dwc.c
+3-31 files

FreeBSD/src 39a25aashare/man/man4 bge.4, sys/dev/bge if_bge.c

bge: disable TXCSUM if UDP transmit checksum offloading is disabled

The bge interface is special with respect to transmit checksumi
offloading. In the default settings, an bge interface announces TXCSUM
capabilities, but only supports TCP/IPv4 and not UDP/IPv4 due to
limitations of some of the NICs. This results in problems when the bge
interface becomes a member of a bridge. Since currently only the
TXCSUM capabilities are synced when a member is added to a bridge and
not the protocol specific capabilities, this can result in a situation
where UDP packets are sent out using a bge interface without having a
correct checksum.
To mitigate this problem, initially don't announce TXCSUM capabilities,
when UDP transmit checksum is disabled. It is still possible to enable
TXCSUM capabilities via ifconfig.

PR:                     291420
Reviewed by:            Timo Voelker
Differential Revision:  https://reviews.freebsd.org/D54486

(cherry picked from commit bbd30927b1af44226c8de0512912a7fedfce2824)
DeltaFile
+13-1sys/dev/bge/if_bge.c
+9-1share/man/man4/bge.4
+22-22 files

FreeBSD/src 3fdfc6csys/netinet6 ip6_output.c

ipv6: account for jumbo payload option

If a jumbo payload option is added, the length of the mbuf chain is
increased by 8 but the actual hop-by-hop extension header with the
jumbo playload option is only inserted in the packet if there are
other options. Therefore, adjust optlen to reflect the actual size
of IPv6 extension headers including the hop-by-hop extension header
containing the jumbo payload option.

Reported by:            syzbot+73fe316271df473230eb at syzkaller.appspotmail.com
Reviewed by:            markj, Timo Voelker
Differential Revision:  https://reviews.freebsd.org/D54394

(cherry picked from commit 1f5b1de1fdf2924066c1851ed6c73f36fe20b438)
DeltaFile
+1-0sys/netinet6/ip6_output.c
+1-01 files

FreeBSD/src a83f642sys/dev/dwc if_dwc.c

dwc: improve IPv4 transmit checksum offloading

This patch provides two improvements for TCP/IPv4 and UDP/IPv4
transmit checksum offloading:
(1) Use *CIC_SEG instead of *CIC_FULL, since FreeBSD always provides
    a pseudo header checksum.
(2) Don't make transmit IPv4 header checksum offloading a prerequisite
    for TCP/IPv4 or UDP/IPv4 transmit checksum offloading.
This is the root cause of PR 291696, since right now the epair
interface does not support transmit IPv4 header checksum offloading,
but TCP/IPv4 and UDP/IPv4 transmit checksum offloading.

PR:                     291696
Reviewed by:            Timo Voelker
Tested by:              Marek Benc
Differential Revision:  https://reviews.freebsd.org/D54395

(cherry picked from commit f8ddf74175c8013268e65b18750e247306fa088a)
DeltaFile
+7-14sys/dev/dwc/if_dwc.c
+7-141 files

FreeBSD/src 0b2cf69sys/compat/linuxkpi/common/include/linux radix-tree.h, sys/compat/linuxkpi/common/src linux_radix.c

linuxkpi: Take const root in read-only radix tree functions

This is a preparation step for a future addition to this file. This is
also closer to what Linux does.

Reviewed by:    emaste
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit cf39b51d36d82214ebdfd03055d321ddd2d85274)
(cherry picked from commit c5445540995fd37c390ad371a2e95d300ee83988)
DeltaFile
+4-4sys/compat/linuxkpi/common/src/linux_radix.c
+2-2sys/compat/linuxkpi/common/include/linux/radix-tree.h
+6-62 files

FreeBSD/src fab0a83sys/netinet ip_output.c

tcp: fix checksum calculation bug

The new function in_delayed_cksum_o() was introduced to compute
the checksum in the case the mbuf chain does not start with the
IP header. The offset of the IP header is specified by the
parameter iph_offset.
If iph_offset was positive, the function computed an incorrect
checksum.

Reviewed by:            sobomax, tuexen
Fixes:                  5feb38e37847 ("netinet: provide "at offset" variant of the in_delayed_cksum() API")
Differential Revision:  https://reviews.freebsd.org/D54269

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

FreeBSD/src c1b29bcsys/dev/virtio/network if_vtnet.c

vtnet: improve consistency

Use sbuf_new_for_sysctl() instead of sbuf_new_auto() when exposing
the flags via sysctl.

(cherry picked from commit 8da838ac31692e381adfc63d83ea49f2adabbf23)
DeltaFile
+6-8sys/dev/virtio/network/if_vtnet.c
+6-81 files

FreeBSD/src 9d246c6share/man/man4 vtnet.4, sys/dev/virtio/network if_vtnet.c virtio_net.h

vtnet: expose features via sysctl tree

Right now the 64-bit flags field needs to be casted to a 32-bit field,
because clang warns if more than 32-bits are used.
Once clang is fixed, this restriction will be removed and more bits
will be added.

Reviewed by:            markj, Timo Völker
Differential Revision:  https://reviews.freebsd.org/D54288

(cherry picked from commit 634d9c0d111b630c3d63a1cf25d15c32a37afab8)
DeltaFile
+18-0sys/dev/virtio/network/if_vtnet.c
+8-0sys/dev/virtio/network/virtio_net.h
+3-1share/man/man4/vtnet.4
+29-13 files

FreeBSD/src 39140d9share/man/man9 printf.9, sys/kern subr_prf.c

printf.9: Support more than 32 bits in %b

This will be usable after clang has been extended to accept length
modifiers for %b when compiling kernel code.
But we need FreeBSD to support it first...

Reviewed by:            markj, Timo Völker
Differential Revision:  https://reviews.freebsd.org/D54286

(cherry picked from commit d2cb9cab8457b2a84898f0ac86f7b45e907f872c)
DeltaFile
+31-9sys/kern/subr_prf.c
+18-7share/man/man9/printf.9
+49-162 files

FreeBSD/src 1923671share/man/man9 printf.9

printf.9: fix style

Follow the style described by style.9.

Reported by:    markj

(cherry picked from commit 391e8709315d4a0e8f5ba91912e370571ab6841b)
DeltaFile
+1-2share/man/man9/printf.9
+1-21 files

FreeBSD/src 0249458share/man/man4 vtnet.4

vtnet.4: put each sentence on its own line

Reported by:    ziaee
Fixes:          e3a0571ad74d ("vtnet: expose flags via sysctl tree")

(cherry picked from commit f6e183301851e3e826d53a29e76cfc9bc7626477)
DeltaFile
+2-1share/man/man4/vtnet.4
+2-11 files

FreeBSD/src 58e5923share/man/man4 vtnet.4, sys/dev/virtio/network if_vtnet.c if_vtnetvar.h

vtnet: expose flags via sysctl tree

Provide the flags used for a vtnet interface via the sysctl tree.
This is mostly used for debugging purposes.

Reviewed by:            Timo Völker
Differential Revision:  https://reviews.freebsd.org/D54283

(cherry picked from commit e3a0571ad74d8429a95fcae9efc1d91cc109a337)
DeltaFile
+20-0sys/dev/virtio/network/if_vtnet.c
+5-0sys/dev/virtio/network/if_vtnetvar.h
+3-1share/man/man4/vtnet.4
+28-13 files

FreeBSD/src 21f6087sys/dev/virtio/network virtio_net.h

vtnet: define flags in a consistent way

This allows adding flags in the upper 32 bits in a consistent way.
No functional change intended.

(cherry picked from commit e0c6c4ecfc755b78ac9135033053d2f15c62bf04)
DeltaFile
+23-23sys/dev/virtio/network/virtio_net.h
+23-231 files

FreeBSD/src d8b8dc7sys/dev/dpaa2 dpaa2_ni.c

dpaa2: cleanup

No functional change intended.

Reviewed by:            bz, dsl
MFC after:              3 days
Differential Revision:  https://reviews.freebsd.org/D54805
DeltaFile
+4-20sys/dev/dpaa2/dpaa2_ni.c
+4-201 files

FreeBSD/src 53d6b23usr.sbin/cron/cron cron.8

cron.8: clarify system crontab format

PR:             234504
MFC after:      1 week
DeltaFile
+6-5usr.sbin/cron/cron/cron.8
+6-51 files

FreeBSD/src 21a7a9esys/powerpc/mpc85xx pci_mpc85xx.c

powerpc/mpc85xx: Fix PCI attach error cleanup

If an error occurs during attach after ofw_pcib_init() runs, the device
is torn down, leaving the rmans embedded in the softc attached to the
rman list, thus corrupting the rman list.  Fix this by undoing
everything that was done by this point.

MFC after:      1 week
DeltaFile
+17-2sys/powerpc/mpc85xx/pci_mpc85xx.c
+17-21 files

FreeBSD/src 24d048bsys/powerpc/mpc85xx platform_mpc85xx.c

powerpc/mpc85xx: Set pc_hwref to the primary thread ID

On multithreaded cores (e6500) the CPU ID in the device tree (reg[0]) is
the primary core, which may not match the cpuid, until Book-E threading
is added.
DeltaFile
+14-2sys/powerpc/mpc85xx/platform_mpc85xx.c
+14-21 files