HardenedBSD/src fe035eesys/dev/cxgbe t4_main.c t4_sge.c, usr.bin/diff diffreg.c diff.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+41-0sys/dev/cxgbe/t4_main.c
+10-5sys/dev/cxgbe/t4_sge.c
+7-3usr.bin/diff/diffreg.c
+1-1usr.bin/diff/diff.c
+59-94 files

HardenedBSD/src 890a7b3bin/sh sh.1, contrib/spleen spleen-32x64.bdf spleen-16x32.bdf

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+703-64contrib/spleen/spleen-32x64.bdf
+371-20contrib/spleen/spleen-16x32.bdf
+337-27contrib/spleen/spleen-12x24.bdf
+163-161sys/dev/sym/sym_hipd.c
+213-6contrib/spleen/spleen-8x16.bdf
+183-10bin/sh/sh.1
+1,970-28859 files not shown
+2,335-50365 files

HardenedBSD/src 4013406usr.bin/diff diff.c

diff: Bump version number

MFC after:      1 week
Sponsored by:   Klara, Inc.
DeltaFile
+1-1usr.bin/diff/diff.c
+1-11 files

HardenedBSD/src f99ca31sys/dev/sym sym_hipd.c

sym(4): Use memcpy(9) instead of bcopy(9)

The overlap handling of bcopy(9) is not required in these cases.

Obtained from:  BSD-licensed Linux sym53c8xx driver

(cherry picked from commit c8e9479c74a2af0f6c665e930091c163bf760fd5)
DeltaFile
+5-5sys/dev/sym/sym_hipd.c
+5-51 files

HardenedBSD/src 56a09f7sys/dev/sym sym_hipd.c

sym(4): Provide a DEVICE_DETACH(9) method

This also fixes sym_cam_free() to tear things down correctly, i. e. in
opposite order of setup, as well as sym_cam_attach() to not free devq
and SIM twice in the failure case.

(cherry picked from commit 518c01b31e96bbe8353a551885a61e7da6aed5f6)
DeltaFile
+19-15sys/dev/sym/sym_hipd.c
+19-151 files

HardenedBSD/src 3445fd3sys/dev/sym sym_hipd.c

sym(4): Map HCB memory as uncacheable also on x86

As part of making the chip-specific mix and match of different accesses
(DMA/bus space) work as desired, the intent is to map the HCB memory as
uncacheable. Prior to VM_MEMATTR_*, the !x86 way of indicating this to
bus_dmamem_alloc(9) was BUS_DMA_COHERENT. Then later on in 2db99100a4,
BUS_DMA_NOCACHE was hooked up to VM_MEMATTR_UNCACHEABLE for x86. As it
turns out, still as of today bus_dmamem_alloc(9) differs in this regard
across architectures. On arm, it still supports BUS_DMA_COHERENT only
for requesting uncacheable DMA and x86 still uses BUS_DMA_NOCACHE only.
On arm64 and riscv, BUS_DMA_COHERENT seems to effectively be an alias
for BUS_DMA_NOCACHE.

Thus, allocate the HCB memory with BUS_DMA_COHERENT | BUS_DMA_NOCACHE,
so we get uncacheable memory on all architectures including x86 and so
loads and stores from/to HCB won't get reordered. However, even on x86
we still need to use at least compiler barriers to achieve the desired
program order.


    [12 lines not shown]
DeltaFile
+19-27sys/dev/sym/sym_hipd.c
+19-271 files

HardenedBSD/src 692dd70sys/dev/sym sym_hipd.c

sym(4): Consistently use device_printf(9) where applicable

(cherry picked from commit 48eee744b540ef0413fa1cb543dde6e49e7f2ac4)
DeltaFile
+114-108sys/dev/sym/sym_hipd.c
+114-1081 files

HardenedBSD/src 46cf886sys/cam/scsi scsi_enc_ses.c, sys/dev/hptmv entry.c gui_lib.c

style(9): white space after ; and around binary operators

in for() loops.  Also, use 'while', where only the
conditional test of 'for' was used.

Reviewed by: sjg

(cherry picked from commit 0050289464fa56ec79e060b8d8378b9ff7145a0e)
DeltaFile
+16-17sys/dev/hptmv/entry.c
+7-7sys/dev/ocs_fc/ocs_mgmt.c
+6-7sys/dev/tws/tws.c
+6-6sys/dev/sym/sym_hipd.c
+5-7sys/dev/hptmv/gui_lib.c
+3-3sys/cam/scsi/scsi_enc_ses.c
+43-4724 files not shown
+82-8630 files

