HardenedBSD/src cd24079sys/dev/e1000 em_txrx.c, sys/dev/ixgbe ixgbe_phy.c if_ix.c

Merge branch 'freebsd/14-stable/main' into hardened/14-stable/master
DeltaFile
+19-4sys/dev/ixgbe/ixgbe_phy.c
+4-1sys/dev/ixgbe/if_ix.c
+3-1sys/dev/ixgbe/ixgbe_82599.c
+1-2sys/dev/e1000/em_txrx.c
+2-0sys/dev/ixgbe/ixgbe_phy.h
+2-0sys/dev/ixgbe/ixgbe_type.h
+31-82 files not shown
+31-108 files

HardenedBSD/src ecbef36sys/dev/e1000 em_txrx.c e1000_defines.h

e1000: Fix vlan PCP/DEI on lem(4)

The vlan PCP and CFI/DEI were discarded when receiving vlan tagged
packets on lem(4) interfaces with vlanhwtag.

According to the 82540 SDM[1] (pg. 24), vlan tag is in the standard
format, so there's no reason to discard PCP/DEI.

[1]: http://iommu.com/datasheets/ethernet/controllers-nics/intel/e1000/pci-pci-x-family-gbe-controllers-software-dev-manual.pdf

Sponsored by:   Stormshield (author)
Differential Revision:  https://reviews.freebsd.org/D48987

(cherry picked from commit 4b29599fbbe33b75b7b58cfc5deea7a881e9a10e)
DeltaFile
+1-2sys/dev/e1000/em_txrx.c
+0-1sys/dev/e1000/e1000_defines.h
+1-32 files

HardenedBSD/src fcdbc83sys/net pfvar.h, sys/netpfil/pf pf.c pf_ioctl.c

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+118-98sys/netpfil/pf/pf.c
+151-4tests/sys/netpfil/pf/src_track.sh
+26-14sys/netpfil/pf/pf_ioctl.c
+20-15sys/netpfil/pf/pf_lb.c
+23-7sys/net/pfvar.h
+22-3sys/netpfil/pf/pf_nl.c
+360-14113 files not shown
+411-16619 files

HardenedBSD/src 5fe998asys/net pfvar.h, sys/netpfil/pf pf.c pf_ioctl.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+118-98sys/netpfil/pf/pf.c
+151-4tests/sys/netpfil/pf/src_track.sh
+26-14sys/netpfil/pf/pf_ioctl.c
+20-15sys/netpfil/pf/pf_lb.c
+23-7sys/net/pfvar.h
+22-3sys/netpfil/pf/pf_nl.c
+360-14113 files not shown
+411-16619 files

HardenedBSD/src 4b29599sys/dev/e1000 em_txrx.c e1000_defines.h

e1000: Fix vlan PCP/DEI on lem(4)

The vlan PCP and CFI/DEI were discarded when receiving vlan tagged
packets on lem(4) interfaces with vlanhwtag.

According to the 82540 SDM[1] (pg. 24), vlan tag is in the standard
format, so there's no reason to discard PCP/DEI.

[1]: http://iommu.com/datasheets/ethernet/controllers-nics/intel/e1000/pci-pci-x-family-gbe-controllers-software-dev-manual.pdf

MFC after:      3 days
Sponsored by:   Stormshield (author)
Differential Revision:  https://reviews.freebsd.org/D48987
DeltaFile
+1-2sys/dev/e1000/em_txrx.c
+0-1sys/dev/e1000/e1000_defines.h
+1-32 files

HardenedBSD/src 4cc875asys/dev/e1000 if_em.c, sys/dev/igc if_igc.c

Merge branch 'freebsd/14-stable/main' into hardened/14-stable/master
DeltaFile
+620-426sys/dev/e1000/if_em.c
+469-345sys/dev/ixgbe/if_ix.c
+247-204sys/dev/igc/if_igc.c
+137-117sys/dev/ixgbe/if_ixv.c
+56-54sys/dev/ixgbe/if_bypass.c
+57-49sys/dev/ixgbe/ix_txrx.c
+1,586-1,1956 files not shown
+1,719-1,29712 files

HardenedBSD/src e9d4e70sys/dev/e1000 em_txrx.c igb_txrx.c

