FreeBSD/src 8983accinclude/ssp string.h, lib/libc/string memset_explicit.c

lib/libc/string: apply SSP hardening and tests to memset_explicit

Reviewed by:    emaste, kevans
Differential Revision:  https://reviews.freebsd.org/D47286
DeltaFile
+132-0lib/libc/tests/secure/fortify_string_test.c
+9-0lib/libc/tests/secure/generate-fortify-tests.lua
+2-1lib/libc/string/memset_explicit.c
+2-0include/ssp/string.h
+145-14 files

FreeBSD/src 007871cinclude string.h, lib/libc/string memset_explicit.c memset.3

lib/libc/string: add memset_explicit() for compliance with C23

Patterned after explicit_bzero, visible from C23 onwards.

Reviewed by:    emaste, kevans
Differential Revision:  https://reviews.freebsd.org/D47286
DeltaFile
+26-0lib/libc/string/memset_explicit.c
+16-2lib/libc/string/memset.3
+3-1lib/libc/string/Makefile.inc
+4-0lib/libc/string/Symbol.map
+3-0include/string.h
+52-35 files

FreeBSD/src 3ef9e13usr.bin/lock lock.1

lock.1: align options + tag spdx

Reviewed by:    imp, mhorne
MFC after:      3 days
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1522
DeltaFile
+4-1usr.bin/lock/lock.1
+4-11 files

FreeBSD/src e413da1sbin/ipf/ipf ipf.5, sbin/ipf/ipfs ipfs.8

manuals: fix "PP after SS | SH" warnings

The full mandoc warnings were:
    skipping paragraph macro: PP after SS
    skipping paragraph macro: PP after SH

The rendered output (in ascii and html) is not affected by this commit.

Fixes made by script in https://github.com/Tarsnap/freebsd-doc-scripts

Signed-off-by:  Graham Percival <gperciva at tarsnap.com>
Reviewed by:    jlduran, mhorne
MFC after:      1 week
Sponsored by:   Tarsnap Backup Inc.
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1524
DeltaFile
+0-37sbin/ipf/ipf/ipf.5
+0-9sbin/ipf/ipnat/ipnat.5
+0-6sbin/ipf/ippool/ippool.5
+0-3sbin/ipf/ipfs/ipfs.8
+0-3sbin/ipf/ipsend/ipsend.1
+0-3sbin/ipf/ipmon/ipmon.5
+0-6114 files not shown
+0-8220 files

FreeBSD/src bc919e8lib/libpmc pmc.cmn-600.3 pmc.dmc-620.3, stand/man loader.efi.8

man: Misc syntax fixes

- loader.efi.8: use proper way of printing a backslash.
- usr.bin/gzip/gzip.1: contained a non-breaking space (in utf-8, 0xC2A0).
- lib/libpmc/pmc.*.3: remove two duplicate .Xr lines

Signed-off-by:  Graham Percival <gperciva at tarsnap.com>
Reviewed by:    mhorne, Alexander Ziaee <concussious.bugzilla at runbox.com>
MFC after:      3 days
Sponsored by:   Tarsnap Backup Inc.
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1523
DeltaFile
+1-1stand/man/loader.efi.8
+1-1usr.bin/gzip/gzip.1
+0-1lib/libpmc/pmc.cmn-600.3
+0-1lib/libpmc/pmc.dmc-620.3
+2-44 files

FreeBSD/src 125ce84share/mk bsd.subdir.mk

bsd.subdir.mk: Drop broken optimisation for realinstall parallelisation

Not all of the tree is happy for realinstall to be done in parallel. In
particular, Makefile.inc1 uses .WAIT to force etc to be installed after
earlier subdirectories, since etc calls into share/man's makedb to run
makewhatis on the tree and needs all manpages to have been installed.
Also, libexec/Makefile doesn't set SUBDIR_PARALLEL, and the link from
ld-elf32.1 to ld-elf.1 relies on rtld-elf having been installed before
rtld-elf32, otherwise creating the link will fail.

In general, core behavioural differences like this between NO_ROOT and
"normal" builds are also dangerous and confusing.

If this optimisation is deemed important, it should be reintroduced in a
more limited and robust manner that doesn't break the above situations.
Until then value correctness over slight efficiency gains on high core
count machines, the same machines where you're more likely to encounter
issues from this optimisation.


    [12 lines not shown]
