]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
20 months agostand: Unbreak FAT32 in loader
Michael Gmelin [Wed, 7 Sep 2022 16:56:49 +0000 (18:56 +0200)]
stand: Unbreak FAT32 in loader

This corrects an issue introduced in b4cb3fe0e39a3, where a freshly
allocated `DOS_FS` structure would not be initialized properly before
use in `dos_open`.

In case of FAT32 file systems, this would leave `fs->dirents`
uninitialized and - depending on its content and due to checks in
`parsebs` - prevent mounting the file system successfully.

This particularily impacted the EFI loader, as it was sometimes not
able to read files from a FAT32-formatted EFI partition, including
LoaderEnv (`/efi/freebsd/loader.env`).

Accepted by: imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D36482

(cherry picked from commit 0eb736c0f673d2804a0c8c14fa1e4eae228ab6d2)

20 months agostand: Parse all arguments passed by UEFI
Michael Gmelin [Mon, 5 Sep 2022 15:56:11 +0000 (17:56 +0200)]
stand: Parse all arguments passed by UEFI

Approved by: imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D36457

(cherry picked from commit 2b3543dbb1b3fa7c2280d71c017e3e0304e77d54)

21 months agofile: fix test case for gpkg by removing the extra \n.
Xin LI [Sat, 1 Oct 2022 05:45:32 +0000 (22:45 -0700)]
file: fix test case for gpkg by removing the extra \n.

(cherry picked from commit c5e957ad4fe63c90fccc7051ba2a4cb1fe140a75)

21 months agoscandir(3): Rename alphasort_thunk to scandir_thunk_cmp to
Xin LI [Mon, 26 Sep 2022 02:01:46 +0000 (19:01 -0700)]
scandir(3): Rename alphasort_thunk to scandir_thunk_cmp to
reflect that it is not alphasort-specific.

Reported by: emaste
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D36708

(cherry picked from commit 45ff071ddccac0a158cfeb53285e6bb2df6bc835)

21 months agoamd64: Initialize IPI scoreboard earlier
Konstantin Belousov [Fri, 17 Dec 2021 04:28:11 +0000 (06:28 +0200)]
amd64: Initialize IPI scoreboard earlier

(cherry picked from commit 648fa3558c161a1d8564626d21047710c3fbfdf6)

21 months agounbound: Adjust version string
Cy Schubert [Sat, 1 Oct 2022 13:48:37 +0000 (06:48 -0700)]
unbound: Adjust version string

Sync version string with contrib.

Reported by: "Herbert J. Skuhra" <herbert@gojira.at>
Fixes: 4f5c8956cff4

(cherry picked from commit 35d60ac2e5bdb63ea8c6e08caca699dede8674e6)

21 months agopowerpc64: tell kernel when radix is not available
Leandro Lupori [Fri, 22 Oct 2021 16:44:21 +0000 (13:44 -0300)]
powerpc64: tell kernel when radix is not available

If CAS detects that radix is not supported, set radix_mmu to 0
to avoid the kernel trying to use it and panic.

Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br)

(cherry picked from commit a23e18ea545675aca7551ef2395f6df40a3acb29)

21 months agopowerpc64: make radix with superpages default
Leandro Lupori [Thu, 14 Oct 2021 16:13:27 +0000 (13:13 -0300)]
powerpc64: make radix with superpages default

As Radix MMU with superpages enabled is now stable, make it the
default choice on supported hardware (POWER9 and above), since its
performance is greater than that of HPT MMU.

Reviewed by: alfredo, jhibbits
Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br)
Differential Revision: https://reviews.freebsd.org/D30797

(cherry picked from commit 8ecf9a8bab608c26cb100f393b24e883a706ff03)

21 months agopowerpc64: fix radix on pseries TLB invalidation
Leandro Lupori [Wed, 8 Sep 2021 11:37:11 +0000 (08:37 -0300)]
powerpc64: fix radix on pseries TLB invalidation

When running in a virtualized environment, TLB invalidations can only
be performed on process scope, as only the hypervisor is allowed to
invalidate a global scope, or else a Program Interrupt is triggered.

Since we are here, also make sure that the register process table
hypercall returns success.

Reviewed by: jhibbits
Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br)
Differential Revision: https://reviews.freebsd.org/D31775

(cherry picked from commit 4f7c436548ea1cc935c4f4b237693fbe8ed7939a)

21 months agopowerpc/pseries: Allow radix pmap in pseries for ISA 3.0
Justin Hibbits [Thu, 12 Aug 2021 00:03:27 +0000 (19:03 -0500)]
powerpc/pseries: Allow radix pmap in pseries for ISA 3.0

ISA 3.0 allows for nested radix translations with minimal to no
involvement of the hypervisor.  This should make pseries signficantly
faster on POWER9 pseries instances, as fewer hypercalls are needed to
manage pmap now.

Relnotes: yes

(cherry picked from commit 5ae48eb998ad5d41118d2df62cf28b92d6864e24)

21 months agopowerpc64le: fix boot when using QEMU PowerNV
Leandro Lupori [Thu, 25 Nov 2021 19:41:46 +0000 (16:41 -0300)]
powerpc64le: fix boot when using QEMU PowerNV

When using QEMU PowerNV with latest op-build release (v2.7), its
kexec transfers control to FreeBSD kernel in BE mode, causing an
instant exception on LE kernels. Make kboot able to detect and
swap endian to fix this.

Reviewed by: imp
Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br)
Differential Revision: https://reviews.freebsd.org/D33104