e1000: Style txrx

Fix up indentation and reflow long lines.

Sponsored by:   BBOX.io

(cherry picked from commit 7390daf87c53073da5e74b2d73ac7320c1a44475)
DeltaFile
+34-21sys/dev/e1000/em_txrx.c
+26-18sys/dev/e1000/igb_txrx.c
+2-1sys/dev/e1000/if_em.c
+62-403 files

HardenedBSD/src 83cd135sys/contrib/openzfs/include/sys brt_impl.h, sys/contrib/openzfs/module/zfs brt.c zap_leaf.c

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+474-664sys/contrib/openzfs/module/zfs/brt.c
+469-345sys/dev/ixgbe/if_ix.c
+137-117sys/dev/ixgbe/if_ixv.c
+56-54sys/dev/ixgbe/if_bypass.c
+50-58sys/contrib/openzfs/include/sys/brt_impl.h
+63-45sys/contrib/openzfs/module/zfs/zap_leaf.c
+1,249-1,28343 files not shown
+1,818-1,58349 files

HardenedBSD/src b549354sys/contrib/openzfs/include/sys brt_impl.h, sys/contrib/openzfs/module/zfs brt.c zap_leaf.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+474-664sys/contrib/openzfs/module/zfs/brt.c
+469-345sys/dev/ixgbe/if_ix.c
+137-117sys/dev/ixgbe/if_ixv.c
+56-54sys/dev/ixgbe/if_bypass.c
+63-45sys/contrib/openzfs/module/zfs/zap_leaf.c
+50-58sys/contrib/openzfs/include/sys/brt_impl.h
+1,249-1,28343 files not shown
+1,818-1,58349 files

HardenedBSD/src 7390dafsys/dev/e1000 em_txrx.c igb_txrx.c

e1000: Style txrx

Fix up indentation and reflow long lines.

MFC after:      3 days
Sponsored by:   BBOX.io
DeltaFile
+34-21sys/dev/e1000/em_txrx.c
+26-18sys/dev/e1000/igb_txrx.c
+2-1sys/dev/e1000/if_em.c
+62-403 files

HardenedBSD/src 23f1a18sys/arm64/arm64 vfp.c identcpu.c, sys/arm64/include armreg.h

Merge branch 'freebsd/14-stable/main' into hardened/14-stable/master
DeltaFile
+579-504sys/dev/igc/if_igc.c
+758-29sys/arm64/arm64/vfp.c
+250-0sys/arm64/include/armreg.h
+135-0sys/dev/random/armv8rng.c
+83-15sys/arm64/arm64/identcpu.c
+88-2sys/arm64/arm64/exec_machdep.c
+1,893-55031 files not shown
+2,181-72137 files

HardenedBSD/src 18b907asys/dev/e1000 em_txrx.c igb_txrx.c, sys/dev/igc if_igc.c igc_txrx.c

Merge branch 'freebsd/13-stable/main' into hardened/13-stable/master
DeltaFile
+579-504sys/dev/igc/if_igc.c
+35-34usr.sbin/freebsd-update/freebsd-update.8
+33-35sys/dev/igc/igc_txrx.c
+16-19sys/dev/e1000/em_txrx.c
+14-16sys/dev/e1000/igb_txrx.c
+14-14sys/dev/igc/if_igc.h
+691-6222 files not shown
+692-6298 files

HardenedBSD/src 2b45f8esys/dev/e1000 em_txrx.c igb_txrx.c

e1000: txrx function prototype cleanup

Drop variable names of function prototypes since the file is mixed in
listing them or not and they fall out of sync.

Sponsored by:   BBOX.io

(cherry picked from commit 9dc452b983f042aa9d2a2562517d44c1928ff42a)
DeltaFile
+16-19sys/dev/e1000/em_txrx.c
+14-16sys/dev/e1000/igb_txrx.c
+30-352 files

HardenedBSD/src 10ad90dsys/dev/e1000 em_txrx.c igb_txrx.c

e1000: txrx function prototype cleanup

Drop variable names of function prototypes since the file is mixed in
listing them or not and they fall out of sync.

Sponsored by:   BBOX.io

