FreeBSD/src 6c5540eshare/examples/bhyve vmrun.sh

vmrun.sh: Don't require firmware on amd64 unless -E was specified

PR:             290232
Reported by:    David Marker <dave at freedave.net>
Fixes:          aa34b1d20e44 ("vmrun.sh: Add arm64 support")
MFC after:      3 days

(cherry picked from commit f19f17b3af675fbbc1244b66bbd8fb4a9836cb02)
DeltaFile
+4-2share/examples/bhyve/vmrun.sh
+4-21 files

FreeBSD/src bcdef9dsys/netinet/tcp_stacks rack.c

inline most of the considered lost condensation.

This is a small cleanup to consolidate the considered lost reduction and marking to an
inline function. There are two places where we are using hookery in SACK processing where
we can't use it. All other places we move to the function. This code in theory changes nothing
and just makes things a bit more readable and consistent.

Reviewed by:tuexen
Differential Revision:  <https://reviews.freebsd.org/D53021>
DeltaFile
+33-40sys/netinet/tcp_stacks/rack.c
+33-401 files

FreeBSD/src 167b9fasys/sys sockbuf.h

socket: bump socket buffer limit to 8MB

Bump the socket buffer limit from 2 MB to 8MB.
In particular, this allows to use larger values for TCP sockets,
which may result in higher throughput values with default settings.
In the review I was proposing using 16 MB, but in the transport
call today we settled on a more conservative value of 8.
Bumping it further will be done in combination with mitigations
for mbuf exhaustion attacks.

Reviewed by:            rscheff, Peter Lei, jtl, thj
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D52873

(cherry picked from commit 1fe6497b48d6954ac07870d920b2e5d6d206be5e)
DeltaFile
+1-1sys/sys/sockbuf.h
+1-11 files

FreeBSD/src c3cc822sys/netinet tcp_input.c

tcp: bump max rcv buffer size for autoscaling

This allows in higher throughput values with default settings.
In the review I was proposing using 16 MB, but in the transport
call today we settled on a more conservative value of 8.
Bumping it further will be done in combination with mitigations
for mbuf exhaustion attacks.

Reviewed by:            rscheff, Peter Lei, jtl, thj
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D52871

(cherry picked from commit baeff75122e5cdb669c920414e054224270383d7)
DeltaFile
+1-1sys/netinet/tcp_input.c
+1-11 files

FreeBSD/src 7d29554sys/netinet tcp_output.c

tcp: bump max snd buffer size for autoscaling

This allows in higher throughput values with default settings.
In the review I was proposing using 16 MB, but in the transport
call today we settled on a more conservative value of 8.
Bumping it further will be done in combination with mitigations
for mbuf exhaustion attacks.

Reviewed by:            rscheff, cc, glebius, Nick Banks, Peter Lei, jtl, thj, rrs
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D52872

(cherry picked from commit 9dd4742ee51ae80639b087a60ce7d15811c2b1e6)
DeltaFile
+1-1sys/netinet/tcp_output.c
+1-11 files

FreeBSD/src 7d6221fsys/dev/gpio gpioc.c, sys/dev/hid hidraw.c u2f.c

Match style in 3613896

Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D53193
DeltaFile
+2-2sys/dev/null/null.c
+1-1sys/dev/gpio/gpioc.c
+1-1sys/dev/hid/hidraw.c
+1-1sys/dev/hid/u2f.c
+5-54 files

FreeBSD/src 0798de7share/man/man4 nvd.4

nvd.4: Add a HARDWARE section for HW Relnotes

Approved by:    re (cperciva)
MFC after:      3 days
Reviewed by:    dab
Differential Revision:  https://reviews.freebsd.org/D52867

(cherry picked from commit 7f5267a99895a797ea135b67aa58d561ee52b279)
(cherry picked from commit 795f4eef2c56e8f6609f008d4af35f45232602e8)
DeltaFile
+5-1share/man/man4/nvd.4
+5-11 files

FreeBSD/src a441f8eshare/man/man7 release.7

release.7: Update RPI example + CHROOTDIR + SPDX

+ arm/RPI-B.conf no longer exists, adjust for arm64/RPI.conf
+ document default CHROOTDIR, also add to FILES list
+ tag SPDX

Approved by:    re (cperciva)
MFC after:      3 days
Reviewed by:    cperciva
Differential Revision:  https://reviews.freebsd.org/D53078