DeltaFile
+0-5share/mk/bsd.subdir.mk
+0-51 files

FreeBSD/src 52ef944sys/netinet6 in6_pcb.h in6_pcb.c

inpcb: Constify address parameters to in6 pcb lookup routines

No functional change intended.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Sponsored by:   Stormshield
DeltaFile
+8-14sys/netinet6/in6_pcb.h
+8-8sys/netinet6/in6_pcb.c
+16-222 files

FreeBSD/src 3bb15ffsys/netinet6 in6.h in6.c

in6: Constify some sockaddr conversion functions

No functional change intended.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Sponsored by:   Stormshield
DeltaFile
+3-3sys/netinet6/in6.h
+2-2sys/netinet6/in6.c
+5-52 files

FreeBSD/src b697835usr.bin/asa/tests asa_test.sh, usr.bin/cmp/tests cmp_test2.sh

Improve reliability of stdout tests.

If the test runner is under heavy load, the command we are testing may
succeed in printing to stdout before the dummy receiver has terminated.
Add a short delay to reduce the likelihood of this happening.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D47572
DeltaFile
+1-0usr.bin/asa/tests/asa_test.sh
+1-0usr.bin/cmp/tests/cmp_test2.sh
+1-0usr.bin/env/tests/env_test.sh
+3-03 files

FreeBSD/src 0b4539esys/netinet in_pcb.c in_pcb.h, sys/netinet6 udp6_usrreq.c

inpcb: gc unused argument of in_pcbconnect()
DeltaFile
+1-2sys/netinet/in_pcb.c
+1-2sys/netinet/in_pcb.h
+1-1sys/netinet/tcp_syncache.c
+1-1sys/netinet/tcp_usrreq.c
+1-1sys/netinet/udp_usrreq.c
+1-1sys/netinet6/udp6_usrreq.c
+6-86 files

FreeBSD/src 81f08f3sys/netinet siftr.c

siftr: remove pointless assertion

The assertion is correct, but isn't useful.  Also it contradicts
its own comment.
DeltaFile
+0-3sys/netinet/siftr.c
+0-31 files

FreeBSD/src 20162e6sys/netinet6 raw_ip6.c

rip6: don't lock the inpcb list

There is no point in doing that when we operate on a particular inpcb.
DeltaFile
+0-5sys/netinet6/raw_ip6.c
+0-51 files

FreeBSD/src fb7c1acsys/netinet tcp_subr.c

tcp: remove the looping on pcb count in tcp_destroy()

This was useful when TCP timers were not able to reliably stop. Note that
in_pcbinfo_destroy() called later asserts that V_tcbinfo.ipi_count is 0.

This reverts 806929d514234, b54e08e11ac15.
DeltaFile
+0-15sys/netinet/tcp_subr.c
+0-151 files

FreeBSD/src b64867esys/arm/freescale/imx imx6_ssi.c, sys/arm/freescale/vybrid vf_sai.c

Revert "sound: Make device registration more intuitive"

These KPI changes will break out-of-tree drivers. Keep the commit only
in -CURRENT.

This reverts commit 5aece3be1c84f6786f89894efeca1219a282f3f3.
DeltaFile
+51-52sys/dev/sound/pcm/sound.c
+6-7sys/dev/sound/pci/hdspe-pcm.c
+6-6sys/arm/freescale/vybrid/vf_sai.c
+6-6sys/arm/freescale/imx/imx6_ssi.c
+6-5sys/dev/sound/pci/vibes.c
+7-4sys/dev/sound/usb/uaudio.c
+82-8025 files not shown
+172-16131 files

FreeBSD/src 45a77bfsys/netinet in_pcb.c, sys/netinet6 in6_pcb.c

inpcb: Make some cosmetic improvements to in_pcbbind()

- Use the local var "laddr" instead of sin->sin_addr in one block.
- Use in_nullhost() instead of explicit comparisons with INADDR_ANY.
- Combine multiple socket options checks into one.
- Fix indentation.
- Remove some unhelpful comments.

This is in preparation for some simplification and bug-fixing.

No functional change intended.