(cherry picked from commit 9dc452b983f042aa9d2a2562517d44c1928ff42a)
DeltaFile
+16-19sys/dev/e1000/em_txrx.c
+14-16sys/dev/e1000/igb_txrx.c
+30-352 files

HardenedBSD/src f2feefesys/conf newvers.sh, sys/dev/e1000 if_em.c if_em.h

Merge branch 'freebsd/14-stable/main' into hardened/14-stable/master
DeltaFile
+264-5sys/dev/e1000/if_em.c
+21-7sys/dev/e1000/if_em.h
+10-0sys/dev/e1000/em_txrx.c
+2-2sys/conf/newvers.sh
+4-0sys/dev/e1000/igb_txrx.c
+1-1usr.bin/yacc/config.h
+302-156 files

HardenedBSD/src d89eb56sys/dev/e1000 if_em.c if_em.h

Merge branch 'freebsd/13-stable/main' into hardened/13-stable/master
DeltaFile
+264-5sys/dev/e1000/if_em.c
+21-7sys/dev/e1000/if_em.h
+10-0sys/dev/e1000/em_txrx.c
+4-0sys/dev/e1000/igb_txrx.c
+299-124 files

HardenedBSD/src a527aa7sys/dev/e1000 if_em.c if_em.h

e1000: Re-add AIM

We originally left this out because iflib modulates interrupts and
accomplishes some level of batching versus the custom queues in the
older driver. Upon more detailed study of the Linux driver which has a
newer implementation, it finally became clear to me this is actually a
holdoff timer and not an interrupt limit as it is conventionally
(statically) programmed and displayed as an interrupt rate. The data
sheets also make this somewhat clear.

Thus, AIM accomplishes two beneficial things for a wide variety of
workloads[1]:

1. At low throughput/packet rates, it will significantly lower latency
(by counter-intuitively "increasing" the interrupt rate.. better
thought of as decreasing the holdoff timer because you will modulate
down before coming anywhere near these interrupt rates).
2. At bulk data rates, it is tuned to achieve a lower interrupt rate
(by increasing the holdoff timer) than the current static 8000/s. This

    [23 lines not shown]
DeltaFile
+264-5sys/dev/e1000/if_em.c
+21-7sys/dev/e1000/if_em.h
+10-0sys/dev/e1000/em_txrx.c
+4-0sys/dev/e1000/igb_txrx.c
+299-124 files

HardenedBSD/src 49f12d5sys/dev/e1000 if_em.c if_em.h

e1000: Re-add AIM

We originally left this out because iflib modulates interrupts and
accomplishes some level of batching versus the custom queues in the
older driver. Upon more detailed study of the Linux driver which has a
newer implementation, it finally became clear to me this is actually a
holdoff timer and not an interrupt limit as it is conventionally
(statically) programmed and displayed as an interrupt rate. The data
sheets also make this somewhat clear.

Thus, AIM accomplishes two beneficial things for a wide variety of
workloads[1]:

1. At low throughput/packet rates, it will significantly lower latency
(by counter-intuitively "increasing" the interrupt rate.. better
thought of as decreasing the holdoff timer because you will modulate
down before coming anywhere near these interrupt rates).
2. At bulk data rates, it is tuned to achieve a lower interrupt rate
(by increasing the holdoff timer) than the current static 8000/s. This

    [23 lines not shown]
DeltaFile
+264-5sys/dev/e1000/if_em.c
+21-7sys/dev/e1000/if_em.h
+10-0sys/dev/e1000/em_txrx.c
+4-0sys/dev/e1000/igb_txrx.c
+299-124 files

HardenedBSD/src 6c99488sys/compat/linuxkpi/common/include/linux cleanup.h, sys/dev/e1000 em_txrx.c

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+579-504sys/dev/igc/if_igc.c
+33-35sys/dev/igc/igc_txrx.c
+36-18sys/dev/netmap/netmap_mem2.c
+18-32sys/kern/vfs_subr.c
+46-0sys/compat/linuxkpi/common/include/linux/cleanup.h
+16-19sys/dev/e1000/em_txrx.c
+728-608144 files not shown
+1,728-765150 files

