We're logging when we start a reset, but not when we complete it, nor
the result. Create now log a success or timed_out event for the reset.
Currently, the only detectable error we have from reset is 'failure to
become ready in time,' though the code looks like it might be more
generic. Log this and if we ever have other failure modes, change the
logging to devd when that happens.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D44211
Change the devctl events slightly for the controller. SMART errors will
log the changed bits in the NVME SMART Critical Warning State as its
event.
Reset will now emit 'event=start'. Soon more.
Sponsored by: Netflix
Reviewed by: mav
Differential Revision: https://reviews.freebsd.org/D44210
Split the devctl aspect of things out to its own function in
nvme_ctrlr_devctl_log. In preparing to document this, and based on
actual use, we want something different for the SMART errors, so this
will facilitate that.
Sponsored by: Netflix
Reviewed by: chuck, mav
Differential Revision: https://reviews.freebsd.org/D44209
__init_elf_aux_vector is now complied statically so don't try to export
it from the dynamic library.
Fixes: 8271d9b99a libsys: remove usage of pthread_once and _once_stub
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D44237
The undocumented yield system call has never been implemented via libc
or libsys (except accidentally for <15 minutes in 1998 between commits
abd529ceba and 0db2fac06a). Avoid trying to export it now to avoid
failures when linking with --no-undefined-version.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D44236
Unlike other architectures, i386 only defined syscall() and not
_syscall() or __sys_syscall(). The syscall() function then invoked the
desired system call directly rather than invoking syscall(2). Keep the
latter as it's marginally more efficent, but also create the
conventional _syscall() and __sys_syscall() stubs.
This avoids the need to special case syscall(2) in the symbol list
generation in libsys.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D44235
This file is functionally identical to the stub generated by
Makefile.sys once the MD version is removed.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D44234
This file is functionally identical to the stub generated by
Makefile.sys once the MD version is removed.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D44233
This file is functionally identical to the stub generated by
Makefile.sys once the MD version is removed.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D44232
For one reason or another these symbols aren't present so don't try to
make them available for linkage.
In the case of libroken these seem to be compatability bits we don't
need a thus don't compile. For others it seems to rot upstream, but
I've not investigated deeply.
Reviewed by: cy
Differential Revision: https://reviews.freebsd.org/D44246
This symbol table entry came in with the 1.5 import (commit
7c450da7b4), but the only other mention is a commented out entry in
lib/wind/libwind-exports.def.
Reviewed by: cy
Differential Revision: https://reviews.freebsd.org/D44245
Remove the include that crept in by accident
Clang complains about CLOCK_BOOTTIME being the same for now as
CLOCK_UPTIME, so remove CLOCK_BOOTTIME and leave a comment for
what to do when CLOCK_BOOTTIME will be different for real.
This is a common use case when using timerfd_create to actually use
it with CLOCK_BOOTTIME on linux which is CLOCK_UPTIME for us.
Note that currently on freebsd CLOCK_BOOTTIME is CLOCK_UPTIME, but the
semantic is supposed to be different, this has to be fixed later.
Tested with the fnott notification software
Reviewed by: des, imp
Differential Revision: https://reviews.freebsd.org/D44253
The checksum code assumed that struct ustar_header filled an entire
block and calculcated the checksum based on the size of the structure.
The header is in fact only 500 bytes long while the checksum covers
the entire block (“logical record” in POSIX terms). Add padding and
an assertion, and clean up the checksum code.
MFC after: 3 days
Sponsored by: Juniper Networks, Inc.
Sponsored by: Klara, Inc.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D44226
* Reject hard or soft links with an empty target path. Currently, a
debugging kernel will hit an assertion in tarfs_lookup_path() while
a non-debugging kernel will happily create a link to the mount root.
* Use a temporary variable to store the result of the link target path,
and copy it to tnp->other only once we have found it to be valid.
Otherwise we error out after creating a reference to the target but
before incrementing the target's reference count, which results in a
use-after-free situation in the cleanup code.
* Correctly return ENOENT from tarfs_lookup_path() if the requested
path was not found and create_dirs is false. Luckily, existing
callers did not rely solely on the return value.
MFC after: 3 days
PR: 277360
Sponsored by: Juniper Networks, Inc.
Sponsored by: Klara, Inc.
Reviewed by: sjg
Differential Revision: https://reviews.freebsd.org/D44161
The firmware package version currently appears as "Unknown" through
the sysctl interface. The parsing logic for extracting the firmware
package version from the package log has been modified to ensure
compatibility with all controllers.
Reviewed by: imp
Approved by: imp
Differential revision: https://reviews.freebsd.org/D42950
ZED uses vdev props for setting disk fault/degrade thresholds, this
patch enables zfsd to use the same vdev props for these same tasks.
OpenZFS on Linux is using vdev props for ZED disk fault/degrade
thresholds. Originally the thresholds supported were for io and checksum
events and recently this was updated to process slow io events as
well, see
cbe882298e
This patch enables us to use the same vdev props in zfsd as ZED uses.
After this patch is merged both OSs will use the same vdev props to set
retirement thresholds.
It's probably important to note that the threshold defaults are
different between OS. I've kept the existing defaults inside zfsd and
DID NOT match them to what ZED does.
Differential Revision: https://reviews.freebsd.org/D44043
MFC after: 2 weeks
Relnotes: yes
Reviewed by: asomers, allanjude
Sponsored by: Axcient
Submitted by: Alek Pinchuk <apinchuk@axcient.com>
In modes -p or -s, add an option -l to start each line
with a device name separated with a tab. Update the manual page.
Add an example to list names with corresponding serial numbers:
diskinfo -ls /dev/da?
MFC after: 2 weeks
Visibility into the contents of the buffer when a write(2) has failed
can be immensely useful in debugging IPC issues -- pushing this to
discuss the idea, or maybe an alternative where we can set a flag like
KTRFAC_ERRIO to enable it.
When a genio event is potentially raised after an error, currently we'll
just free the uio and return. However, such data can be useful when
debugging communication between processes to, e.g., understand what the
remote side should have grabbed before closing a pipe. Tap out the
entire buffer on failure rather than simply discarding it.
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D43799
We'll handle these just as we do kevents, one per line with subsequent
lines indented sufficiently to distinguish them from the upcoming
return value.
Sample, with indentation stripped and revents changed to '...' in the
first one to keep the line length down:
CALL poll(0x820610560,0x3,0)
STRU struct pollfd[] = { { fd=0, events=0x1<POLLIN>, revents=0x11<...>
{ fd=1, events=0x4<POLLOUT>, revents=0x4<POLLOUT>}
{ fd=-1, events=0x4<POLLOUT>, revents=0} }
RET poll 2
Reviewed by: bapt, jhb
Differential Revision: https://reviews.freebsd.org/D44160
We'll use this in another change to read pollfd arrays coming from a
successful poll(2) operation.
Reviewed by: bapt, jhb
Differential Revision: https://reviews.freebsd.org/D44159
We do this in kern_poll() to include freebsd32 but exclude the linux
compat layer. The ABI should be the same, but the POLL constants are
probably different or should be assumed so.
Reviewed by: bapt, jhb
Differential Revision: https://reviews.freebsd.org/D44158
Inline generic_pcie_translate_resource_common into its sole caller.
No functional change.
Reviewed by: tuexen
Differential Revision: https://reviews.freebsd.org/D44206
The generic_pcie_containing_range helper added in commit d79b6b8ec2
assumed that the passed in (start, end) range used to locate the
containing mapping range was a valid address range (with end >=
start). The previous version of
generic_pcie_translate_resource_common only used the start address to
locate a mapping range, so the end address of 0 did not matter, but an
end of 0 now causes the first range to match and an incorrect
translation for resources using a later range.
PR: 277211
Reported by: dch, tuexen
Reviewed by: tuexen
Fixes: d79b6b8ec2 pci_host_generic: Don't rewrite resource start address for translation
Differential Revision: https://reviews.freebsd.org/D44205
This makes it more obvious which functions modify fields in this struct.
Reviewed by: imp, kib
Obtained from: CheriBSD
Differential Revision: https://reviews.freebsd.org/D44214
The paper "T-RACKs: A Faster Recovery Mechanism for
TCP in Data Center Networks" has nothing to do with
our TCP RACK implementation, so remove it.
Reported by: tuexen
MFC after: 3 days
The private symbol __collate_load_error was removed in 2015 in commit
2a6abeebef. While it had previously been accidently removed in 2011
(commit 3c87aa1d3dc1a) and restored in 2012 (commit bb4317bf3c) I
think it's time to write it off after four major releases without it.
Fixes: 2a6abeebef The collate functions within libc have...
Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D44182
[PEI] Don't zero out noreg operands
A tail call may have $noreg operands.
Fixes a crash.
Reviewed By: xgupta
Differential Revision: https://reviews.llvm.org/D156485
This should fix an assertion failure building qemu, specifically those
parts using -fzero-call-used-regs.
Reported by: Daniel Berrangé <dan-freebsd@berrange.com>
PR: 277474
MFC after: 3 days
This callback shouldn't be modifying any of the arguments.
Reviewed by: imp, kib, emaste, jhb
Obtained from: CheriBSD
Differential Revision: https://reviews.freebsd.org/D44193
On this platform early console access is possible via SBI. Follow recent
changes to EARLY_PRINTF option and give it a named constant.
Update the commented option in GENERIC so that it compiles.
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D44100