(cherry picked from commit 8a9f1a2286689c447e8528dc79ee6c4a47423fdc)
(cherry picked from commit be9b7d8dd037bb7b5d9d7bea5470732aec3314cf)
DeltaFile
+9-9share/man/man7/release.7
+9-91 files

FreeBSD/src be9b7d8share/man/man7 release.7

release.7: Update RPI example + CHROOTDIR + SPDX

+ arm/RPI-B.conf no longer exists, adjust for arm64/RPI.conf
+ document default CHROOTDIR, also add to FILES list
+ tag SPDX

MFC after:      3 days
Reviewed by:    cperciva
Differential Revision:  https://reviews.freebsd.org/D53078

(cherry picked from commit 8a9f1a2286689c447e8528dc79ee6c4a47423fdc)
DeltaFile
+9-9share/man/man7/release.7
+9-91 files

FreeBSD/src 795f4eeshare/man/man4 nvd.4

nvd.4: Add a HARDWARE section for HW Relnotes

MFC after:      3 days
Reviewed by:    dab
Differential Revision:  https://reviews.freebsd.org/D52867

(cherry picked from commit 7f5267a99895a797ea135b67aa58d561ee52b279)
DeltaFile
+5-1share/man/man4/nvd.4
+5-11 files

FreeBSD/src 6fa18feusr.bin/mkimg mkimg.c

mkimg: Add a -h option and improve usage output to be more expressive

Reviewed by:    imp, kp
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D52906
DeltaFile
+13-8usr.bin/mkimg/mkimg.c
+13-81 files

FreeBSD/src 4ee348eusr.sbin/bsdinstall/scripts bootconfig keymap

bsdinstall: Fix typos

Reviewed by:    emaste
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D53170
DeltaFile
+1-1usr.sbin/bsdinstall/scripts/bootconfig
+1-1usr.sbin/bsdinstall/scripts/keymap
+1-1usr.sbin/bsdinstall/scripts/script
+1-1usr.sbin/bsdinstall/scripts/zfsboot
+1-1usr.sbin/bsdinstall/scripts/auto
+1-1usr.sbin/bsdinstall/scripts/jail
+6-66 files

FreeBSD/src edadbc6libexec/rc rc.conf, libexec/rc/rc.d dmesg

rc: dmesg: Allow umask to be configurable

Allow umask to be configurable.

Being able to set the umask via an rc variable is useful when setting:

    security.bsd.unprivileged_read_msgbuf=0

As it allows a user to configure:

    dmesg_umask="066"

Without modifying the rc script, and preventing the contents of the
$dmesg_file (/var/run/dmesg.boot) from being publicly readable.

PR:             272552
Reviewed by:    netchild
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D53169
DeltaFile
+1-1libexec/rc/rc.d/dmesg
+1-0libexec/rc/rc.conf
+2-12 files

FreeBSD/src 982d70clibexec/rc rc.conf

rc.conf: Fix typo interferring -> interfering

Reviewed by:    emaste
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D53168
DeltaFile
+1-1libexec/rc/rc.conf
+1-11 files

FreeBSD/src 301e6c4sys/i386/i386 elf_machdep.c, sys/i386/linux linux_sysvec.c

imgact: Mark brandinfo and note structures as const

No functional change intended.

Reviewed by:    kib
MFC after:      10 days
MFC with:       80336636b6b9f7a3bdad007c400e85eae017d2a2
Differential Revision:  https://reviews.freebsd.org/D53173
DeltaFile
+6-6sys/i386/i386/elf_machdep.c
+6-6sys/i386/linux/linux_sysvec.c
+6-6sys/powerpc/powerpc/elf64_machdep.c
+4-4sys/powerpc/powerpc/elf32_machdep.c
+3-3sys/sys/imgact_elf.h
+2-2sys/kern/imgact_elf.c
+27-272 files not shown
+31-318 files

FreeBSD/src 8f4a0d2lib/libc/inet inet_net_pton.c inet_net_ntop.c, lib/libc/tests/net inet_net_test.cc Makefile

libc: Import OpenBSD's inet_net_{ntop,pton}

Our versions of these functions (originally taken from BIND) simply
don't work correctly for AF_INET6.  These were removed from BIND itself
quite a while ago, but OpenBSD has made several fixes in the mean time,
so import their code.