HardenedBSD/src e4b7d5csys/compat/linuxkpi/common/include/linux cleanup.h, sys/dev/e1000 em_txrx.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+579-504sys/dev/igc/if_igc.c
+33-35sys/dev/igc/igc_txrx.c
+36-18sys/dev/netmap/netmap_mem2.c
+18-32sys/kern/vfs_subr.c
+46-0sys/compat/linuxkpi/common/include/linux/cleanup.h
+16-19sys/dev/e1000/em_txrx.c
+728-608144 files not shown
+1,728-765150 files

HardenedBSD/src 9dc452bsys/dev/e1000 em_txrx.c igb_txrx.c

e1000: txrx function prototype cleanup

Drop variable names of function prototypes since the file is mixed in
listing them or not and they fall out of sync.

MFC after:      1 week
Sponsored by:   BBOX.io
DeltaFile
+16-19sys/dev/e1000/em_txrx.c
+14-16sys/dev/e1000/igb_txrx.c
+30-352 files

HardenedBSD/src 45eb5f8sys/dev/e1000 if_em.c if_em.h

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+264-5sys/dev/e1000/if_em.c
+21-7sys/dev/e1000/if_em.h
+10-0sys/dev/e1000/em_txrx.c
+4-0sys/dev/e1000/igb_txrx.c
+299-124 files

HardenedBSD/src 5b8366fsys/dev/e1000 if_em.c if_em.h

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+264-5sys/dev/e1000/if_em.c
+21-7sys/dev/e1000/if_em.h
+10-0sys/dev/e1000/em_txrx.c
+4-0sys/dev/e1000/igb_txrx.c
+299-124 files

HardenedBSD/src 3e501efsys/dev/e1000 if_em.c if_em.h

e1000: Re-add AIM

We originally left this out because iflib modulates interrupts and
accomplishes some level of batching versus the custom queues in the
older driver. Upon more detailed study of the Linux driver which has a
newer implementation, it finally became clear to me this is actually a
holdoff timer and not an interrupt limit as it is conventionally
(statically) programmed and displayed as an interrupt rate. The data
sheets also make this somewhat clear.

Thus, AIM accomplishes two beneficial things for a wide variety of
workloads[1]:

1. At low throughput/packet rates, it will significantly lower latency
(by counter-intuitively "increasing" the interrupt rate.. better
thought of as decreasing the holdoff timer because you will modulate
down before coming anywhere near these interrupt rates).
2. At bulk data rates, it is tuned to achieve a lower interrupt rate
(by increasing the holdoff timer) than the current static 8000/s. This

    [22 lines not shown]
DeltaFile
+264-5sys/dev/e1000/if_em.c
+21-7sys/dev/e1000/if_em.h
+10-0sys/dev/e1000/em_txrx.c
+4-0sys/dev/e1000/igb_txrx.c
+299-124 files

HardenedBSD/src cb0c532contrib/less screen.c, sys/kern vfs_subr.c

Merge remote-tracking branch 'internal/freebsd/13-stable/main' into hardened/13-stable/master

Conflicts:
        bin/cat/cat.c
        lib/libc/gen/auxv.3
        libexec/rc/rc.d/archdep
        share/man/man5/src.conf.5
        sys/amd64/amd64/elf_machdep.c
        sys/amd64/cloudabi64/cloudabi64_sysvec.c
        sys/amd64/linux/linux_sysvec.c
        sys/amd64/linux32/linux32_sysvec.c
        sys/arm/arm/elf_machdep.c
        sys/arm64/linux/linux_sysvec.c
        sys/compat/ia32/ia32_sysvec.c
        sys/i386/cloudabi32/cloudabi32_sysvec.c
        sys/i386/linux/imgact_linux.c
        sys/i386/linux/linux_sysvec.c
        sys/kern/imgact_aout.c
        sys/kern/kern_module.c

    [22 lines not shown]
DeltaFile
+175-44sys/vm/vm_map.c
+97-38sys/kern/vfs_subr.c
+64-0tests/sys/vm/stack/stack_dlopen_exec_test.c
+57-0tests/sys/vm/stack/stack_mprotect_exec_test.c
+42-11contrib/less/screen.c
+51-0tests/sys/vm/mmap_map_32bit_helper.c
+486-9331,889 files not shown
+1,170-49,85331,895 files