HardenedBSD/src 51cb927share/man/man4 vt.4

vt.4: Sprinkle mdoc macros

Now that we have angle bracket characters for all common display sizes,
sprinkle in the correct macros for the structures in this page. While
here, fix a mdoc typo, a linter warning, and switch a parenthetical to
a much smoother appositive.

MFC after:      3 days
Fixes:          7cd6da268a8f (vt.4: Style pass)

(cherry picked from commit a97ed3a39c1044dd1b8056d68a76de74821f2bff)
DeltaFile
+35-35share/man/man4/vt.4
+35-351 files

HardenedBSD/src da4c7b4contrib/spleen spleen-32x64.bdf spleen-16x32.bdf

contrib/spleen: Update to 2.2.O

This release adds several new characters critical to the manual pages
that were previously missing on high-dpi displays: em-dash, en-dash,
hyphen, angle brackets, white square, dagger, and double dagger. It
also features improved alignment for numerous characters in different
sizes.

Thanks:         Fredric Cambus
MFC after:      3 days
Discussed with: emaste

(cherry picked from commit 0d602f923ed8a889c3a848ab9f19aa52f917f6ee)
DeltaFile
+703-64contrib/spleen/spleen-32x64.bdf
+371-20contrib/spleen/spleen-16x32.bdf
+337-27contrib/spleen/spleen-12x24.bdf
+213-6contrib/spleen/spleen-8x16.bdf
+24-0contrib/spleen/ChangeLog
+12-3contrib/spleen/README.md
+1,660-1203 files not shown
+1,669-1299 files

HardenedBSD/src 8836e48share/man/man4 vt.4, share/syscons/fonts INDEX.fonts

INDEX.fonts: Minor maintenance

+ Mention relevance of this file in the vt manual screen.font entry
+ The vidfont manual is in section one, not eight
+ Remove leftover blank line from freebsd tag removal

MFC after:      3 days

(cherry picked from commit 1f5795b6422a1c6e4b71fd7e93717522ccb822f9)
DeltaFile
+3-0share/man/man4/vt.4
+1-2share/syscons/fonts/INDEX.fonts
+1-2share/vt/fonts/INDEX.fonts
+1-2stand/fonts/INDEX.fonts
+6-64 files

HardenedBSD/src 0b5ced4bin/sh sh.1

sh.1: Provide detailed job control documentation

Adopt the POSIX standard text to our implementation.

PR:                     206284
Reviewed by:            des, jilles, ziaee
Differential Revision:  https://reviews.freebsd.org/D49895

(cherry picked from commit 2711852bd9ac3ab78d2b128d3549ff437d2a09af)
DeltaFile
+182-9bin/sh/sh.1
+182-91 files

HardenedBSD/src 8a36a29share/man/man7 freebsd-base.7

pkgbase.7: Show pkg upgrade to apply updates

MFC after:      3 days
Reviewed by:    ziaee
Closes:         https://github.com/freebsd/freebsd-src/pull/1945

(cherry picked from commit d1f93ea2e1646f1a844f37a855a70de1b186dbd7)
DeltaFile
+1-1share/man/man7/freebsd-base.7
+1-11 files

HardenedBSD/src 40b0783share/man/man4 termios.4

termios.4: Cross-reference stack(9) for STATUS

If the kernel is built without stack(9) (options STACK),
then the mentioned sysctl(8) kern.tty_info_kstacks will not be found.

MFC after:              3 days
Reviewed by:            kib, ziaee
Differential Revision:  https://reviews.freebsd.org/D54701

(cherry picked from commit fd34f549b711f0481336a838a99af710ab24644a)
DeltaFile
+4-2share/man/man4/termios.4
+4-21 files

HardenedBSD/src 093b16ausr.bin/wc wc.1 wc.c

wc: Fix usage and manual SYNOPSIS + nits

The -c and -m flags are mututally exclusive. Also minor manual fixes:

+ Angle quotes do not work in prose, use double quote matching extant
+ Align manual page options list
+ Tag SPDX license identifier for manual

PR:             292408
MFC after:      3 days

(cherry picked from commit 4cb65fde79a2412558d10fdbf3427fc0e4536d80)
DeltaFile
+8-4usr.bin/wc/wc.1
+1-1usr.bin/wc/wc.c
+9-52 files

