FreeBSD/src 2fbb6e2tests/sys/file closefrom_test.c Makefile

closefrom_test: Convert to atf-c(3)

Reviewed by:    ngie, markj
Differential Revision:  https://reviews.freebsd.org/D52800
DeltaFile
+229-249tests/sys/file/closefrom_test.c
+1-1tests/sys/file/Makefile
+230-2502 files

FreeBSD/src a93e1b7crypto/heimdal/kdc mit_dump.c, crypto/heimdal/lib/hdb hdb-mitdb.c print.c

heimdal-kadmin: Add support for the -f dump option

The "-f" dump option allows a dump of the Heimdal
KDC in a format that the MIT kdb5_util command can
load into a MIT KDC's database.
This makes transitioning from the Heimdal KDC to
the current MIT one feasible without having to
re-create the KDC database from scratch.

glebius@ did the initial work, cherry picking these
commits from the Heimdal sources on github and then doing
extensive merge conflict resolution and other fixes so
that it would build.
Heimdal commit fca5399 authored by Nico Williams:
Initial commit for second approach for multiple kvno.  NOT TESTED!

Heimdal commit 57f1545 authored by Nico Williams:
Add support for writing to KDB and dumping HDB to MIT KDB dump format
    Before this change Heimdal could read KDBs.  Now it can write to

    [73 lines not shown]
DeltaFile
+431-46crypto/heimdal/lib/hdb/hdb-mitdb.c
+369-38crypto/heimdal/lib/hdb/print.c
+87-294crypto/heimdal/kdc/mit_dump.c
+190-21crypto/heimdal/lib/hdb/mkey.c
+68-1crypto/heimdal/lib/hdb/keys.c
+49-19crypto/heimdal/lib/hdb/common.c
+1,194-41915 files not shown
+1,371-46821 files

FreeBSD/src d5d47e1sys/tools kernel-gdb.py, sys/tools/gdb README.txt

gdb: Make development a bit easier

Provide a command which can be used to reload gdb modules.

MFC after:      1 week
DeltaFile
+32-4sys/tools/kernel-gdb.py
+5-0sys/tools/gdb/README.txt
+37-42 files

FreeBSD/src ef7b813sys/tools/gdb acttrace.py pcpu.py

gdb: Improve doc strings

These are printed by gdb when requesting help for the corresponding
function or command, so phrase them such that they make sense in that
context.

MFC after:      1 week
DeltaFile
+2-4sys/tools/gdb/acttrace.py
+1-1sys/tools/gdb/pcpu.py
+1-1sys/tools/gdb/vnet.py
+4-63 files

FreeBSD/src 5007173sys/net if_var.h

net: Remove useless field annotations

MFC after:      1 week
DeltaFile
+4-4sys/net/if_var.h
+4-41 files

FreeBSD/src ff08916sys/net/altq altq_cbq.c altq_fairq.c

altq: Clear stats structures in get_class_stats()

These structures are copied out to userspace, and it's possible to leak
uninitialized stack bytes since these routines and their callers weren't
careful to clear them first.  Add memsets to avoid this.

Reported by:    Ilja Van Sprundel <ivansprundel at ioactive.com>
Reviewed by:    kp, emaste
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D53342
DeltaFile
+2-0sys/net/altq/altq_cbq.c
+2-0sys/net/altq/altq_fairq.c
+2-0sys/net/altq/altq_priq.c
+6-03 files

FreeBSD/src 32919a3sys/net if.c

net: Validate interface group names in ioctl handlers

The handlers were not checking that the group names are nul-terminated.
Add checks for this.

Reported by:    Ilja Van Sprundel <ivansprundel at ioactive.com>
Reviewed by:    zlei
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D53344
DeltaFile
+26-8sys/net/if.c
+26-81 files

FreeBSD/src 0e2e0fbsbin/ipfw ipfw2.c

ipfw: Remove more unused IP_FW_* cases

All of the do_cmd() calls are in dummynet.c and specify the socket
option at compile time; none of these removed cases are used in ipfw
after the v3 work.

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53378
DeltaFile
+1-5sbin/ipfw/ipfw2.c
+1-51 files

FreeBSD/src 79e3742libexec/rc/rc.d blacklistd blocklistd

blocklist: Fix rcorder(8)

The blocklist daemon depends on a packet filter in order to block.

Add all supported packet filters to the REQUIRE line, not just pf, to
indicate rcorder(8) that it should start after the packet filter service
has started.

While here, change the mode of the rc file to include the executable
bit, just like the rest of the files in the rc.d source directory.

