FreeBSD/src 685e60eusr.sbin/ngctl main.c

ngctl: Fix build without JAIL

Reported by:    Michael Dexter
Fixes:          72d01e62b082 netgraph: teach ngctl to attach and run itself in a jail
MFC after:      1 day
DeltaFile
+4-0usr.sbin/ngctl/main.c
+4-01 files

FreeBSD/src 90593b1share/man/man8 nanobsd.8, tools/tools/nanobsd nanobsd.sh

nanobsd: Expose do_image_prep on command line

do_image_prep will skip the customizations and other image prep that's
the same each time. It was just set before for -I. Expose it now with -p
which doesn't have the other side effects. Also, fix a bug where early
customization was run in this case. We don't want that run multiple
times when building an image from an existing tree or when skipping
image prep (there's no reason to make it a separate hook). Also change
example small media from Compact Flash to SD Card (though maybe it
should be microSD card, eMMC or similar, but that's getting too
verbose).

Sponsored by:           Netflix
DeltaFile
+10-2tools/tools/nanobsd/nanobsd.sh
+7-3share/man/man8/nanobsd.8
+17-52 files

FreeBSD/src 0833a3ftools/tools/nanobsd nanobsd.sh

nanobsd: Alphebetize -I

Put -I in its proper place alphabetically

Sponsored by:           Netflix
DeltaFile
+9-9tools/tools/nanobsd/nanobsd.sh
+9-91 files

FreeBSD/src f113980usr.sbin/cpucontrol cpucontrol.h

cpucontrol: fix -DDEBUG build
DeltaFile
+1-0usr.sbin/cpucontrol/cpucontrol.h
+1-01 files

FreeBSD/src 0adec3dusr.sbin/freebsd-update freebsd-update.sh

freebsd-update: sort options alphabetically

This helps future developers when adding additional options handlers in the
surrounding blocks.

This is effectively a no-op.

MFC after:      1 month
DeltaFile
+4-4usr.sbin/freebsd-update/freebsd-update.sh
+4-41 files

FreeBSD/src cc6e21crelease/tools oracle.conf

release: Remove a duplicate package listing in oracle.conf

sysutils/panicmail is specified again several lines down.

MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
Sponsored by:   Klara, Inc.
DeltaFile
+0-1release/tools/oracle.conf
+0-11 files

FreeBSD/src d8d5324lib/libjail jail.c, sys/kern kern_jail.c kern_jaildesc.c

jaildesc: fix typo and style(9) violations.

Reported by:    kib
MFC after:      3 days
DeltaFile
+18-18sys/kern/kern_jail.c
+13-13sys/kern/kern_jaildesc.c
+8-8lib/libjail/jail.c
+39-393 files

FreeBSD/src 9a69781share/man/man4 syncache.4

syncache.4: add missing information

Add the description for one sysctl-variable and three counters provided
by netstat.

Reviewed by:            gbe, rscheff
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D52226

(cherry picked from commit bed2299823b8173fd791c0bbacc75ac224cecc0a)
DeltaFile
+27-2share/man/man4/syncache.4
+27-21 files

FreeBSD/src 31c467dsys/netinet tcp_syncache.c

tcp: improve sending of SYN-cookies

Ensure that when the sysctl-variable net.inet.tcp.syncookies_only is
non zero, SYN-cookies are sent and no SYN-cache entry is added to the
SYN-cache. In particular, this behavior should not depend on the value
of the sysctl-variable net.inet.tcp.syncookies, which controls whether
SYN cookies are used in combination with the SYN-cache to deal with
bucket overflows.
Also ensure that tcps_sc_completed does not include TCP connections
established via a SYN-cookie.
While there, make V_tcp_syncookies and V_tcp_syncookiesonly bool
instead of int, since they are used as boolean variables.

Reviewed by:            rscheff, cc, Peter Lei, Nick Banks
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D52225

(cherry picked from commit 7b57f2513361fb98fd5e2262f130989fe65946c6)
DeltaFile
+46-39sys/netinet/tcp_syncache.c
+46-391 files

FreeBSD/src 16f600dlib/libsys jail.2, sys/kern kern_jaildesc.c

jaildesc: replace EBADF with EINVAL

Following fd9e09cb, EBADF is not the suitable error code for a non-
jail descriptor passed to jail_set, jail_get, jail_attach_fd, and
jail_remove_fd.

Reported by:    kib
DeltaFile
+6-20lib/libsys/jail.2
+1-1sys/kern/kern_jaildesc.c
+7-212 files

FreeBSD/src 1b72d27sys/netinet tcp_syncache.c

tcp: unlock before syncookie_expand()

The function doesn't need a lock on sch.  It uses the pointer as value for
the SipHash calculation.

Reviewed by:            tuexen
Differential Revision:  https://reviews.freebsd.org/D50898

(cherry picked from commit 0809d26de24defdc4a2ae161357566c02dc163d1)
DeltaFile
+3-4sys/netinet/tcp_syncache.c
+3-41 files

FreeBSD/src ea5560fsys/netinet tcp_syncache.c

tcp: increase tcps_sc_recvcookie only in the syncache_expand()

The syncookie_expand() is called from syncookie_cmp() in INVARIANTS mode
to confirm that values calculated via syncookies mechanism match those
stored in the syncache entry.  This creates a counting bug, that with
INVARIANTS every successful use of syncache also counts as use of a
syncookie.

Reviewed by:            tuexen
Differential Revision:  https://reviews.freebsd.org/D50897

(cherry picked from commit 3ed8d5645dd42a7c080ba800cf6d25cb7e147d7e)
DeltaFile
+3-2sys/netinet/tcp_syncache.c
+3-21 files

FreeBSD/src f5d8084sys/netinet tcp_syncache.c

tcp: refactor debug function syncookie_cmp()

- Don't bzero() the test structure.  All fields checked are set by
  syncache_expand().
- Don't allocate TCP address logging string if there is nothing to report.
- Mark hash bucket argument as pointer to const.
- Make it void.

Differential Revision:  https://reviews.freebsd.org/D50896

(cherry picked from commit e9e6a025b4523c9aa2885e892495601964e03056)
DeltaFile
+22-21sys/netinet/tcp_syncache.c
+22-211 files

FreeBSD/src d6849a3sys/netinet tcp_syncache.c

tcp: rename syncookie_lookup() into syncookie_expand() and make it bool

This function always returns the same pointer it was passed.  With new
name and return type the code is easier to understand.  Mark the hash
bucket argument as pointer to const, since function doesn't modify it,
just uses value as integer.  No functional changes.

Reviewed by:            tuexen
Differential Revision:  https://reviews.freebsd.org/D50895

(cherry picked from commit 6538742c1aaca3ce522ccea95007dfa9686c78dd)
DeltaFile
+13-11sys/netinet/tcp_syncache.c
+13-111 files

FreeBSD/src 46347b3sys/dev/ixgbe if_ix.c

ixgbe: Fix incomplete speed coverage in link status logging

Originally ixgbe_if_update_admin_status() only handled 1G and 10G speeds,
causing any other speeds to display as "1 Gbps" in link status logs.

This issue is fixed by adding link speed to string conversion logic through
the introduction of a helper function, ixgbe_link_speed_to_str(), which
corrects the misleading logs to reflect accurate link speeds.

Signed-off-by: Yogesh Bhosale yogesh.bhosale at intel.com

PR:             288960
Reported by:    Mike Belanger - QNX
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D52442
DeltaFile
+31-3sys/dev/ixgbe/if_ix.c
+31-31 files

FreeBSD/src 101a35estand/efi/boot1 boot1.c, stand/efi/loader efi_main.c

efi: translate errno to EFI status on exit

Translate the given errno to an efi status instead of always exiting
with EFI_LOAD_ERROR.
DeltaFile
+2-2stand/efi/boot1/boot1.c
+1-1stand/efi/loader/efi_main.c
+3-32 files

FreeBSD/src 1814196stand/efi/loader main.c

loader/efi: remove is_last parameter from find_currdev

It is unused.

Reviewed by:    tsoome
Differential Revision:  https://reviews.freebsd.org/D52434
DeltaFile
+3-6stand/efi/loader/main.c
+3-61 files

FreeBSD/src b4c5d58stand/efi/loader main.c

loader/efi: plug memory leak

Reviewed by:    tsoome
Differential Revision:  https://reviews.freebsd.org/D52433
DeltaFile
+2-0stand/efi/loader/main.c
+2-01 files

FreeBSD/src cd9b43estand/efi/loader framebuffer.c

loader/efi: return error from efi_find_framebuffer

Also return actual errno values in other code paths.
(suggested by tsoome)

Reviewed by:    tsoome, imp
Differential Revision:  https://reviews.freebsd.org/D52432
DeltaFile
+5-2stand/efi/loader/framebuffer.c
+5-21 files

FreeBSD/src 7d48a56stand/common gfx_fb.c, stand/efi/loader main.c bootinfo.c

stand: remove unused variables
DeltaFile
+2-5stand/efi/loader/main.c
+1-2stand/efi/loader/bootinfo.c
+0-2stand/efi/loader/arch/amd64/multiboot2.c
+1-1stand/efi/loader/copy.c
+0-1stand/common/gfx_fb.c
+0-1stand/efi/loader/arch/amd64/trap.c
+4-126 files

FreeBSD/src d81b84dstand/efi/loader Makefile

loader/efi: build with -Wall

Reviewed by:    tsoome
Differential Revision:  https://reviews.freebsd.org/D52431
DeltaFile
+1-0stand/efi/loader/Makefile
+1-01 files

FreeBSD/src 9bfbc68usr.bin/sockstat main.c

sockstat: fix the -j option with piped output after libxo integration

The legacy code handling -j in display() was causing xo_finish() to be
skipped.  It has also been causing a memory leak since 0726c6574f8
(sockstat: Add automatic column sizing and remove -w option)

Fixes:          7b35b4d1963 (sockstat: add libxo support)
MFC after:      1 week
Reported by:    glebius
Reviewed by:    glebius
Sponsored by:   ConnectWise
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1842
DeltaFile
+2-1usr.bin/sockstat/main.c
+2-11 files

FreeBSD/src faf7e99sys/kern kern_proc.c

'kern.proc.groups' sysctl knob: Restore outputting the effective GID

In particular, fixes 'procstat -s' on a live system (for processes with
more than 16 groups).

Reviewed by:    kib, emaste
Fixes:          be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]")
MFC after:      9 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52261
DeltaFile
+5-2sys/kern/kern_proc.c
+5-21 files