Reviewed by:    glebius
MFC after:      2 weeks
Sponsored by:   Klara, Inc.
Sponsored by:   Stormshield
Differential Revision:  https://reviews.freebsd.org/D47451
DeltaFile
+20-24sys/netinet/in_pcb.c
+8-11sys/netinet6/in6_pcb.c
+28-352 files

FreeBSD/src 02dc158share/man/man7 build.7

build: note that DESTDIR must be an absolute path

PR:             282737
Sponsored by:   The FreeBSD Foundation
DeltaFile
+3-0share/man/man7/build.7
+3-01 files

FreeBSD/src 893d044sys/sys param.h

Bump __FreeBSD_version for hiding struct ifnet

Reported by:    olivie@
Sponsored by:   Juniper Networks, Inc.
DeltaFile
+1-1sys/sys/param.h
+1-11 files

FreeBSD/src 9d4428asys/sys libkern.h

<sys/libkern.h>: Don't include <ssp/ssp.h> in the kernel

Reviewed by:    kevans
Obtained from:  CheriBSD
Sponsored by:   AFRL, DARPA
Differential Revision:  https://reviews.freebsd.org/D47519
DeltaFile
+1-1sys/sys/libkern.h
+1-11 files

FreeBSD/src 73da026sys/kern kern_rwlock.c kern_mutex.c

locks: Use %p to print uintptr_t values

Pointers are not the same shape as sizes on CHERI architectures.  Cast
to void * and print with %p instead.

Obtained from:  CheriBSD
Sponsored by:   AFRL, DARPA
Differential Revision:  https://reviews.freebsd.org/D47342
DeltaFile
+4-4sys/kern/kern_rwlock.c
+1-1sys/kern/kern_mutex.c
+5-52 files

FreeBSD/src 22dcc81sys/netinet/cc cc_cubic.c cc_chd.c

tcp: Use segment size excluding tcp options for all cwnd calculations

Avoid sending small segments by making sure that cwnd is usually
calculated in full (data) segment sizes. Especially during loss
recovery and retransmission scenarios.

Reviewed By: tuexen, #transport
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D47474
DeltaFile
+12-12sys/netinet/cc/cc_cubic.c
+11-9sys/netinet/cc/cc_chd.c
+8-7sys/netinet/cc/cc_htcp.c
+7-6sys/netinet/cc/cc.c
+7-6sys/netinet/cc/cc_dctcp.c
+6-5sys/netinet/cc/cc_vegas.c
+51-453 files not shown
+61-549 files

FreeBSD/src 8f5a2e2sys/netinet tcp_output.c tcp_input.c

tcp: fix cwnd recalculation during limited transmit

Properly calculate the expected flight size (cwnd) during
limited transmit. Exclude the SACK scoreboard from
consideration when still in limited transmit.

PR: 282605
Reviewed By: tuexen, #transport
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D47541
DeltaFile
+2-1sys/netinet/tcp_output.c
+1-1sys/netinet/tcp_input.c
+3-22 files

FreeBSD/src c9047ebsys/netinet tcp_output.c, sys/netinet/tcp_stacks rack.c bbr.c

tcp: allow TSO even while RX path is unordered

Over IP networks, forward and return path largely
act independently from each other. Do not disable LRO
on the TX side, when reordering/loss is happening
on the RX half-connection.

Reviewed By: rrs, #transport, peter.lei_ieee.org
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D47056
DeltaFile
+4-4sys/netinet/tcp_output.c
+1-4sys/netinet/tcp_stacks/rack.c
+0-1sys/netinet/tcp_stacks/bbr.c
+5-93 files

FreeBSD/src 48ddd1bsys/dev/ixgbe ixgbe_82599.c if_ix.c

ixgbe: Add support for 1Gbit DAC links

This is a relatively well known trick for the X520 (82599), can be
useful for testing and lab settings.  It's not an official standard or
particularly common but ubiquitous Broadcom switch ASICs deal with it.

We'll call it 1000Base-KX because it's SerDes on the passive cable and
I don't think it's worth adding another media type for this.

Reviewed by:    emaste
MFC after:      1 week
Sponsored by:   BBOX.io
Differential Revision:  https://reviews.freebsd.org/D47352
DeltaFile
+11-0sys/dev/ixgbe/ixgbe_82599.c
+6-1sys/dev/ixgbe/if_ix.c
+2-1sys/dev/ixgbe/ixgbe_phy.c
+19-23 files