(cherry picked from commit e141b62d208867fc5bdb5803d05f5496260722ac)

21 months agozfs: merge openzfs/zfs@6a6bd4939 (zfs-2.1-release) into stable/13
Martin Matuska [Tue, 4 Oct 2022 15:52:09 +0000 (17:52 +0200)]
zfs: merge openzfs/zfs@6a6bd4939 (zfs-2.1-release) into stable/13

OpenZFS release 2.1.6

Notable upstream pull requeset merges:
  #11733 ICP: Add missing stack frame info to SHA asm files
  #12274 Optimize txg_kick() process
  #12284 Add Module Parameter Regarding Log Size Limit
  #12285 Introduce a tunable to exclude special class buffers from L2ARC
  #12287 Remove refcount from spa_config_*()
  #12425 Avoid small buffer copying on write
  #12516 Fix NFS and large reads on older kernels
  #12678 spa.c: Replace VERIFY(nvlist_*(...) == 0) with fnvlist_*
  #12789 Improve log spacemap load time
  #13022 Add more control/visibility and speedup spa_load_verify()
  #13106 add physical device size to SIZE column in 'zpool list -v'
  #13388 Improve mg_aliquot math
  #13405 Revert "Reduce dbuf_find() lock contention"
  #13452 More speculative prefetcher improvements
  #13476 Refactor Log Size Limit
  #13540 AVL: Remove obsolete branching optimizations
  #13553 Reduce ZIO io_lock contention on sorted scrub
  #13555 Scrub mirror children without BPs
  #13563 FreeBSD: Improve crypto_dispatch() handling
  #13576 Several sorted scrub optimizations
  #13579 Fix and disable blocks statistics during scrub
  #13582 Several B-tree optimizations
  #13591 Avoid two 64-bit divisions per scanned block
  #13606 Avoid memory copies during mirror scrub
  #13613 Avoid memory copy when verifying raidz/draid parity
  #13643 Fix scrub resume from newly created hole
  #13756 FreeBSD: Mark ZFS_MODULE_PARAM_CALL as MPSAFE
  #13767 arcstat: fix -p option
  #13781 Importing from cachefile can trip assertion
  #13794 Apply arc_shrink_shift to ARC above arc_c_min
  #13798 Improve too large physical ashift handling
  #13811 Fix column width in 'zpool iostat -v' and 'zpool list -v'
  #13842 make DMU_OT_IS_METADATA and DMU_OT_IS_ENCRYPTED return B_TRUE
         or B_FALSE
  #13855 zfs recv hangs if max recordsize is less than received
         recordsize
  #13861 Fix use-after-free in btree code
  #13865 vdev_draid_lookup_map() should not iterate outside draid_maps
  #13878 Delay ZFS_PROP_SHARESMB property to handle it for encrypted
         raw receive
  #13882 FreeBSD: Fix integer conversion for vnlru_free{,_vfsops}()
  #13885 Fix incorrect size given to bqueue_enqueue() call in dmu_redact.c
  #13908 FreeBSD: stop passing LK_INTERLOCK to VOP_LOCK
  #13930 zpool: Don't print "repairing" on force faulted drives
  #13954 Fix bad free in skein code

Obtained from: OpenZFS
OpenZFS tag: zfs-2.1.6
OpenZFS commit: 6a6bd493988c75331deab06e5352a9bed035a87d
Relnotes: yes

21 months agocheck/delete-old: Fix /bin/rmail removal condition
Dmitry Chagin [Thu, 21 Jul 2022 22:20:25 +0000 (01:20 +0300)]
check/delete-old: Fix /bin/rmail removal condition

When WITHOUT_SENDMAIL is enabled and WITHOUT_MAILWRAPPER is disabled
we install /bin/rmail as a link to the /usr/sbin/mailwrapper.
Ensure make delete-old does not unlink /bin/rmail in that case.

PR: 266604
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D35874
MFC after: 2 weeks

(cherry picked from commit 55736146389f997fe3e2453f1d48d96ff1ad5b7a)

21 months agoLinuxKPI: Use SYSCTL_FOREACH()
Hans Petter Selasky [Wed, 28 Sep 2022 11:42:32 +0000 (13:42 +0200)]
LinuxKPI: Use SYSCTL_FOREACH()

Differential Revision:  https://reviews.freebsd.org/D36748
Sponsored by: NVIDIA Networking

(cherry picked from commit dd6bb9abf075fd3a14956f61559a7e90bb2f26d9)

21 months agosysctl(3): Implement SYSCTL_FOREACH() to iterate all OIDs in a sysctl list.
Hans Petter Selasky [Tue, 27 Sep 2022 13:48:16 +0000 (15:48 +0200)]
sysctl(3): Implement SYSCTL_FOREACH() to iterate all OIDs in a sysctl list.

To avoid using the sysctl list macros directly in external kernel modules.

Reviewed by: asomers, manu and asiciliano
Differential Revision: https://reviews.freebsd.org/D36748
Sponsored by: NVIDIA Networking

(cherry picked from commit c075ea46bca6d48ce9f639e4575077d06d392427)

21 months agosnd_uaudio(4): Add some examples accessing USB MIDI devices.
Goran Mekic [Tue, 27 Sep 2022 17:28:27 +0000 (19:28 +0200)]
snd_uaudio(4): Add some examples accessing USB MIDI devices.

Differential Revision: https://reviews.freebsd.org/D36195
Sponsored by: NVIDIA Networking

(cherry picked from commit f092c21bf630543dc899a444fa7885d0bbbaedfd)

