FreeBSD/src 00fce62tools/test/stress2 default.cfg

Revert "stress2: Use tests as the default test user."

This reverts commit 3ee87f8a4d7a56c846d356d028e77bd72a0e1fbb.
DeltaFile
+1-1tools/test/stress2/default.cfg
+1-11 files

FreeBSD/src 8277c79lib/libsys procctl.2

procctl.2: Editing pass

- Add some missing .Pp macros after the end of literal blocks and some
  lists to ensure there is a blank line before the following text.

- Use an indent of Ds for nested lists to reduce excessive indentation and
  make the bodies of the nested list items easier to read.

- Various and sundry rewordings and clarifications.

Reviewed by:    kib, emaste
Differential Revision:  https://reviews.freebsd.org/D47782
DeltaFile
+244-168lib/libsys/procctl.2
+244-1681 files

FreeBSD/src f966ef3sys/netpfil/pf pf.c

pf: fold if (s != NULL) and if (s) into one block

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+1-2sys/netpfil/pf/pf.c
+1-21 files

FreeBSD/src 65d5e55tools/test/stress2/misc tmpfs24.sh

stress2: Fix expected output for tmpfs24.

MFC after:      1 week
Reviewed by:    pho
Differential Revision:  https://reviews.freebsd.org/D47876
DeltaFile
+0-1tools/test/stress2/misc/tmpfs24.sh
+0-11 files

FreeBSD/src 3ee87f8tools/test/stress2 default.cfg

stress2: Use tests as the default test user.

This allows some tests to run without prior configuration; others will
have to be modified to use `su -m` since the tests account is locked.

Reviewed by:    allanjude
Differential Revision:  https://reviews.freebsd.org/D47875
DeltaFile
+1-1tools/test/stress2/default.cfg
+1-11 files

FreeBSD/src 732bb28sys/dev/sound/pcm g711.h

sound: Remove unused code from pcm/g711.h

These routines are already implemented in pcm/intpcm.h.

No functional change intended.

Sponsored by:   The FreeBSD Foundation
MFC after:      2 days
Reviewed by:    dev_submerge.ch, markj
Differential Revision:  https://reviews.freebsd.org/D47734

(cherry picked from commit b882251204128388eb2f8e4f74e83ff1ca7863c4)
DeltaFile
+0-33sys/dev/sound/pcm/g711.h
+0-331 files

FreeBSD/src 01f650csys/conf files, sys/dev/sound/pcm ac97_patch.c ac97.c

sound: Merge ac97 and ac97_patch

No functional change intended.

Sponsored by:   The FreeBSD Foundation
MFC after:      2 days
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D47732

(cherry picked from commit 0b4e32912566d802c7a6501d9ce8119f04dbc2fb)
DeltaFile
+0-117sys/dev/sound/pcm/ac97_patch.c
+95-1sys/dev/sound/pcm/ac97.c
+0-35sys/dev/sound/pcm/ac97_patch.h
+1-1sys/modules/sound/sound/Makefile
+0-1sys/conf/files
+96-1555 files

FreeBSD/src 2c17a7dsys/dev/sound/pcm matrix_map.h matrix.h

sound: Merge pcm/matrix_map.h with pcm/matrix.h

No functional change intended.

Sponsored by:   The FreeBSD Foundation
MFC after:      2 days
Reviewed by:    dev_submerge.ch, markj
Differential Revision:  https://reviews.freebsd.org/D47737

(cherry picked from commit 5a217a8d7d2a0dc19eb5d7bb1bd0f21116fbcf69)
DeltaFile
+0-672sys/dev/sound/pcm/matrix_map.h
+640-0sys/dev/sound/pcm/matrix.h
+0-1sys/dev/sound/pcm/sound.h
+640-6733 files

FreeBSD/src 1b4b198sys/dev/sound/pcm intpcm.h feeder_format.c

sound: Dissolve pcm/intpcm.h

Part of a series of patches to cleanup/simplify pcm/.

Sponsored by:   The FreeBSD Foundation
MFC after:      2 days
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D47736

(cherry picked from commit 88eaa1504d12c82a36d83c16e9fd6c41175d2e0a)
DeltaFile
+0-135sys/dev/sound/pcm/intpcm.h
+101-5sys/dev/sound/pcm/feeder_format.c
+0-11sys/dev/sound/pcm/g711.h
+7-0sys/dev/sound/pcm/feeder.h
+1-0sys/dev/sound/pcm/sound.h
+109-1515 files

FreeBSD/src 03241ebsys/dev/sound/pcm channel.c feeder.h

sound: Remove dead code from pcm/

No functional change intended.

Sponsored by:   The FreeBSD Foundation
MFC after:      2 days
Reviewed by:    dev_submerge.ch, markj
Differential Revision:  https://reviews.freebsd.org/D47733

