Commit Graph

273447 Commits

Author SHA1 Message Date
Colin Percival
1dee7c74d1 sysctl(8): Mention CTLFLAG_SKIP
`sysctl -a` does not print values with this flag.

Reviewed by:	debdrup
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D34615
2022-03-20 11:30:43 -07:00
Hans Petter Selasky
da3d4469ef mixer(8): Add shorthand syntax for setting the volume.
dev.volume=X[.X] can now also be written as dev=X[.X] .

Requested by:		hselasky@ and bsduck (FreeBSD forums)
Submitted by:		christos@
Differential Revision:	https://reviews.freebsd.org/D34612
Sponsored by:		NVIDIA Networking
2022-03-20 17:32:46 +01:00
Hans Petter Selasky
60bdfe9869 mixer(8): Remove [.volume] string from default printout.
Submitted by:		christos@
Differential Revision:	https://reviews.freebsd.org/D34591
Sponsored by:		NVIDIA Networking
2022-03-20 17:32:43 +01:00
Mariusz Zaborski
1e9ce60a6d cap_fileargs: silence warnings of unused variable
We still want to fetch the variable just to verify that the interface
is right.

Reported by:	pstef
2022-03-20 11:22:55 +01:00
Dimitry Andric
8e72f458c6 Fix llvm build after 1b3bef43e3, due to API change
After merging llvm commit b9ca73e1a8fd for PR 262608, it would fail to
compile with:

/usr/src/contrib/llvm-project/llvm/lib/IR/Operator.cpp:197:22: error: no member named 'isZero' in 'llvm::APInt'
   if (!IndexedSize.isZero()) {
        ~~~~~~~~~~~ ^

Upstream refactored their APInt class, and isZero() was one of the newer
methods which did not yet exist in llvm 13.0.0. Fix this by using the
older but equivalent isNullValue() method instead.

Fixes:		1b3bef43e3
MFC after:	3 days
2022-03-20 00:12:58 +01:00
Dimitry Andric
1b3bef43e3 Apply llvm fix for assertion compiling certain versions of Wine
Merge commit b9ca73e1a8fd from llvm git (by Stephen Tozer):

  [DebugInfo] Correctly handle arrays with 0-width elements in GEP salvaging

  Fixes an issue where GEP salvaging did not properly account for GEP
  instructions which stepped over array elements of width 0 (effectively a
  no-op). This unnecessarily produced long expressions by appending
  `... + (x * 0)` and potentially extended the number of SSA values used
  in the dbg.value. This also erroneously triggered an assert in the
  salvage function that the element width would be strictly positive.
  These issues are resolved by simply ignoring these useless operands.

  Reviewed By: aprantl

  Differential Revision: https://reviews.llvm.org/D111809

PR:		262608
Reported by:	Damjan Jovanovic <damjan.jov@gmail.com>
MFC after:	3 days
2022-03-19 20:59:04 +01:00
Dimitry Andric
2548237983 Revert upstream libcxxrt commit which can cause hangs on i386
This reverts upstream commit fd484be:

  Atomics cleanup (#11)

  We need to test exception specifiers but they're gone in C++17 so
  compile the tests with an older version of the standard.

  Rewrite the guard logic to be more idiomatic C++ and more
  comprehensible and make sure that atomics are used where necessary.

It looks like there are some corner cases in the i386 and/or 32-bit
atomics handling, which can make __cxa_guard_acquire() hang in certain
situations.

Reported by:	antoine
Obtained from:	https://github.com/libcxxrt/libcxxrt/commit/fd484be
Fixes:		56aaed388b
MFC after:	2 weeks
2022-03-19 20:47:29 +01:00
Ed Maste
e39ec8933b Add deprecation notices to ISA sound cards
ISA sound cards (and ISA itself) are long obsolete.  NYCBUG dmesgd has
no entries for any of these devices after 2005.

Add deprecation notices to device attach routines and man pages for:

snd_ad1816  Analog Devices AD1816 SoundPort
snd_ess     Ensoniq ESS
snd_gusc    Gravis UltraSound
snd_mss     Microsoft Sound System
snd_sbc     Creative Sound Blaster

Reviewed by:	cy, mav
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34604
2022-03-19 14:57:26 -04:00
hlh-restart
1b1bab0078 rtsx: Call rtsx_init() on resume.
MFC after:	3 days
2022-03-19 12:37:24 -04:00
Mateusz Guzik
6ff3e8a316 cache: add a comment about a realpath bug 2022-03-19 15:11:25 +00:00
Mateusz Guzik
eb574ba0b6 vfs: replace VFS_NOTIFY_UPPER_* macros with an enum 2022-03-19 13:15:55 +00:00
Mateusz Guzik
cceb91b025 vfs: add missing flags to db show mount 2022-03-19 12:04:44 +00:00
Mateusz Guzik
93a0ba8f49 vfs: retire the no longer used MNTK_LOOKUP_EXCL_DOTDOT flag
Reviewed by:	markj
Tested by:	pho (previous version)
Differential Revision:	https://reviews.freebsd.org/D34466
2022-03-19 10:47:29 +00:00
Mateusz Guzik
aeabf8d4b9 nullfs: hash insertion without vnode lock upgrade
Use the hash lock to serialize instead.

This enables shared-locked ".." lookups.

Reviewed by:	markj
Tested by:	pho (previous version)
Differential Revision:	https://reviews.freebsd.org/D34466
2022-03-19 10:47:10 +00:00
Mateusz Guzik
1cb0045c97 vfs: add MNTK_UNLOCKED_INSMNTQUE
Can be used when the fs at hand can synchronize insmntque with other
means than the vnode lock.

Reviewed by:	markj
Tested by:	pho (previous version)
Differential Revision:	https://reviews.freebsd.org/D34466
2022-03-19 10:46:40 +00:00
Kyle Evans
2218070b2c psci: finish psci_present implementation
This was already declared in psci.h, but it was never defined/set.  Do
this now, so we can use it to decide if enable-method in /cpus FDT nodes
should be inspected later on.  While we're here, convert it to a
boolean.

Reviewed by:	andrew (slightly earlier version)
Differential Revision:	https://reviews.freebsd.org/D34553
2022-03-18 22:04:32 -05:00
Kyle Evans
1236b04bb7 arm64: gic: disable the ITS if it's enabled prior to configuration
The ITS is defined to be disabled on a warm reset, but we may be coming
in via another kernel/hypervisor type setup where the ITS has been
previously configured then relinquished to the next kernel in the chain.

If it's enabled, the later configuration of GITS_BASER will almost
certainly fail -- clear it to prevent that.

Reviewed by:	andrew
Sponsored by:	Ampere Computing
Submitted by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D34546
2022-03-18 22:03:44 -05:00
Ed Maste
e9369d5fc9 Correct date in ObsoleteFiles.inc entry
Fixes:		92e6b4712b ("Retire broken snd_ds1 and ...")
2022-03-18 21:33:10 -04:00
Ed Maste
92e6b4712b Retire broken snd_ds1 and snd_maestro drivers
In 2012 joel@ reported[1] that these were not functional, and they do
not appear to have been fixed since.

[1] https://lists.freebsd.org/pipermail/freebsd-multimedia/2012-January/012751.html

Reported by:	joel
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
2022-03-18 20:33:19 -04:00
Ed Maste
1d7f6de5cf Update deprecation notice in snd_maestro, snd_ds1
These drivers are broken and have been scheduled for removal since 2012.
They will finally be removed before FreeBSD 14.

MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2022-03-18 20:32:11 -04:00
Ed Maste
ef5dec7cc7 Remove snd_aureal driver source
This driver was not finished when it was committed in 1999 and was never
connected to the build.

A version of the driver used to be available in ports as
audio/aureal-kmod, but it has been removed.  It did not build on FreeBSD
10.x or later and the binary objects it required were not available
after Google Code disappeared.

PR:		124343
Reported by:	joel
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2022-03-18 16:27:35 -04:00
Warner Losh
c46e47220c uefi(8): Note i386 is unsupported
We have no support for i386 booting at this time. Add that in the bugs section.

Sponsored by:		Netflix
2022-03-18 14:12:39 -06:00
Mateusz Piotrowski
fa1dab788d rc.subr.8: Format notes consistently
MFC after:	3 days
2022-03-18 15:22:58 +01:00
Andrew Gallatin
b50abe6bd4 namei: Treat non-tied KLDs as if they had INVARIANTS enabled
When working with a vendor to debug their kernel module,
I found that a non-tied kld which uses NDINIT will panic
due to "namei: bad debugflags " on a kernel compiled with
INVARIANTS because non-tied KLDs do not pick up the
initialization that is done in NDINIT_DBG/NDREINIT_DBG().

Fix this by making this initialization happen for non-KLD_TIED
as well as INVARIANTS

Reviewed by: mjg
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D34588
2022-03-18 10:14:14 -04:00
Mateusz Piotrowski
97aeda2243 zfskeys: Support autoloading of keys stored on ZFS
The zfskeys service script starts before the zfs service script, so that
dataset decryption keys are available when `zfs mount -a` is run. One of
the potential edge cases of this design is that if a key is stored on
ZFS it won't be loaded until `zfs mount -a` is issued.

In order to address that let's try to load the additional keys and mount
related ZFS datasets after the zfs script finishes its standard mounting
procedure.

PR:		262468
Reported by:	Graham Perrin <grahamperrin@gmail.com>
Reviewed by:	allanjude
Approved by:	allanjude (src)
Fixes:	33ff39796f Add zfskeys rc.d script for auto-loading encryption keys
MFC after:	3 days
Sponsored by:	Modirum
Sponsored by:	Klara Inc.
Differential Revision: https://reviews.freebsd.org/D34601
2022-03-18 14:53:52 +01:00
Hans Petter Selasky
5c6935a645 mixer.3: Fix spelling
Submitted by:		christos@
Differential Revision:	https://reviews.freebsd.org/D34378
MFC after:		1 week
Sponsored by:		NVIDIA Networking
2022-03-18 12:10:40 +01:00
Mateusz Piotrowski
20f0dabb71 uefi.8: Fix style
MFC after:	3 days
2022-03-18 11:53:10 +01:00
Mateusz Piotrowski
12912d0e0c uefi.8: Document i386 and riscv EFI bootloader names
Based on tools/boot/install-boot.sh.

MFC after:	2 weeks
2022-03-18 11:52:02 +01:00
Mateusz Piotrowski
e405ae3097 gptboot.8: Fix a typo and fix lint warnings
MFC after:	3 days
2022-03-18 11:35:04 +01:00
Roger Pau Monné
1ca34862dc x86/tsc: fetch frequency from CPUID when running on Xen
Introduce a helper to fetch the TSC frequency from CPUID when running
under Xen.

Since the TSC can also be initialized early when running as a Xen
guest pull out the call to tsc_init() from the
early_clock_source_init() handlers and place it in clock_init(), as
otherwise all handlers would call tsc_init() anyway.

Reviewed by: markj
Sponsored by: Citrix Systems R&D
Differential revision: https://reviews.freebsd.org/D34581
2022-03-18 10:21:04 +01:00
Piotr Pawel Stefaniak
8b1f5965d9 procstat: remove set but not used variable
In an earlier version of D26310, strcmp was strncmp.
2022-03-18 10:03:56 +01:00
Piotr Pawel Stefaniak
fde687c239 backlight: Remove set but not used variable 2022-03-18 10:03:55 +01:00
Mateusz Piotrowski
9ecf6e0f9f loader.efi: Improve the manual page
- Add SPDX tag
- Add a files section describing different locations related to the
  loader
- Add an example explaining how to install a new loader.efi to ESP
- Reference uefi(8)

Reviewed by:	tsoome
Reviewed by:	Pau Amma <pauamma@gundo.com>
Reviewed by:	Jose Luis Duran <jlduran@gmail.com>
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D34592
2022-03-18 09:55:13 +01:00
Peter Holm
314ebfa2e9 stress2: Limit console warnings 2022-03-18 07:34:07 +01:00
Peter Holm
bfdcd042bc stress2: Remove the memory disk after the fsck, not before 2022-03-18 07:28:58 +01:00
Robert Wing
3ebe110934 bhyve: sweep MAX_VMNAME
MAX_VMNAME is no longer used.

Reviewed by:	jhb
Differential Revision:	https://reviews.freebsd.org/D34292
2022-03-17 21:55:52 -08:00
Robert Wing
961e6a12ef bhyve/snapshot: limit snapshot filename to NAME_MAX
NAME_MAX is a better fit since strcat_extension() constructs the
filename of the snapshot file.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D34291
2022-03-17 21:51:31 -08:00
Robert Wing
3efc45f34e libvmm: constify vm_get_name()
Allows callers of vm_get_name() to retrieve the vm name without having
to allocate a buffer.

While in the vicinity, do minor cleanup in vm_snapshot_basic_metadata().

Reviewed by:	jhb
Differential Revision:	https://reviews.freebsd.org/D34290
2022-03-17 21:38:21 -08:00
Robert Wing
ee0ebaa420 bhyvectl: drop vm_get_name()
Grab the vm name from bhyvectl's --vm flag instead.

Reviewed by:	jhb
Differential Revision:	https://reviews.freebsd.org/D34399
2022-03-17 21:22:43 -08:00
Ed Maste
24cf089ab4 snd_hda.4: correct typos
MFC after:	1 week
2022-03-17 20:11:26 -04:00
Ed Maste
06731139ca hda: add patch for Framework laptop headphone jack
For Framework laptops built after Oct 2021 (like mine) that have a Tempo
Semiconductor 92HD95B codec rather than Realtek ALC295 (see
https://frame.work/ca/en/blog/solving-for-silicon-shortages).

As we do for many other laptops, put the headphone jack and speakers in
the same association by default so that the generic sound device
automatically switches between them.  Also specify the jack colour and
location.

Reviewed by:	markj
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34596
2022-03-17 19:22:02 -04:00
Kristof Provost
d234b011a8 netinet tests: only log critical errors from scapy
See also a26e895f3d.

MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2022-03-17 23:34:12 +01:00
Robert Wing
8772a9117b mount.8: mention that the snapshot option is exclusive
When using the snapshot option, all other options are ignored. This
update reflects changes made in ab2dbd9b87.

Reviewed by:	0mp, mckusick
Differential Revision:	https://reviews.freebsd.org/D34584
2022-03-17 14:33:03 -08:00
Mark Johnston
c0b98fe16f fusefs: Initialize a pad word in the mknod message
Reported by:	Jenkins (KMSAN job)
Reviewed by:	asomers
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34593
2022-03-17 18:30:21 -04:00
Kristof Provost
3c3a19d1f4 pf tests: Test retrieving nested nat-anchors
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2022-03-17 22:37:06 +01:00
Kristof Provost
a632d9e360 pfctl: fix retrieving nested nat-anchors
When retrieving nat rules in anchors we need to set the path just like
we do for regular rules.

MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2022-03-17 22:37:06 +01:00
Kristof Provost
d58d2e403d pf tests: Test setting and retrieving nested anchors
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2022-03-17 22:37:06 +01:00
Matteo Riondato
cd8438e5a3 pfctl: fix retrieving nested anchors
PR:		262622
MFC after:	1 week
Reviewed by:	kp
2022-03-17 22:37:05 +01:00
Mark Johnston
077564cfdb hdac: Handle interrupts racing with device suspend
- Avoid looping forever if a concurrent reset causes a read of the
  interrupt status register to return all ones.
- Lock the softc before reading the interrupt status, so as to avoid a
  similar infinite loop in hdac_one_intr().

This fixes suspend-to-S3 on some laptops.

PR:		261207
Reviewed by:	mav, imp
Tested by:	uqs
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34117
2022-03-17 15:39:00 -04:00
firk
28d08dc7d0 clock_gettime: Fix CLOCK_THREAD_CPUTIME_ID race
Use a spinlock section instead of a critical section to synchronize with
statclock().  Otherwise the CLOCK_THREAD_CPUTIME_ID clock can appear to
go backwards.

PR:		262273
Reviewed by:	markj
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D34568
2022-03-17 15:39:00 -04:00