21 months agovt(4): Make sure vt_switch_timer() has a sleepable context.
Hans Petter Selasky [Mon, 26 Sep 2022 15:10:50 +0000 (17:10 +0200)]
vt(4): Make sure vt_switch_timer() has a sleepable context.

Fixes the following panic backtrace:

panic()
usbhid_sync_xfer()
usbhid_set_report()
hid_set_report()
hidbus_write()
hid_write()
hkbd_set_leds()
hkbd_ioctl_locked()
hkbd_ioctl_locked()
hkbd_ioctl()
kbdmux_ioctl()
vt_window_switch()
vt_switch_timer()

Differential Revision: https://reviews.freebsd.org/D36715
Sponsored by: NVIDIA Networking

(cherry picked from commit 2cce9aa0785c438fa8b66bd230824f7460df14ac)

21 months agonfsclient: access v_mount only after the vnode is locked
Konstantin Belousov [Mon, 26 Sep 2022 18:10:47 +0000 (21:10 +0300)]
nfsclient: access v_mount only after the vnode is locked

(cherry picked from commit ab17854f974b5671b09139079d98e2068802064b)

21 months agobusdma: Fix powerpc DMA alignment check
Justin Hibbits [Tue, 4 Jan 2022 15:22:04 +0000 (09:22 -0600)]
busdma: Fix powerpc DMA alignment check

The original logic was to check if there's no filter and the address is
misaligned relative to the requirements.  The refactoring in
c606ab59e7f9423f7027320e9a4514c7db39658d missed this, and instead caused
it to return failure if the address *is* properly aligned.

(cherry picked from commit 3a9688f8bc488b16bf5676057fa86263554312b0)

21 months agobsdbox: remove previously broken telnet(d) support
Brooks Davis [Thu, 29 Sep 2022 16:54:32 +0000 (17:54 +0100)]
bsdbox: remove previously broken telnet(d) support

Support for telnet(d) was commented out some time ago.  Remove because
telnetd is gone in main and this is unlikely to be fixed.

Reviewed by: imp, delphij, emaste
Differential Revision: https://reviews.freebsd.org/D36782

(cherry picked from commit c0f94ccbb241f530c9f89d5259efb695e4f6de95)

21 months agoman9: Add MLINKs for bus_space_{peek,poke}
Mark Johnston [Mon, 26 Sep 2022 13:28:57 +0000 (09:28 -0400)]
man9: Add MLINKs for bus_space_{peek,poke}

(cherry picked from commit b3ab58bd4384b245404ebb10c5aa88e73e7370c8)

21 months agoposixshm tests: Map the large pages in the madvise test
Mark Johnston [Mon, 26 Sep 2022 12:58:10 +0000 (08:58 -0400)]
posixshm tests: Map the large pages in the madvise test

This improves test coverage and was unintentionally omitted when the
tests were written.

(cherry picked from commit e4eedf8c31a2693f07628d3b0433c6d398fdb6cd)

21 months agoarm64: Handle 1GB mappings in pmap_enter_quick_locked()
Mark Johnston [Mon, 26 Sep 2022 12:54:35 +0000 (08:54 -0400)]
arm64: Handle 1GB mappings in pmap_enter_quick_locked()

Reviewed by: alc, kib

(cherry picked from commit 7533062ae133a0e6e8f5b9913565bb99eabacb5f)

21 months agosvc_vc_rendezvous_stat: eliminiate write only variable stat
Warner Losh [Fri, 8 Jul 2022 17:53:35 +0000 (11:53 -0600)]
svc_vc_rendezvous_stat: eliminiate write only variable stat

Sponsored by: Netflix

(cherry picked from commit 6e671ec1e64ccd11c81eabe5abef5b20745914a2)

21 months agoclnt_vc_destroy: eliminiate write only variable stat
Warner Losh [Fri, 8 Jul 2022 17:53:35 +0000 (11:53 -0600)]
clnt_vc_destroy: eliminiate write only variable stat

Sponsored by: Netflix

(cherry picked from commit 77bc5890adf4aad832e1ed35f15dad8f5220a91b)

21 months agokrpc_call: eliminiate write only variable nam
Warner Losh [Fri, 8 Jul 2022 17:53:35 +0000 (11:53 -0600)]
krpc_call: eliminiate write only variable nam

Sponsored by: Netflix

(cherry picked from commit 5c2aad7e890d9f90b0281bb68bf07e764e0d62bd)

21 months agobootpc_decode_reply: eliminiate write only variable ip
Warner Losh [Fri, 8 Jul 2022 17:53:35 +0000 (11:53 -0600)]
bootpc_decode_reply: eliminiate write only variable ip

Sponsored by: Netflix

(cherry picked from commit b64a484592b2c053f7131edd949edb0a76eef083)

21 months agosmb_smb_treedisconnect: eliminate write only variable mbp
Warner Losh [Fri, 8 Jul 2022 17:53:34 +0000 (11:53 -0600)]
smb_smb_treedisconnect: eliminate write only variable mbp

Sponsored by: Netflix

(cherry picked from commit d6f698549474982394b0d347ae72c72425cc1f32)

21 months agosmb_iod_main: eliminate write only variable error
Warner Losh [Fri, 8 Jul 2022 17:53:34 +0000 (11:53 -0600)]
smb_iod_main: eliminate write only variable error

Sponsored by: Netflix

(cherry picked from commit 65ee334d112e1d19425bb59628500d0ba91ab48c)

21 months agopim6_input: eliminate write only variable rc
Warner Losh [Fri, 8 Jul 2022 17:53:34 +0000 (11:53 -0600)]
pim6_input: eliminate write only variable rc