HardenedBSD/src 89c2d33stand/i386/pxeldr pxeboot.8

pxeboot.8: Fix mdoc typo for emails, tag spdx

Fixes:          a37825313f62 (Fix mdoc typos for emails, tag spdx)
MFC after:      3 days

(cherry picked from commit 1961785e35484a89e49672c5ac7f9da6a7f56b3c)
DeltaFile
+6-3stand/i386/pxeldr/pxeboot.8
+6-31 files

HardenedBSD/src 7478647. Makefile.inc1 Makefile

Makefile: Update doxygen requirements

MFC after:      3 days
Reviewed by:    imp, ziaee
Signed-off-by:  Minsoo Choo <minsoochoo0122 at proton.me>
Closes:         https://github.com/freebsd/freebsd-src/pull/1869

(cherry picked from commit d2f1c8e0d1bebab9fba32d69d261abc101f368ba)
DeltaFile
+8-0Makefile.inc1
+2-2Makefile
+10-22 files

HardenedBSD/src f807836bin/sh sh.1

sh.1: Restore missing builtin commands

PR:             292221
Fixes:          2980318b2747 (sh.1: extend the section about getopts)
MFC after:      3 days

(cherry picked from commit 2962dc76877538508944a441fd1570322e969380)
DeltaFile
+1-1bin/sh/sh.1
+1-11 files

HardenedBSD/src 89fc636share/man/man4 cxgbe.4

cxgbe.4: Update for recent HARDWARE

Adjust document description, description section, and hardware section
to include Chelsio T7. Since this driver now supports many generations,
order reverse chronologically. Compare language to ice.4 and bnxt.4,
the other terabit ethernet drivers.

This list of HARDWARE is obtained from the Chelsio prouduct selector.

MFC after:              3 days (T7 support shipped with 15.0)
Discussed with:         jhb, np
Differential Revision:  https://reviews.freebsd.org/D54276

(cherry picked from commit 03e1605cdf17c48d5e0d6d42a9f15b78b3b7adb0)
DeltaFile
+48-10share/man/man4/cxgbe.4
+48-101 files

HardenedBSD/src 9229de7lib/libsys ptrace.2 chroot.2, share/man/man7 security.7

manuals: Correct some sysctl markup

This enables additional searching the manual by sysctl variable.
This syntax is standardized in style.mdoc(5).

Reported by:    bapt
MFC after:      3 days

(cherry picked from commit 75866d71e8d93fe1a1ff469b8a9c6c6c9908a6c8)
DeltaFile
+29-29share/man/man7/security.7
+5-5lib/libsys/ptrace.2
+3-3lib/libsys/chroot.2
+1-1usr.sbin/chroot/chroot.8
+38-384 files

HardenedBSD/src 5c2b679release/scripts pkg-stage.sh

HBSD: Resolve merge conflict

Signed-off-by:  Shawn Webb <shawn.webb at hardenedbsd.org>
DeltaFile
+1-5release/scripts/pkg-stage.sh
+1-51 files

HardenedBSD/src d91a0eelib/libc/gen directory.3, lib/libc/resolv res_init.c

Merge remote-tracking branch 'origin/freebsd/15-stable/main' into hardened/15-stable/main

Conflicts:
        release/scripts/pkg-stage.sh (unresolved)
DeltaFile
+52-38lib/libc/gen/directory.3
+26-41lib/libc/resolv/res_init.c
+19-37usr.bin/diff3/diff3.c
+13-15lib/libc/tests/gen/dir2_test.c
+21-6release/scripts/pkg-stage.sh
+6-13usr.bin/diff/pr.c
+137-15016 files not shown
+173-17022 files

HardenedBSD/src 9352d2fsys/dev/cxgbe t4_main.c t4_sge.c

cxgbe(4): sysctl to disable/enable the TCB cache

The TCB cache can be enabled/disabled at any time on the T7 and this
commit adds a sysctl to do that.  This is for debug only.

 # sysctl dev.chnex.0.misc.tcb_cache=0
 # sysctl dev.chnex.0.misc.tcb_cache=1

MFC after:      1 week
Sponsored by:   Chelsio Communications
DeltaFile
+41-0sys/dev/cxgbe/t4_main.c
+10-5sys/dev/cxgbe/t4_sge.c
+51-52 files

HardenedBSD/src 79b28bcsys/fs/nfsclient nfs_clrpcops.c