HardenedBSD/src 4fbf14esys/amd64/include elf.h endian.h

sys: Remove $FreeBSD$: one-line .c comment pattern

Remove /^/[*/]\s*\$FreeBSD\$.*\n/

Similar commit in current:
(cherry picked from commit 71625ec9ad2a)
DeltaFile
+0-1sys/amd64/include/elf.h
+0-1sys/amd64/include/endian.h
+0-1sys/amd64/include/fdt.h
+0-1sys/amd64/include/float.h
+0-1sys/amd64/include/iommu.h
+0-1sys/amd64/include/metadata.h
+0-61,044 files not shown
+0-1,0501,050 files

HardenedBSD/src 897b7d3sys/dev/e1000 if_em.c em_txrx.c, sys/kern kern_osd.c

Merge branch 'freebsd/13-stable/main' into hardened/13-stable/master
DeltaFile
+40-29sys/dev/e1000/if_em.c
+3-0sys/kern/kern_osd.c
+1-1sys/net/if_vlan.c
+1-1sys/dev/e1000/em_txrx.c
+45-314 files

HardenedBSD/src 3bbf655sys/dev/e1000 em_txrx.c

e1000: Fix off by one ipcse

This has been off by one in the FreeBSD drivers as far back as I've
looked.  Emperically HW and SW emulations I have available don't seem to
mind.  Noticed while debugging other issues.

(cherry picked from commit eac761e967b34066aa7183474249df87d79a2f32)
DeltaFile
+1-1sys/dev/e1000/em_txrx.c
+1-11 files

HardenedBSD/src acf3d6esys/arm64/arm64 pl031_rtc.c, sys/compat/linux linux_socket.c

Merge remote-tracking branch 'internal/hardened/current/master' into hardened/current/cross-dso-cfi

Conflicts:
        tools/build/options/WITH_OFED_EXTRA (deleted)
        usr.sbin/rpc.yppasswdd/Makefile (unresolved)
DeltaFile
+697-0sys/dev/virtio/gpu/virtio_gpu.c
+454-0sys/dev/virtio/gpu/virtio_gpu.h
+153-0sys/arm64/arm64/pl031_rtc.c
+80-52sys/compat/linux/linux_socket.c
+107-0tools/build/freebsd-yeet.pl
+87-11sys/dev/ixl/ixl_pf_main.c
+1,578-6331,042 files not shown
+2,188-48,40531,048 files

HardenedBSD/src 2226d61sys/arm64/arm64 pl031_rtc.c, sys/compat/linux linux_socket.c

Merge remote-tracking branch 'internal/freebsd/current/main' into hardened/current/master

Conflicts:
        bin/cat/cat.c (unresolved)
        lib/csu/aarch64/crt1_c.c (unresolved)
        lib/csu/amd64/crt1_c.c (unresolved)
        lib/csu/i386/crt1_c.c (unresolved)
        lib/csu/powerpc64/crt1_c.c (unresolved)
        lib/csu/powerpc64/reloc.c (unresolved)
        lib/csu/riscv/crt1_c.c (unresolved)
        lib/libc/gen/auxv.3 (unresolved)
        lib/libcasper/services/cap_net/cap_net.3 (unresolved)
        sys/amd64/amd64/elf_machdep.c (unresolved)
        sys/amd64/include/sgxreg.h (deleted)
        sys/amd64/linux/linux_sysvec.c (unresolved)
        sys/amd64/linux32/linux32_sysvec.c (unresolved)
        sys/amd64/sgx/sgx.c (deleted)
        sys/amd64/sgx/sgx_linux.c (deleted)
        sys/amd64/sgx/sgxvar.h (deleted)

    [29 lines not shown]
DeltaFile
+697-0sys/dev/virtio/gpu/virtio_gpu.c
+454-0sys/dev/virtio/gpu/virtio_gpu.h
+153-0sys/arm64/arm64/pl031_rtc.c
+80-52sys/compat/linux/linux_socket.c
+107-0tools/build/freebsd-yeet.pl
+87-11sys/dev/ixl/ixl_pf_main.c
+1,578-6331,044 files not shown
+2,304-48,37531,050 files