(cherry picked from commit 00731aaaed76785af8befe13e9a4e85b3554b3f5)
DeltaFile
+0-53sys/dev/sound/pcm/channel.c
+0-26sys/dev/sound/pcm/feeder.h
+0-23sys/dev/sound/pcm/ac97.c
+0-22sys/dev/sound/pcm/dsp.c
+0-21sys/dev/sound/pcm/feeder_rate.c
+0-9sys/dev/sound/pcm/buffer.c
+0-1546 files

FreeBSD/src 134a275sys/dev/sound/pcm sound.h channel.h

sound: Do not access cv_waiters

Remove uses of cv_waiters in PCM_RELEASE and CHN_BROADCAST, and also use
a counter around cv_timedwait_sig() in chn_sleep(), which is checked in
pcm_killchans(), as opposed to reading cv_waiters directly, which is a
layering violation.

While here, move CHN_BROADCAST below the channel lock operations.

Reported by:    avg, jhb, markj
Sponsored by:   The FreeBSD Foundation
MFC after:      2 days
Reviewed by:    dev_submerge.ch, avg
Differential Revision:  https://reviews.freebsd.org/D47780

(cherry picked from commit 46a97b9cd6fd4415270afe4070082ae69ee21035)
DeltaFile
+2-11sys/dev/sound/pcm/sound.h
+4-5sys/dev/sound/pcm/channel.h
+2-2sys/dev/sound/pcm/sound.c
+2-0sys/dev/sound/pcm/channel.c
+10-184 files

FreeBSD/src 63979e8sys/dev/sound/pcm channel.h

sound: Fix mis-sorted CHN_F_BITS line

Fixes:          5317480967bf ("sound: Remove CHN_F_SLEEPING")
Reported by:    jhb
Sponsored by:   The FreeBSD Foundation
MFC after:      2 days
Reviewed by:    jhb, emaste
Differential Revision:  https://reviews.freebsd.org/D47781

(cherry picked from commit 29ba0cc4d919243436f1bf73a22a554fa5073a44)
DeltaFile
+1-1sys/dev/sound/pcm/channel.h
+1-11 files

FreeBSD/src 6830340usr.sbin/fstyp fstyp.c

fstyp: search for file system headers with the largest offset first

fstyp can misidentify a UFS file system as MS-DOS if the device was
repurposed from MS-DOS to UFS via newfs.

This happens for the following reasons:
    - the header for MS-DOS begins at offset 0
    - the superblock for UFS begins at offset 64k, 8k, 0k, or 256k
    - newfs does not clear the area in front of UFS's superblock,
      leaving the MS-DOS header intact.
    - fstyp searches for file system headers alphabetically

To avoid this misidentification, have fstyp search for file system
headers with the largest offset first instead of alphabetically.

The implemented fix was suggested by reporter, Richard M. Kreuter.

PR:             252787
Reviewed by:    imp, emaste
Differential Revision:  https://reviews.freebsd.org/D47855
DeltaFile
+40-10usr.sbin/fstyp/fstyp.c
+40-101 files

FreeBSD/src d6ed5fftools/tools/git git-arc.sh

git-arc: fix diff2reviewers() with multiple reviewers

The select command of jq provides us with a multiline output.  Thus, the
${userids} is a newline separated list.  The recent change 9e84289f2c7e
explicitly said that we aren't going to translate newline to comma when
constructing JSON for the next command.  It also forces the ${userids} to
be printed as is, with shell's field splitting disabled.  So we end up
with invalid JSON, that is missing commas.

Fix this by enabling shell's field splitting by printing ${userids}
outside of double quotes.

Reviewed by:            jlduran, imp, emaste
Differential Revision:  https://reviews.freebsd.org/D47889
Fixes:                  9e84289f2c7e6b632047a75b653fcd587287a8b9
DeltaFile
+1-1tools/tools/git/git-arc.sh
+1-11 files

FreeBSD/src ea48638etc/mtree BSD.tests.dist

mtree: Add missing entries in BSD.tests.dist

Reviewed by:    emaste, christos
Approved by:    emaste (mentor)
Fixes:  95eb4b873b6a ("sound tests: Add sndstat nvlist ATF test")
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D47724

(cherry picked from commit f08dfd819bf73a584bf90da268242a7ed483dc32)
DeltaFile
+2-0etc/mtree/BSD.tests.dist
+2-01 files

FreeBSD/src ae50b6betc/mtree BSD.tests.dist

mtree: Fix BSD.tests.dist sorting

Reviewed by:    imp
Approved by:    emaste (mentor)
Fixes:  60d717baf214 ("ctl: add some ATF tests for READ BUFFER")
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D47719