nfscl: Fix the build

(cherry picked from commit 053449fa5c6c9fdbff1d1014482a5842bc860811)
DeltaFile
+2-1sys/fs/nfsclient/nfs_clrpcops.c
+2-11 files

HardenedBSD/src 406c98dsys/fs/nfs nfsport.h, sys/fs/nfsclient nfs_clrpcops.c nfs_clvnops.c

nfscl: Fix handling of case insensitive file systems

Name caching must be handled somewhat differently
for case insensitive file systems.  Negative name
caching does not work and, for rename, all names
associated with the rename'd vnode must be disabled.

For a case insensitive ZFS file system that is exported,
the unpatched code did work, since the change in mtime
or ctime of the directory when other case names were
created or rename'd would disable the false name cache
hit.  However, an export of an msdosfs file system
breaks the NFS client, because it only works if ctime/mtime
is changed whenever a name is added/removed.  Depending
on what the server file system is, this may not happen,
due to clock resolution or lack of support for these
attributes.

This patch checks to see if the server file system is

    [9 lines not shown]
DeltaFile
+16-3sys/fs/nfsclient/nfs_clrpcops.c
+11-1sys/fs/nfsclient/nfs_clvnops.c
+2-0sys/fs/nfs/nfsport.h
+29-43 files

HardenedBSD/src 2e665cesys/fs/nfs nfs.h nfsdport.h, sys/fs/nfsserver nfs_nfsdport.c nfs_nfsdserv.c

nfsd: Fix handling of attributes during Open/Create/Exclusive_41

When an NFSv4.n client specifies settings for attributes other
mode during a Open/Create/Exclusive_41, these other attributes
were not being set.

This patch resolves the problem by calling nfsrv_fixsattr()
after the VOP_CREATE() call in nfsvno_open() for this case.

There is no extant NFSv4.n client that currently does this,
as far as I know.

(cherry picked from commit 4fc11c92d324c9099ecc28f25a96591a2ff6105c)
DeltaFile
+38-8sys/fs/nfsserver/nfs_nfsdport.c
+8-5sys/fs/nfsserver/nfs_nfsdserv.c
+3-3sys/fs/nfsserver/nfs_nfsdsubs.c
+5-0sys/fs/nfs/nfs.h
+2-0sys/fs/nfs/nfsdport.h
+1-1sys/fs/nfs/nfs_var.h
+57-176 files

HardenedBSD/src f8c12e6usr.bin/diff diffreg.c

diff: Report I/O errors in Stone algorithm

In the legacy Stone algorithm, we do a first pass over the files to
check if they're identical before we start diffing them.  That code
would correctly set the exit status if an I/O error was encountered,
but would not emit an error message.  Do so.

PR:             292198
MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    thj
Differential Revision:  https://reviews.freebsd.org/D55125
DeltaFile
+7-3usr.bin/diff/diffreg.c
+7-31 files

HardenedBSD/src 68fa174sbin/geom/core geom.8, sys/arm64/arm64 gic_v3_fdt.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+77-0usr.bin/diff/tests/diff_test.sh
+30-27sys/arm64/arm64/gic_v3_fdt.c
+9-36sbin/geom/core/geom.8
+24-11usr.bin/diff/diffreg.c
+16-6sys/dev/bnxt/bnxt_en/bnxt_txrx.c
+10-12usr.bin/diff/pr.c
+166-9228 files not shown
+244-17334 files

HardenedBSD/src 5379c46usr.sbin/bhyve virtio.c

bhyve/virtio: check negotiated_caps for indirect descriptor support

vq_getchain() erroneously checked vc_hv_caps for indirect descriptor
support when it encountered an indirect descriptor. vc_hv_caps is used
in feature negotiation to advertise what features our device emulation
supports, but we should really check what features we have negotiated
with the driver.

Reviewed by: corvink
Differential Revision: https://reviews.freebsd.org/D53465
DeltaFile
+1-1usr.sbin/bhyve/virtio.c
+1-11 files

HardenedBSD/src b773da1. MAINTAINERS, .github CODEOWNERS

MAINTAINERS, CODEOWNERS: Update capsicum-test

Fixes: 670b568ec1c3 ("capsicum-test: Move out of contrib")
Sponsored by: The FreeBSD Foundation
DeltaFile
+1-1.github/CODEOWNERS
+1-1MAINTAINERS
+2-22 files