Sponsored by: Netflix

(cherry picked from commit c7761ca93e9f6be51db2a8632d6697253e93f6c3)

21 months agosysctl_dumpentry: move error to inner scope
Warner Losh [Fri, 8 Jul 2022 17:53:34 +0000 (11:53 -0600)]
sysctl_dumpentry: move error to inner scope

Sponsored by: Netflix

(cherry picked from commit e606e5d1572684b978ca0572da776a597ffe0d94)

21 months agoroute_ctl: eliminate write only variables ifa and nh
Warner Losh [Fri, 8 Jul 2022 17:53:34 +0000 (11:53 -0600)]
route_ctl: eliminate write only variables ifa and nh

Sponsored by: Netflix

(cherry picked from commit 5de5b5a34db93a2a646e88d39a8e7718f925636f)

21 months agoget_nhop: eliminate write only variable gateway
Warner Losh [Fri, 8 Jul 2022 17:53:34 +0000 (11:53 -0600)]
get_nhop: eliminate write only variable gateway

Sponsored by: Netflix

(cherry picked from commit 7f9c3339a4ff5fecab3f408ba86afd3c5b778bd3)

21 months agoxl_attach: eliminate write only variable unit
Warner Losh [Fri, 8 Jul 2022 17:53:34 +0000 (11:53 -0600)]
xl_attach: eliminate write only variable unit

Sponsored by: Netflix

(cherry picked from commit c972f2c065bdb7031e7935aac406365e4810df19)

21 months agovtpci_legacy_register_msix: eliminate write only variable dev
Warner Losh [Fri, 8 Jul 2022 17:53:34 +0000 (11:53 -0600)]
vtpci_legacy_register_msix: eliminate write only variable dev

Sponsored by: Netflix

(cherry picked from commit 76e96756633e5d33f334bb48bedf981557272ead)

21 months agoustorage_fs_verify: eliminate write only variables file_offset and file_offset
Warner Losh [Fri, 8 Jul 2022 17:53:34 +0000 (11:53 -0600)]
ustorage_fs_verify: eliminate write only variables file_offset and file_offset

Sponsored by: Netflix

(cherry picked from commit 7a1bef40f1e9bb4d3d56331e743dec79c49a8fc4)

21 months agocp2112iic_intr_write_callback: eliminate write only variable psc
Warner Losh [Fri, 8 Jul 2022 17:53:33 +0000 (11:53 -0600)]
cp2112iic_intr_write_callback: eliminate write only variable psc

Sponsored by: Netflix

(cherry picked from commit 11110685fcd52aa19500f029365a8093218747c6)

21 months agowsp_intr_callback: eliminate write only variable h
Warner Losh [Fri, 8 Jul 2022 17:53:33 +0000 (11:53 -0600)]
wsp_intr_callback: eliminate write only variable h

Sponsored by: Netflix

(cherry picked from commit 53c1f1fc609190733adc2136c98c16086266f03e)

21 months agouss820dci: eliminate unused variables sc, ep_no
Warner Losh [Fri, 8 Jul 2022 17:53:33 +0000 (11:53 -0600)]
uss820dci: eliminate unused variables sc, ep_no

Sponsored by: Netflix

(cherry picked from commit 12312f75838e49635909f5ad4ba9e9688a3073b7)

21 months agouhci_xfer_setup: eliminate write only variable sc
Warner Losh [Fri, 8 Jul 2022 17:53:33 +0000 (11:53 -0600)]
uhci_xfer_setup: eliminate write only variable sc

Sponsored by: Netflix

(cherry picked from commit 6ccdcae1b9a693ffddf724cf850424e3b291bca1)

21 months agomusb: eliminate write only variable sc
Warner Losh [Fri, 8 Jul 2022 17:53:33 +0000 (11:53 -0600)]
musb: eliminate write only variable sc

Sponsored by: Netflix

(cherry picked from commit ab59cd6a0b3bb00ef8101180eae54982090317a2)

21 months agoatmegadci: eliminate unused variables sc, ep_no
Warner Losh [Fri, 8 Jul 2022 17:53:33 +0000 (11:53 -0600)]
atmegadci: eliminate unused variables sc, ep_no

Sponsored by: Netflix

(cherry picked from commit e73b02f66b7cf2f385457232de3ee908d695a170)

21 months agohdspe_dmapsetmap: eliminate write only variable sc
Warner Losh [Fri, 8 Jul 2022 17:53:33 +0000 (11:53 -0600)]
hdspe_dmapsetmap: eliminate write only variable sc

Sponsored by: Netflix

(cherry picked from commit ad1b7fd71429468430e379fa0a4152f23b0af90a)

21 months agoquicc_bus_setsig: eliminate write only variable bas
Warner Losh [Fri, 8 Jul 2022 17:53:33 +0000 (11:53 -0600)]
quicc_bus_setsig: eliminate write only variable bas

Sponsored by: Netflix

(cherry picked from commit c8fe3923d8d969efea24b7107a825de02b8a4b0d)

21 months agohdaa_eld_dump: eliminate write only variable len
Warner Losh [Fri, 8 Jul 2022 17:53:33 +0000 (11:53 -0600)]
hdaa_eld_dump: eliminate write only variable len

Sponsored by: Netflix

(cherry picked from commit 557627dda9b015728a478e31348808356eb75c73)

21 months agoemu10kx: eliminate write only variables val, r and move i to loop
Warner Losh [Fri, 8 Jul 2022 17:53:32 +0000 (11:53 -0600)]
emu10kx: eliminate write only variables val, r and move i to loop