(cherry picked from commit 4b8e65d12fd7c06c0f670bdb11815971c3bebfed)
DeltaFile
+4-4etc/mtree/BSD.tests.dist
+4-41 files

FreeBSD/src e3a0e41usr.sbin/ppp ppp.8

ppp.8: Fix typo cuad0 -> cuau0

Fix a typo that was missed probably because it was capitalized.
Mark up with .Pa and fix capitalization.

Specify that cuaUX and cuauX are for USB and UART attachments
respectively.

- Silence most lint warnings
- Update outdated links
- Minor style fixes
- Some igor(1) warnings were ignored on purpose

PR:             248359
Reviewed by:    imp, mhorne, Alexander Ziaee <concussious.bugzilla at runbox.com>
Approved by:    emaste (mentor)
Fixes:  839f11a4fe18 ("A number of places in the source tree still reference cuad.* after sio(4) was deprecated by uart(4).")
MFC after:      1 week
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1515

    [2 lines not shown]
DeltaFile
+28-19usr.sbin/ppp/ppp.8
+28-191 files

FreeBSD/src 6749f05sys/dev/rtwn/rtl8192c r92c_tx.c, sys/dev/rtwn/rtl8812a r12a_tx.c

rtwn: use ieee80211_ht_check_tx_shortgi_20() and ieee80211_ht_check_tx_shortgi_40()

Use the new net80211 routines rather than rolling our own.

(The first version of this diff landed a previous version of what was
reviewed, so this brings it up to what was finally accepted in the
review.)

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

Reviewed by:    bz
DeltaFile
+14-6sys/dev/rtwn/rtl8192c/r92c_tx.c
+14-6sys/dev/rtwn/rtl8812a/r12a_tx.c
+28-122 files

FreeBSD/src 49a7f2bshare/man/man4 snd_hdspe.4, sys/dev/sound/pci hdspe.c hdspe.h

snd_hdspe(4): Add sysctls to select analog signal levels.

RME HDSPE AIO sound cards support different sensitivity levels at the
analog input, and different gain levels for the analog line and phones
outputs. Expose these settings as sysctl tunables.

Test Plan:
The following tests on hardware should be performed if possible:
  - Phones output volume changes according to sysctl setting
    (caution, still extremely loud).
  - Create loop to feedback the line output to line input, recording the
    sound played.
  - Iterate through input signal levels and observe volume changes in
    recorded audio.
  - Iterate through output signal levels and observe volume changes in
    recorded audio.

Reviewed by: br, christos
Differential Revision: https://reviews.freebsd.org/D47412
DeltaFile
+222-0sys/dev/sound/pci/hdspe.c
+32-24sys/dev/sound/pci/hdspe.h
+27-1share/man/man4/snd_hdspe.4
+281-253 files

FreeBSD/src e1eff81sys/dev/rtwn/rtl8192c r92c_tx.c, sys/dev/rtwn/rtl8812a r12a_tx.c

rtwn: use ieee80211_ht_check_tx_shortgi_20() and ieee80211_ht_check_tx_shortgi_40()

Use the new net80211 routines rather than rolling our own.

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

Reviewed by: bz
DeltaFile
+6-7sys/dev/rtwn/rtl8812a/r12a_tx.c
+4-7sys/dev/rtwn/rtl8192c/r92c_tx.c
+10-142 files

FreeBSD/src 931d6a8sys/amd64/vmm/amd svm.c

amd64/vmm: Add svm_modsuspend to the vmm_ops_amd table

Fixes:          0b32ef71f9f1 ("vmm: Correctly suspend and resume the vmm driver.")
Sponsored by:   Klara, Inc.
DeltaFile
+1-2sys/amd64/vmm/amd/svm.c
+1-21 files

FreeBSD/src 29f6150sbin/route route_netlink.c, sys/netlink netlink_snl.h netlink_message_parser.h

netlink: use nitems() and roundup(2) from param.h

While here style nested includes (kernel ones go first).

Reviewed by:            melifaro
Differential Revision:  https://reviews.freebsd.org/D47557
DeltaFile
+11-12sys/netlink/netlink_snl.h
+6-6sys/netlink/netlink_message_parser.h
+3-3sbin/route/route_netlink.c
+1-4sys/netlink/netlink.h
+2-1sys/tests/ktest.c
+2-1sys/netpfil/pf/pflow.c
+25-278 files not shown
+32-3614 files

FreeBSD/src fe04834sys/netlink netlink_generic_kpi.c netlink_ctl.h

netlink: use proper argument types in genl_register_family()

Reviewed by:            melifaro
Differential Revision:  https://reviews.freebsd.org/D47553
DeltaFile
+5-6sys/netlink/netlink_generic_kpi.c
+1-1sys/netlink/netlink_ctl.h
+6-72 files