Add tests for both functions.

PR:             289198
Reported by:    Nico Sonack <nsonack at herrhotzenplotz.de>
MFC after:      1 week
Reviewed by:    des
Obtained from:  OpenBSD (lib/libc/net)
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D52629
DeltaFile
+114-267lib/libc/inet/inet_net_pton.c
+333-0lib/libc/tests/net/inet_net_test.cc
+52-154lib/libc/inet/inet_net_ntop.c
+2-0lib/libc/tests/net/Makefile
+501-4214 files

FreeBSD/src 30a873eusr.sbin/virtual_oss/virtual_bt_speaker bt_speaker.c, usr.sbin/virtual_oss/virtual_oss utils.h int.h

virtual_oss(8): Retire unused utils.h

Sponsored by:   The FreeBSD Foundation
MFC after:      1 day
Reviewed by:    emaste
Differential Revision:  https://reviews.freebsd.org/D53174
DeltaFile
+0-31usr.sbin/virtual_oss/virtual_oss/utils.h
+0-3usr.sbin/virtual_oss/virtual_oss/int.h
+0-1usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
+0-1usr.sbin/virtual_oss/virtual_oss/main.c
+0-364 files

FreeBSD/src 56eee77sbin/devd snd.conf

devd/snd.conf: Note that any command can be used for the action

Sponsored by:   The FreeBSD Foundation
MFC after:      1 day
Differential Revision:  https://reviews.freebsd.org/D53175
DeltaFile
+4-1sbin/devd/snd.conf
+4-11 files

FreeBSD/src 317a5ddsbin/ipfw tables.c

ipfw: do not use errno value for error reporting

table_do_modify_record() already uses errno value on error.
Also this fixes problem when `ipfw table add` returns ENOTTY that
is unrelated to operation.

Tested by:      dhw
Fixes:          09025a714708
Differential Revision:  https://reviews.freebsd.org/D53050

(cherry picked from commit dfd822b1f0846bdaa9a14457346f7431a86d3a64)
DeltaFile
+0-3sbin/ipfw/tables.c
+0-31 files

FreeBSD/src 7a2a874sys/netinet ip_carp.c, sys/netinet6 nd6_nbr.c in6_src.c

carp6: revise the generation of ND6 NA

* use ND_NA_FLAG_ROUTER flag in carp_send_na() when we work as router.
* use in6addr_any as destination address for nd6_na_output(), then it
  will use ipv6-all-nodes multicast address.
* add in6_selectsrc_nbr() function that accepts additional argument
  ip6_moptions. Use this function from ND6 code to avoid cases when
  nd6_na_output/nd6_ns_output can not find source address for
  multicast destinations.
* add some comments from RFC2461 for better understanding.
* use tlladdr argument as flags and use ND6_NA_OPT_LLA when we need
  to add target link-layer address option, and ND6_NA_CARP_MASTER when
  we know that target address is CARP master. Then we can prepare
  correct CARP's mac address if target address is CARP master.
* move blocks of code where multicast options is initialized and
  use it when destination address is multicast.

Reviewed by:    kp
Obtained from:  Yandex LLC

    [4 lines not shown]
DeltaFile
+54-67sys/netinet6/nd6_nbr.c
+39-15sys/netinet6/in6_src.c
+20-7sys/netinet/ip_carp.c
+4-0sys/netinet6/nd6.h
+2-0sys/netinet6/ip6_var.h
+119-895 files

FreeBSD/src 2efda1bsys/netinet ip_carp.c, sys/netinet6 nd6_nbr.c in6_src.c

carp6: revise the generation of ND6 NA

* use ND_NA_FLAG_ROUTER flag in carp_send_na() when we work as router.
* use in6addr_any as destination address for nd6_na_output(), then it
  will use ipv6-all-nodes multicast address.
* add in6_selectsrc_nbr() function that accepts additional argument
  ip6_moptions. Use this function from ND6 code to avoid cases when
  nd6_na_output/nd6_ns_output can not find source address for
  multicast destinations.
* add some comments from RFC2461 for better understanding.
* use tlladdr argument as flags and use ND6_NA_OPT_LLA when we need
  to add target link-layer address option, and ND6_NA_CARP_MASTER when
  we know that target address is CARP master. Then we can prepare
  correct CARP's mac address if target address is CARP master.