Sponsored by: Netflix

(cherry picked from commit 8717135d3750b3d0c80c8783c547ffffe255c04f)

21 months agoemu10kx-pci: eliminate write only variable r
Warner Losh [Fri, 8 Jul 2022 17:53:32 +0000 (11:53 -0600)]
emu10kx-pci: eliminate write only variable r

Sponsored by: Netflix

(cherry picked from commit 451f54707a614757e2a0093876e30b68247a41da)

21 months agoemu_midi_probe: eliminate write only variable r
Warner Losh [Fri, 8 Jul 2022 17:53:32 +0000 (11:53 -0600)]
emu_midi_probe: eliminate write only variable r

Sponsored by: Netflix

(cherry picked from commit 7387abd342a181bcf278949e22f09ebc25ed00ae)

21 months agopcmcsa_attach: eliminate write only variable unit
Warner Losh [Fri, 8 Jul 2022 17:53:32 +0000 (11:53 -0600)]
pcmcsa_attach: eliminate write only variable unit

Sponsored by: Netflix

(cherry picked from commit 33985865b2d8eafc9fc1d065dc06344c9c95c56c)

21 months agomidicsa_attach: eliminate write only variable func
Warner Losh [Fri, 8 Jul 2022 17:53:32 +0000 (11:53 -0600)]
midicsa_attach: eliminate write only variable func

Sponsored by: Netflix

(cherry picked from commit 3e423419cf02c9e314b66b51c1fb0f987839de5e)

21 months agocs4281: eliminate write only variable codecno
Warner Losh [Fri, 8 Jul 2022 17:53:32 +0000 (11:53 -0600)]
cs4281: eliminate write only variable codecno

Sponsored by: Netflix

(cherry picked from commit 0c64fe00681816ce593e58617a7b285683154dfb)

21 months agosb_probe: eliminate write only variable r
Warner Losh [Fri, 8 Jul 2022 17:53:32 +0000 (11:53 -0600)]
sb_probe: eliminate write only variable r

Sponsored by: Netflix

(cherry picked from commit 635a4068d2c5a711cf6cf35d6c9be8e550b5a5d9)

21 months agosb16_probe: eliminate write only variable r
Warner Losh [Fri, 8 Jul 2022 17:53:32 +0000 (11:53 -0600)]
sb16_probe: eliminate write only variable r

Sponsored by: Netflix

(cherry picked from commit 668986eae9b5d7da35a27445c1f306604caa0429)

21 months agoess_probe: eliminate write only variable r
Warner Losh [Fri, 8 Jul 2022 17:53:32 +0000 (11:53 -0600)]
ess_probe: eliminate write only variable r

Sponsored by: Netflix

(cherry picked from commit 3a7365acc813173c02c4346044615a18e29b71ac)

21 months agosis_attach: Move waittime definition into for loop
Warner Losh [Fri, 8 Jul 2022 17:53:31 +0000 (11:53 -0600)]
sis_attach: Move waittime definition into for loop

Sponsored by: Netflix

(cherry picked from commit c9439e23cefb918ad71f568a35f2a468ef3365c8)

21 months agoppc_detect_fifo: eliminate write only variable cc
Warner Losh [Fri, 8 Jul 2022 17:53:31 +0000 (11:53 -0600)]
ppc_detect_fifo: eliminate write only variable cc

Sponsored by: Netflix

(cherry picked from commit 94885fbd042b61eec97f20ea06a9e96fb05f5492)

21 months agoppi_probe: eliminate unused variable ppi
Warner Losh [Fri, 8 Jul 2022 17:53:31 +0000 (11:53 -0600)]
ppi_probe: eliminate unused variable ppi

Sponsored by: Netflix

(cherry picked from commit de80fb0ace15528ae86a97c97dd7b7cf7949ee83)

21 months agoMark cfg as __unused to avoid ifdef soup
Warner Losh [Fri, 8 Jul 2022 17:53:31 +0000 (11:53 -0600)]
Mark cfg as __unused to avoid ifdef soup

Sponsored by: Netflix

(cherry picked from commit 09b966ee7c6389db635f793377cc50cb2fcb4962)

21 months agomxge_rss_ethp_z8e_fw_modevent: eliminate write only variable parent
Warner Losh [Fri, 8 Jul 2022 17:53:31 +0000 (11:53 -0600)]
mxge_rss_ethp_z8e_fw_modevent: eliminate write only variable parent

Sponsored by: Netflix

(cherry picked from commit 273676a44ca9ea311492fcf258c347deccfad71f)

21 months agomxge_rss_eth_z8e_fw_modevent: eliminate write only variable parent
Warner Losh [Fri, 8 Jul 2022 17:53:31 +0000 (11:53 -0600)]
mxge_rss_eth_z8e_fw_modevent: eliminate write only variable parent

Sponsored by: Netflix

(cherry picked from commit 5f136a4c01496cd05e01b39c3a19e9877d2ec8ee)

21 months agomxge_ethp_z8e_fw_modevent: eliminate write only variable parent
Warner Losh [Fri, 8 Jul 2022 17:53:31 +0000 (11:53 -0600)]
mxge_ethp_z8e_fw_modevent: eliminate write only variable parent

Sponsored by: Netflix

(cherry picked from commit 886bc93da861ab06f341fb2d36d9592ddfaaadb6)