FreeBSD/src 6380058sys/netlink netlink_message_writer.h netlink_message_writer.c

netlink: use correct uint16_t type for attribute type & length

Reviewed by:            melifaro
Differential Revision:  https://reviews.freebsd.org/D47552
DeltaFile
+20-18sys/netlink/netlink_message_writer.h
+6-2sys/netlink/netlink_message_writer.c
+26-202 files

FreeBSD/src f1c6edbsys/netlink netlink_message_writer.c netlink_message_writer.h

netlink: use size_t through the allocation KPI

This fixes some signedness bugs and potential underflows.  The length of
nl_buf is still limited by UINT_MAX and this is asserted now.

Reviewed by:            melifaro
Differential Revision:  https://reviews.freebsd.org/D47551
DeltaFile
+7-7sys/netlink/netlink_message_writer.c
+7-7sys/netlink/netlink_message_writer.h
+3-2sys/netlink/netlink_glue.c
+2-2sys/netlink/ktest_netlink_message_writer.h
+1-1sys/netlink/netlink_domain.c
+1-1sys/netlink/netlink_var.h
+21-206 files

FreeBSD/src 0601c0fsys/netlink netlink_io.c

netlink: check buffer length fits into u_int

We may increase it to size_t later, KPI allows that already, but
doesn't seem to be needed today.

Reviewed by:            melifaro
Differential Revision:  https://reviews.freebsd.org/D47550
DeltaFile
+3-0sys/netlink/netlink_io.c
+3-01 files

FreeBSD/src a034c0asys/netlink netlink_glue.c netlink_message_writer.c, sys/netlink/route iface.c nexthop.c

netlink: refactor writer initialization KPI

o Allow callers to initialize a writer that will malloc(9) with M_WAITOK.
o Use size_t for expected malloc size.
o Use correct types to initialize a group writer.
o Rename functions into nl_writer_ namespace instead of nlmsg_, cause
  they are working on nl_writer, not on nlmsg.
o Make the KPI responsible to sparsely initialize the writer structure.
o Garbage collect chain writer.  Fixes 17083b94a915.

All current consumers are left as is, however some may benefit from
M_WAITOK allocation as well as supplying a correct expected size.

Reviewed by:            melifaro
Differential Revision:  https://reviews.freebsd.org/D47549
DeltaFile
+12-30sys/netlink/netlink_glue.c
+15-9sys/netlink/netlink_message_writer.c
+11-9sys/netlink/netlink_message_writer.h
+7-5sys/netlink/netlink_generic.c
+6-5sys/netlink/route/iface.c
+6-5sys/netlink/route/nexthop.c
+57-637 files not shown
+76-7913 files

FreeBSD/src edf5608sys/netlink netlink_domain.c netlink_var.h

netlink: use bitset(9)

Reviewed by:            melifaro
Differential Revision:  https://reviews.freebsd.org/D47548
DeltaFile
+3-3sys/netlink/netlink_domain.c
+2-1sys/netlink/netlink_var.h
+5-42 files

FreeBSD/src ac84ce0sys/netlink netlink_ctl.h netlink_generic_kpi.c

netlink: consistently use uint16_t for family id

Reviewed by:            melifaro
Differential Revision:  https://reviews.freebsd.org/D47547
DeltaFile
+2-2sys/netlink/netlink_ctl.h
+2-2sys/netlink/netlink_generic_kpi.c
+1-1sys/netlink/netlink_domain.c
+1-1sys/netlink/netlink_var.h
+6-64 files

FreeBSD/src c22c987sys/netpfil/pf pf.c pf_if.c, tests/sys/netpfil/pf sctp.py

pf: fix potential NULL dereference in SCTP multihome handling

When processing an SCTP ASCONF we re-run the rules processing to check
if the new state should be allowed as well. We used to do so against the
'all' interface, to allow new connections to use any interface.

This is problematic for two reasons, the first being it may unexpectedly
bypass interface restrictions. The more important one is that it
can trigger panics. If the ruleset contains a rule which filters on
interface group we'd attempt to process the group list for the 'all'
interface. As this isn't a real interface it doesn't have an associated
struct ifnet, and we end up dereferencing a NULL pointer.

Solve this by not overriding the interface, instead leaving the physical
interface the SCTP ASCONF arrived on. This implies that we may end up
binding to that interface (if if-bound), and thus denying traffic on
other interfaces. Users can allow this anyway by setting 'state-policy
floating' on the relevant SCTP rules. This arguably better reflects user
intent as well. That is, we'll consider SCTP multihomed states to be

    [9 lines not shown]
DeltaFile
+73-4tests/sys/netpfil/pf/sctp.py
+0-6sys/netpfil/pf/pf.c
+3-0sys/netpfil/pf/pf_if.c
+76-103 files