* move blocks of code where multicast options is initialized and
  use it when destination address is multicast.

Reviewed by:    kp
Obtained from:  Yandex LLC

    [4 lines not shown]
DeltaFile
+54-67sys/netinet6/nd6_nbr.c
+39-15sys/netinet6/in6_src.c
+20-7sys/netinet/ip_carp.c
+4-0sys/netinet6/nd6.h
+2-0sys/netinet6/ip6_var.h
+119-895 files

FreeBSD/src d7ff2detools/test/stress2/misc kevent19.sh kevent17.sh

stress2: Added kqueuex(KQUEUE_CPONFORK) test scenarios
DeltaFile
+187-0tools/test/stress2/misc/kevent19.sh
+176-0tools/test/stress2/misc/kevent17.sh
+152-0tools/test/stress2/misc/kevent18.sh
+515-03 files

FreeBSD/src 3613896sys/dev/gpio gpioc.c, sys/dev/null null.c

knotes: kqueue: handle copy for trivial filters

Reviewed by:    markj
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      2 weeks
Differential revision:  https://reviews.freebsd.org/D52045
DeltaFile
+12-0sys/kern/kern_event.c
+5-2sys/kern/sys_eventfd.c
+4-2sys/dev/null/null.c
+4-1sys/kern/sys_pipe.c
+3-1sys/kern/vfs_aio.c
+2-1sys/dev/gpio/gpioc.c
+30-733 files not shown
+77-939 files

FreeBSD/src a4981edlib/libsys kqueue.2

kqueue.2: document KQUEUE_CPONFORK

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      2 weeks
Differential revision:  https://reviews.freebsd.org/D52045
DeltaFile
+28-1lib/libsys/kqueue.2
+28-11 files

FreeBSD/src 37ce605sys/kern kern_descrip.c kern_fork.c, sys/sys filedesc.h

kern_descrip.c: add struct proc argument to fdcopy()

The proc is the owner of the copied filedesc.

Reviewed by:    markj
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      2 weeks
Differential revision:  https://reviews.freebsd.org/D52045
DeltaFile
+2-2sys/kern/kern_descrip.c
+1-1sys/kern/kern_fork.c
+1-1sys/sys/filedesc.h
+4-43 files

FreeBSD/src 7a72e88sys/dev/netmap netmap_freebsd.c

kqueue: handle copy for netmap filters

Reviewed by:    markj
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      2 weeks
Differential revision:  https://reviews.freebsd.org/D52045
DeltaFile
+16-1sys/dev/netmap/netmap_freebsd.c
+16-11 files

FreeBSD/src b11289fsys/compat/linux linux_event.c, sys/kern kern_event.c

kqueuex(2): add KQUEUE_CPONFORK

The created kqueue is copied on fork, together with the registered
events. This means that a new kqueue is created at the same fd index
as the parent' kqueue, and all registered events are copied into the
new kqueue (when possible). The current active events list is also
duplicated.

Reviewed by:    markj
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      2 weeks
Differential revision:  https://reviews.freebsd.org/D52045
DeltaFile
+161-13sys/kern/kern_event.c
+2-1sys/sys/syscallsubr.h
+1-1sys/compat/linux/linux_event.c
+2-0sys/sys/event.h
+2-0sys/sys/eventvar.h
+168-155 files

FreeBSD/src 78382casys/kern kern_event.c

kern/kern_event.c: extract kern_kqueue_alloc() from kern_kqueue()

The new helper function allows to allocate a kqueue and its file,
without also allocating file descriptor.

Reviewed by:    markj
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      2 weeks
Differential revision:  https://reviews.freebsd.org/D52045
DeltaFile
+25-9sys/kern/kern_event.c
+25-91 files

FreeBSD/src 6b71c4fsys/kern vfs_subr.c

kqueue: handle copy for vnode filters

Reviewed by:    markj
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      2 weeks
Differential revision:  https://reviews.freebsd.org/D52045
DeltaFile
+14-0sys/kern/vfs_subr.c
+14-01 files

FreeBSD/src c0e70e7sys/kern kern_event.c

kern_event.c: support copy for timer events

Reviewed by:    markj
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      2 weeks
Differential revision:  https://reviews.freebsd.org/D52045
DeltaFile
+26-0sys/kern/kern_event.c
+26-01 files