21 months agomxge_eth_z8e_fw_modevent: eliminate write only variable parent
Warner Losh [Fri, 8 Jul 2022 17:53:31 +0000 (11:53 -0600)]
mxge_eth_z8e_fw_modevent: eliminate write only variable parent

Sponsored by: Netflix

(cherry picked from commit 498276b4b430184e7d6c578f45fe80eb774cde24)

21 months agomge: eliminate write only variables ifp, sc and error
Warner Losh [Fri, 8 Jul 2022 17:53:31 +0000 (11:53 -0600)]
mge: eliminate write only variables ifp, sc and error

Sponsored by: Netflix

(cherry picked from commit f8967810f5b5806c59fb6c8dbcc123dbc9256bb3)

21 months agorx8803_settime: remove write only variable bus
Warner Losh [Fri, 8 Jul 2022 17:53:30 +0000 (11:53 -0600)]
rx8803_settime: remove write only variable bus

Sponsored by: Netflix

(cherry picked from commit 875145ffd48e1cad1e3aa2ee6c134d45523558b0)

21 months agotca6416: remove write only sc
Warner Losh [Fri, 8 Jul 2022 17:53:30 +0000 (11:53 -0600)]
tca6416: remove write only sc

Sponsored by: Netflix

(cherry picked from commit 22127c7c1b9c0f8feb73f13a829b8b757f2274eb)

21 months agopmc_save_user_callchain: eliminate write only td variable
Warner Losh [Fri, 8 Jul 2022 17:53:30 +0000 (11:53 -0600)]
pmc_save_user_callchain: eliminate write only td variable

Sponsored by: Netflix

(cherry picked from commit 6ca6b8ea523daa6f17e010711458800f30d2e1ee)

21 months agohpen_battery_strenght_cb: eliminate write only data variable
Warner Losh [Fri, 8 Jul 2022 17:53:30 +0000 (11:53 -0600)]
hpen_battery_strenght_cb: eliminate write only data variable

Sponsored by: Netflix

(cherry picked from commit 92ec9782ac9739df8967acaaee114a68e134d8ee)

21 months agomx25l_task: eliminate dev write only variable
Warner Losh [Fri, 8 Jul 2022 17:53:30 +0000 (11:53 -0600)]
mx25l_task: eliminate dev write only variable

Sponsored by: Netflix

(cherry picked from commit edcced8ab790ee677130166fa060d96c4eb31550)

21 months agofd_probe: only define unit on x86, other platforms don't use this code
Warner Losh [Fri, 8 Jul 2022 17:53:30 +0000 (11:53 -0600)]
fd_probe: only define unit on x86, other platforms don't use this code

Sponsored by: Netflix

(cherry picked from commit 05d3c5fd182eeb33075ee14e2802c94882dc2c41)

21 months agoe6000sw_set_atustat: eliminate write only ret variable
Warner Losh [Fri, 8 Jul 2022 17:53:30 +0000 (11:53 -0600)]
e6000sw_set_atustat: eliminate write only ret variable

Sponsored by: Netflix

(cherry picked from commit 9a2e6ca6ef82128ed2b7b9c7e8e3a9a6c459fb45)

21 months agocyapa_raw_input: elimmminate write only k variable
Warner Losh [Fri, 8 Jul 2022 17:53:30 +0000 (11:53 -0600)]
cyapa_raw_input: elimmminate write only k variable

Sponsored by: Netflix

(cherry picked from commit 3ca3bb576b48667a694b1eab229870697586bb5d)

21 months agobwn_lo_measure_gain_values: eliminate write only trsw_rx variable
Warner Losh [Fri, 8 Jul 2022 17:53:29 +0000 (11:53 -0600)]
bwn_lo_measure_gain_values: eliminate write only trsw_rx variable

Sponsored by: Netflix

(cherry picked from commit a9e022d3d75e33f27c3e6bbdc2445bf7c8800994)

21 months agobhnd_nvram_store_export_child: eliminate num_props write only variable
Warner Losh [Fri, 8 Jul 2022 17:53:29 +0000 (11:53 -0600)]
bhnd_nvram_store_export_child: eliminate num_props write only variable

Sponsored by: Netflix

(cherry picked from commit 87a4328651b4e5f9114a7485cf67a3a300f668f3)

21 months agobhnd_pmu_sdiod_drive_strength_init: eliminate write only intr_val variable
Warner Losh [Fri, 8 Jul 2022 17:53:29 +0000 (11:53 -0600)]
bhnd_pmu_sdiod_drive_strength_init: eliminate write only intr_val variable

Sponsored by: Netflix

(cherry picked from commit 5466363900d28e473fa9d240ba15f2d5888fd045)

21 months agobhnd_pwrctl_attach: eliminate write only bus variable
Warner Losh [Fri, 8 Jul 2022 17:53:29 +0000 (11:53 -0600)]
bhnd_pwrctl_attach: eliminate write only bus variable

Sponsored by: Netflix

(cherry picked from commit 9af048a0b154685b280f21f948f693dc2971c860)

21 months agofdt_win_process_child: eliminate write only size variable
Warner Losh [Fri, 8 Jul 2022 17:53:29 +0000 (11:53 -0600)]
fdt_win_process_child: eliminate write only size variable

Sponsored by: Netflix

(cherry picked from commit e10ac1ed2cae458f25e437fb166b4f03bddcd358)

21 months agoplatform_mpp_init: eliminate write only tuples variable
Warner Losh [Fri, 8 Jul 2022 17:53:29 +0000 (11:53 -0600)]
platform_mpp_init: eliminate write only tuples variable

Sponsored by: Netflix