Reviewed by:    0mp
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D53364
DeltaFile
+1-1libexec/rc/rc.d/blacklistd
+1-1libexec/rc/rc.d/blocklistd
+2-22 files

FreeBSD/src b502a45contrib/blocklist/bin blacklistd.c

blocklist: blacklist: Chase recent upstream changes

Upstream introduced a fix that avoids blocklistd(8) from running into an
endless loop when it tries to delete an address from the database which
has been added multiple times.

Apply the same fix to blacklistd(8).

Upstream PR:    https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=57193
MFC after:      2 days
DeltaFile
+4-4contrib/blocklist/bin/blacklistd.c
+4-41 files

FreeBSD/src 2c82cddsys/fs/nfsclient nfs_clrpcops.c

nfs_clrpcops.c: Check for too large a write reply

The "rlen" reply length for a Write operation/RPC
could cause trouble if a broken server replies with
too large a value.

Improve the sanity check for "rlen" to avoid this.

Reported by:    Ilja Van Sprundel <ivansprundel at ioactive.com>
Reviewed by:    emaste, markj
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D53368
DeltaFile
+2-2sys/fs/nfsclient/nfs_clrpcops.c
+2-21 files

FreeBSD/src b9e6206sys/fs/nfsclient nfs_clrpcops.c

nfs_clrpcops.c: Fix two possible large NFSM_DISSECT()s

There are two cases in nfs_clrpcops.c where it was possible
for the code to attempt to NFSM_DISSECT() a large size,
which is not allowed by nfsm_dissct().

This patch fixes them.

Reducing the maximum stripecnt should be no problem,
since there in no extant NFSv4.n server that does striped
File Layout pNFS and current development is centered
around the Flex File layout.

Reported by:    Ilja Van Sprundel <ivansprundel at ioactive.com>
Reviewed by:    markj
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D53367
DeltaFile
+6-5sys/fs/nfsclient/nfs_clrpcops.c
+6-51 files

FreeBSD/src 3053b2asys/fs/nfsclient nfs_clrpcops.c

nfs_clrpcops.c: Add sanity checks for the slot cnts

The reply to CreateSession includes the slot cnt for
both fore and back slots. It should never be larger
than the argument specified and the fore slot cnt
should always be at least 1.

Without this patch, the replied slot cnts were not
being sanity checked.

While here, replace 64 with NFSV4_SLOTS (which is 64).

Reported by:    Ilja Van Sprundel <ivansprundel at ioactive.com>
Reviewed by:    emaste, markj
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D53363
DeltaFile
+8-1sys/fs/nfsclient/nfs_clrpcops.c
+8-11 files

FreeBSD/src 82b6cd5lib/libc/sys getrlimitusage.2

getrlimitusage.2: Update HISTORY section

Add 14.2, as this was cherry-picked prior to release.

Reported by:    Harald Eilertsen
Reviewed by:    kib
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53320

(cherry picked from commit 2387a51af235e4304c63f95465a569c878f49dcd)
(cherry picked from commit 87795ea45407355de4e36388ed6c02ef70b9241a)
DeltaFile
+2-2lib/libc/sys/getrlimitusage.2
+2-21 files

FreeBSD/src 87795ealib/libsys getrlimitusage.2

getrlimitusage.2: Update HISTORY section

Add 14.2, as this was cherry-picked prior to release.

Reported by:    Harald Eilertsen
Reviewed by:    kib
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53320

(cherry picked from commit 2387a51af235e4304c63f95465a569c878f49dcd)
DeltaFile
+2-2lib/libsys/getrlimitusage.2
+2-21 files

FreeBSD/src 3b95780sys/arm/include kexec.h, sys/i386/include kexec.h

kexec: Add dummy headers for arm, i386, powerpc, and riscv

kexec hasn't been ported to these architectures, yet, so appease the
build with dummy headers.

Sponsored by:   Juniper Networks, Inc.
Differential Revision:  https://reviews.freebsd.org/D51625
DeltaFile
+39-0sys/riscv/include/kexec.h
+38-0sys/i386/include/kexec.h
+38-0sys/powerpc/include/kexec.h
+38-0sys/arm/include/kexec.h
+153-04 files

FreeBSD/src 16db4c6sys/amd64/amd64 kexec_support.c kexec_tramp.S, sys/amd64/include kexec.h

amd64: Add kexec support

The biggest difference between this and arm64 kexec is that we can't
disable the MMU for amd64, we have to instead create a new "safe" page
table that the trampoline and "child" kernel can use.  This requires a
lot more work to create identity mappings, etc.