FreeBSD/src 209fd89lib/libc/gen dlfcn.c, lib/libdl Symbol.map

_dl_iterate_phdr_locked(): fix libc and libdl

Add prototype.  Export from libdl.

Fixes:  1426fd6cff0603f0ee275b99f2ba35dc36f3d0c2
Reviewed by:    kevans
Sponsored by:   The FreeBSD Foundation
Differential revision:  https://reviews.freebsd.org/D47563
DeltaFile
+4-0lib/libdl/Symbol.map
+2-0lib/libc/gen/dlfcn.c
+6-02 files

FreeBSD/src 5d24286sbin/ping/tests test_ping.py

ping tests: Run tests unprivileged inside a vnet

In order to create vnet jails, atf_python needs root privileges.
However, once the vnet is created, its privileges inside the vnet can be
demoted, as these tests should not require root in order to pass.

Reviewed by:    markj
Approved by:    emaste (mentor)
Fixes:  4efaf43c6fa7 ("ping: Require root user for pytests")
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D42175

(cherry picked from commit 5797a03fe8a7c3355a727aaaea803ee1f42d106b)
DeltaFile
+2-0sbin/ping/tests/test_ping.py
+2-01 files

FreeBSD/src 124ecd5sbin/ping/tests test_ping.py

ping tests: Silence deprecation warnings

Declare some regex patterns as a raw string by prepending `r`.

Reviewed by:    markj
Approved by:    emaste (mentor)
Differential Revision:  https://reviews.freebsd.org/D42174

(cherry picked from commit 8b13cb9d654c985534d24a09ec5dab02cc4dea6e)
DeltaFile
+4-4sbin/ping/tests/test_ping.py
+4-41 files

FreeBSD/src 4c7c29asbin/ping/tests test_ping.py

ping: tests: Align with Scapy defaults

Align some of pinger() defaults with Scapy to facilitate debugging when
printing packets.

No functional change intended.

Reviewed by:    emaste, kp
Approved by:    emaste (mentor)
Differential Revision:  https://reviews.freebsd.org/D47159

(cherry picked from commit 4859030ef193688153f490915794ae9ab77f012b)
DeltaFile
+5-5sbin/ping/tests/test_ping.py
+5-51 files

FreeBSD/src 797884asbin/ping/tests test_ping.py

ping: tests: Cleanup IPOption()s

Scapy now only accepts known options with IPOption(), so our unknown
option must be passed raw.

While here, prefer the named options for EOL and NOP.

Reviewed by:    emaste, kp
Approved by:    emaste (mentor)
Differential Revision:  https://reviews.freebsd.org/D47160

(cherry picked from commit 2e29bf7a2ae66acb6e65ffc1c923cfb373af67bd)
DeltaFile
+4-4sbin/ping/tests/test_ping.py
+4-41 files

FreeBSD/src f6d94e2libexec/rc rc.conf

rc: Update ipfilter example rules location

It was originally /usr/src/contrib/ipfilter/rules and moved to
/usr/src/share/examples/ipfilter/rules in 41edb306f056.

Point to users to /usr/src/share/examples/ipfilter instead, as the base
directory also contains example rules.

Reviewed by:    emaste
Approved by:    emaste (mentor)
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D47392

(cherry picked from commit 8934526be1843ba033e1423f6ecd8b3b3f2a9c23)
DeltaFile
+1-1libexec/rc/rc.conf
+1-11 files

FreeBSD/src 200a3cbsys/dev/sound driver.c

sound: Include snd_cmi only for i386 and amd64

When running FreeBSD on an arm64/aarch64 QEMU virtual machine, using the
Intel HD Audio Controller (ich6) (intel-hda), for example, and by
following the procedure in the handbook ("Setting Up the Sound Card"):

    kldload snd_driver

The following error is shown:

    KLD snd_driver.ko: depends on snd_cmi - not available or version mismatch

This is because the CMedia sound driver (snd_cmi) is only built for i386
and amd64.

Add the same guards to the snd_driver metadriver.

Reviewed by:    christos, emaste
Approved by:    emaste (mentor)

    [4 lines not shown]
DeltaFile
+2-0sys/dev/sound/driver.c
+2-01 files