(cherry picked from commit 624f60ca034505f4274a4232817062f7f6d6570c)

21 months agomv_rtc_attach: eliminate write only unit variable
Warner Losh [Fri, 8 Jul 2022 17:53:29 +0000 (11:53 -0600)]
mv_rtc_attach: eliminate write only unit variable

Sponsored by: Netflix

(cherry picked from commit b20f0f724734b8dddde2957b39c92720a63430ac)

21 months agovfp_init: eliminate fpexc write only variable
Warner Losh [Fri, 8 Jul 2022 17:53:29 +0000 (11:53 -0600)]
vfp_init: eliminate fpexc write only variable

Sponsored by: Netflix

(cherry picked from commit feb08ab0cf847600e64a928e55a5ae1e5fd028cf)

21 months agosendsig: eliminate write only code variable
Warner Losh [Fri, 8 Jul 2022 17:53:29 +0000 (11:53 -0600)]
sendsig: eliminate write only code variable

Sponsored by: Netflix

(cherry picked from commit 80f33a69a8653cb9a384cec12ad55081f8e81905)

21 months agoget_cachetype_cp15: eliminate write only multilier
Warner Losh [Fri, 8 Jul 2022 17:53:28 +0000 (11:53 -0600)]
get_cachetype_cp15: eliminate write only multilier

Sponsored by: Netflix

(cherry picked from commit 97663c8d9e898d176d0b36dcd35f30ec1b874d2f)

21 months agoARMADAXP: Add extres pseudo devices to some kernel
Warner Losh [Fri, 8 Jul 2022 17:53:28 +0000 (11:53 -0600)]
ARMADAXP: Add extres pseudo devices to some kernel

Add extres and related pseudo devices to allow this to compile.

Sponsored by: Netflix
PR: 262417

(cherry picked from commit 04bb568fdcd40b201395df198e3498b55377b78b)

21 months agosnp(4): implement detach
Konstantin Belousov [Sun, 25 Sep 2022 11:34:17 +0000 (14:34 +0300)]
snp(4): implement detach

PR: 257964

(cherry picked from commit 550e01c552474babae468011191ecc5130cc153e)

21 months agosnp(4): properly report detached/revoked ttys
Konstantin Belousov [Sat, 24 Sep 2022 20:23:31 +0000 (23:23 +0300)]
snp(4): properly report detached/revoked ttys

PR: 257964

(cherry picked from commit bb4be76cf358246ef04ea8a67f38ff2a25b6c580)

21 months agomakefs: whitespace cleanup (remove space before tab)
Ed Maste [Tue, 20 Sep 2022 14:26:24 +0000 (10:26 -0400)]
makefs: whitespace cleanup (remove space before tab)

MFC after: 1 week

(cherry picked from commit 06a400d76be90bc0ccf6110a1e614d60bafb0f6c)

21 months agoclang: remove as(1) cross-reference from man page
Ed Maste [Tue, 20 Sep 2022 14:02:45 +0000 (10:02 -0400)]
clang: remove as(1) cross-reference from man page

PR: 265232
Reviewed by: dim
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differntial Revision: https://reviews.freebsd.org/D36634

(cherry picked from commit 61957f3a6f154592a079a4aa8e10c037878311ea)

21 months agoRemove obsolete SystemV dir from BSD.usr.dist
Ed Maste [Thu, 29 Sep 2022 15:56:25 +0000 (11:56 -0400)]
Remove obsolete SystemV dir from BSD.usr.dist

/usr/share/zoneinfo/SystemV is removed via ObsoleteFiles as of commits
da038df8c92b and 57338837aef5, so do not create it in the first place.

PR: 266666
Fixes: da038df8c92b ("share/zoneinfo: don't build obsolete...")
MFC after: 3 days

(cherry picked from commit b4d15fdd53d7a30ea7ce7e6903ed547f00200719)

21 months agorb_tree: reduce duplication in balancing code
Doug Moore [Thu, 8 Sep 2022 04:46:19 +0000 (23:46 -0500)]
rb_tree: reduce duplication in balancing code

Change RB_INSERT_COLOR and RB_REMOVE_COLOR so that the blocks of code
that are identical except for left and right being exchanged are made
only one block with a variable to indicate left- or right-handedness.

Rename RB macros so that those not intended for external use begin
with an underscore.

Add comments to the balancing code so that another might understand it.

Reviewed by: alc, kib
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D36393

(cherry picked from commit d0354fa7b6b1931afe1806bd0bfe3ba83e2aeb00)

21 months agorb_tree: silence unused function warnings
Doug Moore [Sun, 18 Sep 2022 08:34:47 +0000 (03:34 -0500)]
rb_tree: silence unused function warnings

With DIAGNOSTIC set a kernel build generates warnings about the
defined-but-unused RB_RANK method. Don't set _RB_DIAGNOSTIC
automatically, to silence these warnings.

Reported by: mjguzik@gmail.com
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D36617

(cherry picked from commit 14696d81f163dacfcdaf42171556ebfd15416fb9)

21 months agorb_tree: test rank balance
Doug Moore [Thu, 8 Sep 2022 02:40:05 +0000 (21:40 -0500)]
rb_tree: test rank balance

With _RB_DIAGNOSTIC defined, provide an RB_RANK method to compute the
rank of a node in an rb-tree, if the subtree rooted at that node is
rank-balanced, and -1 otherwise.

In rb_test, rewrite a bit to avoid malloc/free and nondeterministic
running times because of randomness. Allocate all the nodes on the
stack, and shuffle a set of keys to get randomness for the testing.