Reviewed by:    kib
Sponsored by:   Juniper Networks, Inc.
Differential Revision:  https://reviews.freebsd.org/D51623
DeltaFile
+300-0sys/amd64/amd64/kexec_support.c
+91-0sys/amd64/amd64/kexec_tramp.S
+41-0sys/amd64/include/kexec.h
+20-0sys/x86/x86/intr_machdep.c
+12-0sys/amd64/amd64/genassym.c
+2-0sys/conf/files.amd64
+466-01 files not shown
+467-07 files

FreeBSD/src 1ae2586sys/arm64/arm64 kexec_support.c mp_machdep.c, sys/arm64/include kexec.h cpufunc.h

kexec: Introduce basic arm64 support

This works on older arm64 platforms, but may not work with arm64 devices
using GICv3, due to a quirk in the GICv3, where some registers are
write-once.

Most of the kexec reboot work on arm64 can be done entirely in C code,
by disabling the MMU, as the kernel is carved out of the vm_phys_segs
array, so cannot be overwritten.

Reviewed by:    andrew
Sponsored by:   Juniper Networks, Inc.
Differential Revision:  https://reviews.freebsd.org/D51621
DeltaFile
+188-0sys/arm64/arm64/kexec_support.c
+78-0sys/arm64/arm64/mp_machdep.c
+44-0sys/arm64/arm64/locore.S
+33-0sys/arm64/include/kexec.h
+13-0sys/dev/psci/psci.c
+7-0sys/arm64/include/cpufunc.h
+363-04 files not shown
+368-110 files

FreeBSD/src efd00c7lib/libsys _libsys.h, sys/compat/freebsd32 freebsd32_syscall.h

sysent: Regen for kexec_load()
DeltaFile
+34-0sys/kern/systrace_args.c
+8-0sys/sys/sysproto.h
+2-1sys/sys/syscall.h
+3-0lib/libsys/_libsys.h
+2-1sys/sys/syscall.mk
+1-1sys/compat/freebsd32/freebsd32_syscall.h
+50-35 files not shown
+56-311 files

FreeBSD/src e02c57fsys/compat/freebsd32 syscalls.conf, sys/kern kern_kexec.c syscalls.master

kern: Introduce kexec system feature (MI)

Introduce a new system call and reboot method to support booting a new
kernel directly from FreeBSD.

Linux has included a system call, kexec_load(), since 2005, which
permits booting a new kernel at reboot instead of requiring a full
reboot cycle through the BIOS/firmware.  This change brings that same
system call to FreeBSD.  Other changesets will add the MD components for
some of our architectures, with stubs for the rest until the MD
components have been written.

kexec_load() supports loading up to an arbitrary limit of 16 memory
segments.  These segments must be contained inside memory bounded in
vm_phys_segs (vm.phys_segs sysctl), and a segment must be contained
within a single vm.phys_segs segment, cannot cross adjacent segments.

Reviewed by:    imp, kib
Sponsored by:   Juniper Networks, Inc.
Differential Revision:  https://reviews.freebsd.org/D51619
DeltaFile
+350-0sys/kern/kern_kexec.c
+81-0sys/sys/kexec.h
+8-0sys/kern/syscalls.master
+2-1sys/compat/freebsd32/syscalls.conf
+3-0sys/sys/syscallsubr.h
+1-0sys/sys/reboot.h
+445-12 files not shown
+447-18 files

FreeBSD/src cb38499sys/x86/x86 msi.c

x86/intr: Handle case of disabling MSI after release

Once an interrupt source is registered it's never deregistered.
However, when an MSI is released the pointer for it becomes NULLed out,
resulting in a NULL pointer dereference when attempting to disable the
now-released MSI source.  Add NULL check to avoid this.

Reviewed by:    kib
Sponsored by:   Juniper Networks, Inc.
Differential Revision:  https://reviews.freebsd.org/D51624
DeltaFile
+8-0sys/x86/x86/msi.c
+8-01 files

FreeBSD/src 190d0a9sys/amd64/amd64 mp_machdep.c apic_vector.S, sys/kern subr_smp.c

amd64: Add cpu_stop() support to go UP after SMP

Reviewed by:    kib
Sponsored by:   Juniper Networks, Inc.
Differential Revision:  https://reviews.freebsd.org/D51622
DeltaFile
+22-0sys/x86/x86/mp_x86.c
+11-4sys/kern/subr_smp.c
+13-0sys/amd64/amd64/mp_machdep.c
+11-0sys/amd64/amd64/apic_vector.S
+2-1sys/x86/include/apicvar.h
+2-0sys/x86/include/x86_smp.h
+61-52 files not shown
+63-58 files