FreeBSD/src 7676df2lib/libkvm kvm_proc.c

kvm_proclist(): Restore outputting the effective GID

In particular, fixes 'procstat -s -M' (only if there are less than 16
groups).

Reviewed by:    kib, emaste
Fixes:          be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]")
MFC after:      9 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52260
DeltaFile
+5-4lib/libkvm/kvm_proc.c
+5-41 files

FreeBSD/src 63a40casys/kern kern_proc.c

kinfo_proc: Restore outputting the effective GID

In particular, fixes 'procstat -s' on a live system or a core file (only
if there are less than 16 groups).

Reviewed by:    kib
Fixes:          be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]")
MFC after:      9 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52259
DeltaFile
+5-4sys/kern/kern_proc.c
+5-41 files

FreeBSD/src 71db323sys/fs/nfsclient nfs_clport.c

nfscl: Restore sending the effective GID to the server

Fixes:          be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]")
MFC after:      9 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52256
DeltaFile
+4-3sys/fs/nfsclient/nfs_clport.c
+4-31 files

FreeBSD/src d859d4csys/fs/procfs procfs_status.c

procfs: Restore printing the effective GID in 'status'

Reviewed by:    kib
Fixes:          be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]")
MFC after:      9 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52257
DeltaFile
+2-6sys/fs/procfs/procfs_status.c
+2-61 files