Add a rank-balance check for the completed tree.

Reviewed by: markj
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D36484

(cherry picked from commit 2c545cf3b06310e248dd4427f31e73f0bc1ad504)

21 months agosched_4bsd: Fix a racy thread state modification
Mark Johnston [Fri, 23 Sep 2022 23:41:30 +0000 (19:41 -0400)]
sched_4bsd: Fix a racy thread state modification

When a thread switching off-CPU is migrating to a remote CPU,
sched_switch() may trigger a rescheduling of the thread currently
running on that CPU.  When doing so, it must ensure that that thread is
locked before modifying thread state.  If the thread's lock is not the
scheduler lock, then the thread is in the process of switching off-CPU
and no extra effort is needed, and the initiator does not hold the
thread's lock and thus should not modify any thread state.

Reported and tested by: Steve Kargl

(cherry picked from commit c2d27b0ec7000d28b4f31148005ccfe371f47db3)

21 months agoarm64: Ignore 1GB mappings in pmap_advise()
Mark Johnston [Sat, 24 Sep 2022 13:26:54 +0000 (09:26 -0400)]
arm64: Ignore 1GB mappings in pmap_advise()

For the same reason as commit 4c224f8e5f36cfad5a9af8db7c7acdecc3d4c7b5.

(cherry picked from commit 89a2ef4d5226135deb89cececdf32d55812d84fd)

21 months agoamd64: Ignore 1GB mappings in pmap_advise()
Mark Johnston [Sat, 24 Sep 2022 13:20:48 +0000 (09:20 -0400)]
amd64: Ignore 1GB mappings in pmap_advise()

This assertion can be triggered by usermode since vm_map_madvise()
doesn't force advice to be applied to an entire largepage mapping.  I
can't see any reason not to permit it, however, since MADV_DONTNEED and
_FREE are advisory and we can simply do nothing when a 1GB mapping is
encountered.

Reviewed by: alc, kib

(cherry picked from commit 4551cbbe9906812556501c541fef0d88b0398b27)

21 months agoamd64: Handle 1GB mappings in pmap_enter_quick_locked()
Mark Johnston [Sat, 24 Sep 2022 13:20:29 +0000 (09:20 -0400)]
amd64: Handle 1GB mappings in pmap_enter_quick_locked()

This code path can be triggered by applying MADV_WILLNEED to a 1GB
mapping.

Reviewed by: alc, kib

(cherry picked from commit 6c2e9f4c32a44f3c239aba346322d871097eaed0)

21 months agorpc.tlsclntd.8: Fix the RFC number now that it exists
Rick Macklem [Fri, 23 Sep 2022 23:59:29 +0000 (16:59 -0700)]
rpc.tlsclntd.8: Fix the RFC number now that it exists

The RFC for this finally got published and, therefore,
now has a number.  This patch puts this RFC number
in the man page.

This is a content change.

(cherry picked from commit 7652321b7909002877cabcaee56dc996814070e8)

21 months agorpc.tlsservd.8: Fix the RFC number now that it exists
Rick Macklem [Fri, 23 Sep 2022 23:53:36 +0000 (16:53 -0700)]
rpc.tlsservd.8: Fix the RFC number now that it exists

The RFC for this finally got published and, therefore,
now has a number.  This patch puts this RFC number
in the man page.

This is a content change.

(cherry picked from commit 423387bee26a1eda29f378a5829845e5fa975918)

21 months agomount_nfs.8: Fix the RFC number now that it exists
Rick Macklem [Sat, 24 Sep 2022 22:05:21 +0000 (15:05 -0700)]
mount_nfs.8: Fix the RFC number now that it exists

The RFC for this finally got published and, therefore,
now has a number.  This patch puts this RFC number
in the man page.

This is a content change.

(cherry picked from commit 0083eef31cecf57df1157833d63ec766c77dd949)

21 months agounbound: Vendor import 1.16.3
Cy Schubert [Thu, 29 Sep 2022 14:21:04 +0000 (07:21 -0700)]
unbound: Vendor import 1.16.3

Fixes CVE-2022-3204 'Non-Responsive Delegation Attack'.

Security: CVE-2022-3204
Security: https://nlnetlabs.nl/downloads/unbound/CVE-2022-3204.txt
Changelog: https://nlnetlabs.nl/news/2022/Sep/21/unbound-1.16.3-released/

Merge commit '0dde6f4f8e604df8c6fbdab8b4aadb5ddf80c76f' into unbound/main

(cherry picked from commit 4f5c8956cff4b18674006e6ac88bed0d04020723)

21 months agoTrack removal of Tokenring and FDDI media types from devd.cc.
Pau Amma [Thu, 22 Sep 2022 19:55:11 +0000 (19:55 +0000)]
Track removal of Tokenring and FDDI media types from devd.cc.

Fixes: eec02418d83b Remove support for FDDI and token ring media types in userland utilities.

Reviewed by: brooks, gjb, imp

Approved by: brooks (src), gjb (mentor, src), imp (src)

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

(cherry picked from commit f968cb140fcfa7b548abb5930dee81ba987ec503)

21 months agoFix CVE-2020-10188
Cy Schubert [Wed, 21 Sep 2022 21:38:08 +0000 (14:38 -0700)]
Fix CVE-2020-10188

Reviewed by: emaste
Obtained from: NetBSD 6cc1539c8028b
Differential Revision: https://reviews.freebsd.org/D36732

(cherry picked from commit 5760cb266e0ab04c221c2acdb4b6c4c141130ecd)