FreeBSD/src 1a679fbsys/fs/nfsserver nfs_nfsdserv.c

nfs_nfsdserv.c: Add a sanity check for layout commit cnt

If a client were to send a LayoutCommit (seldom
used and only for a pNFS server) with a bogus
cnt, there could be problems with a malloc() call
that uses it.

This patch adds a sanity check for the cnt. Note
that RFC8881 does not specify any upper bound
on the cnt.

Reported by:    Ilja Van Sprundel <ivansprundel at ioactive.com>
Reviewed by:    markj
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D53354
DeltaFile
+5-0sys/fs/nfsserver/nfs_nfsdserv.c
+5-01 files

FreeBSD/src 23b46b2sys/security/audit audit_bsm_db.c

audit: convert audit event class lookup to lockless

When system call auditing is enabled, every audited call
does a lookup in the evclass hash table.  This table
appears to be insert only (eg, nothing can be removed)
and protecting it with an rwlock is overkill.  Using
an rwlock causes just the atomic operations to maintain
uncontended rwlock state to be responsible for measurable
overhead on high core count servers making lots of system calls.

Given that the evclass hash table can never have items removed,
only added, using a mutex to serialize additions and converting
to ck_list allows sufficient protection for lockless lookups.

In a contrived example of 64 cores, all reading 1 byte from their
own file, this change increases performance from 5M reads/sec
to 70M reads/sec on an AMD 7502P.

Reviewed by: markj, mjg, glebius (privately)

    [2 lines not shown]
DeltaFile
+15-13sys/security/audit/audit_bsm_db.c
+15-131 files

FreeBSD/src 09b48f8sys/dev/ice ice_drv_info.h

ice(4): Add support for E835-XXV-4 adapter

Add subdevice ID and branding string for E835-XXV-4
adapter.

Signed-off-by: Krzysztof Galazka <krzysztof.galazka at intel.com>

Approved by:    kbowling (mentor), erj (mentor)
Sponsored by:   Intel Corporation
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D53319
DeltaFile
+3-0sys/dev/ice/ice_drv_info.h
+3-01 files

FreeBSD/src 07889c6etc/mtree BSD.include.dist

mtree: Remove stray wi directory

Reviewed by:    imp, emaste
Fixes:  a21def4d568f ("pccard: Remove wi(4) driver")
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D53264

(cherry picked from commit f942a7465469008f7538436a70f15a44cabecbb0)
DeltaFile
+0-2etc/mtree/BSD.include.dist
+0-21 files

FreeBSD/src f9020f1etc/mtree BSD.include.dist

mtree: Remove stray an (Aironet) directory

Reviewed by:    imp
Fixes:  663b174b5b53 ("an: Remove driver")
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D53265

(cherry picked from commit f7ccf051016fe3989ef6fbf10adea3ce4131f91b)
DeltaFile
+0-2etc/mtree/BSD.include.dist
+0-21 files

FreeBSD/src c244342etc/mtree BSD.include.dist

mtree: Remove stray atm directory

ATM support for netgraph was removed in af0cc0b22362 ("NgATM: Remove
netgraph ATM support")

Remove the directory from the mtree specification.

Reviewed by:    emaste
Fixes:  21735dfaebdf ("include: Remove no longer existing netgraph/atm")
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D53260

(cherry picked from commit 8e8ee8bbe2a112f7d1cc1b005dbdb8868522b640)
DeltaFile
+0-2etc/mtree/BSD.include.dist
+0-21 files

FreeBSD/src c75fa84usr.sbin/bsdinstall/scripts jail

bsdinstall: jail: Fix DISTMENU items

The menu was incorrectly using the fourth column (distname) instead of
the first (dist) of the MANIFEST.

The actual file name is on the first column of the MANIFEST file.
Remove the .txz part of the name to build the menu options.

Reviewed by:    jamie
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D53177

(cherry picked from commit 74921426d552f7491c61684465f964b446379dac)
DeltaFile
+1-1usr.sbin/bsdinstall/scripts/jail
+1-11 files

FreeBSD/src 3281756etc/mtree BSD.include.dist

mtree: Remove stray an (Aironet) directory

Reviewed by:    imp
Fixes:  663b174b5b53 ("an: Remove driver")
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D53265

(cherry picked from commit f7ccf051016fe3989ef6fbf10adea3ce4131f91b)
DeltaFile
+0-2etc/mtree/BSD.include.dist
+0-21 files