FreeBSD/src 5568b44sys/kern imgact_elf.c

imgact_elf: procstat groups: Restore sending the effective GID

Fixes 'procstat -s' run on a core file when the number of groups in
effect at the moment of core dump exceeds KI_NGROUPS (16).

Reviewed by:    kib
Fixes:          be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]")
MFC after:      9 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52258
DeltaFile
+3-1sys/kern/imgact_elf.c
+3-11 files

FreeBSD/src 67f8bd5sys/fs/nfs nfs_commonport.c

nfs: newnfs_setroot(): Remove an obsolete comment

This comment is obsolete, as:
1. This code is FreeBSD-specific and is not shared with other BSDs.
2. With our recent changes in commit be1f7435ef218b1d ("kern: start
   tracking cr_gid outside of cr_groups[]"), all of NetBSD, OpenBSD and
   FreeBSD have the effective GID in a separate field (DragonFlyBSD
   remains to this day an outlier).

MFC after:      9 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52254
DeltaFile
+0-2sys/fs/nfs/nfs_commonport.c
+0-21 files

FreeBSD/src 1c40b15sys/dev/hwpmc hwpmc_mod.c

hwpmc: On attach, fix allowing a PMC's owner to attach it to itself

The returned value in this case was wrong, and would basically prevent
some PMC's owner process to attach that PMC to itself although the
security checks underneath would have allowed it.

Now that this early return has been fixed, its block basically becomes
a performance short-circuit which has no effect from a functional
standpoint.

Fixes:          ebccf1e3a6b1 ("Bring a working snapshot of hwpmc(4), ...")
MFC after:      9 days
Sponsored by:   The FreeBSD Foundation
DeltaFile
+1-1sys/dev/hwpmc/hwpmc_mod.c
+1-11 files