- 26 Oct, 2021 1 commit
-
-
Rick Macklem authored
There was a case in nfscl_doiods() where the function would return without releasing the delegation shared lock, if it was aquired by the call to nfscl_getstateid(). This patch adds that release. I have never observed a failure due to this missing release, so I do not know if it ever happens in practice. However, since the pNFS client is not yet heavily used, it might be the case. Found by code inspection during a recent NFSv4 IETF working group testing event. MFC after: 2 week
-
- 25 Oct, 2021 23 commits
-
-
Steve Kargl authored
Both IEEE-754 2008 and ISO/IEC TS 18661-4 define the half-cycle trignometric functions cospi, sinpi, and tanpi. The attached patch implements cospi[fl], sinpi[fl], and tanpi[fl]. Limited testing on the cospi and sinpi reveal a max ULP less than 0.89; while tanpi is more problematic with a max ULP less than 2.01 in the interval [0,0.5]. The algorithms used in these functions are documented in {ks}_cospi.c, {ks}_sinpi.c, and s_tanpi.c. Note. I no longer have access to a system with ld128 and adequate support to compile and test the ld128 implementations of these functions. Given the almost complete lack of input from others on improvements to libm, I doubt that anyone cares. If someone does care, the ld128 files contain a number of FIXME comments, and in particular, while the polynomial coefficients are given I did not update the polynomial algorithms to properly use the coefficients. PR: 218514 MFC after: 2 weeks
-
Ed Maste authored
Previously strip reported a somewhat cryptic error for empty files: strip: elf_begin() failed: Invalid argument Add a special case to treat empty files as with an unknown file format. This is consistent with llvm-strip. GNU strip produces no output which does not seem like useful behaviour (but it does exit with status 1). Reported by: andrew Reviewed by: markj MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32648
-
Michael Tuexen authored
Some new reno functions use the internal data, but are also called from functions of other CC modules. Ensure that in this case, the internal data is not accessed. Reported by: syzbot+1d219ea351caa5109d4b@syzkaller.appspotmail.com Reported by: syzbot+b08144f8cad9c67258c5@syzkaller.appspotmail.com Reviewed by: rrs Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D32649
-
Bjoern A. Zeeb authored
Add a dummy MODULE_SUPPORTED_DEVICE define as we do for other MODULE_* macros. This is needed by a wireless driver. MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D32641
-
Ed Maste authored
Previously we updated the conection's conn_max_recv_data_segment_length only when we received a response containing MaxRecvDataSegmentLength from the target. If the target did not send MaxRecvDataSegmentLength then we left conn_max_recv_data_segment_length at the default (i.e., 8192). A target could then send more data than that defult (up to our advertised maximum), and we would drop the connection. RFC 7143 specifies that MaxRecvDataSegmentLength is Declarative, not negotiated. Just set conn_max_recv_data_segment_length to our advertised value in login_negotiate(). PR: 259355 Reviewed by: mav MFC after: 1 week Fixes: a15fbc90 ("Alike to r312190 decouple iSCSI...") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32605
-
Bjoern A. Zeeb authored
Add bcd2bin() as linuxkpi_bcd2bin(). Libkern does provide a bcd2bin() which cannot be used leaving us with a conflict (see comment in file). Fortunately this is only seen in one driver so far and it seems easier to drop this in and change a single line in the driver than to add this inline in the driver. MFC after: 3 days Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D32647
-
Bjoern A. Zeeb authored
Rename the struct pci_driver {} field got the list_head from links to node as a driver is actually initialsing this to {} which seems questionable but it will at least make us match the Linux structure field name. MFC after: 3 days Reviewed by: manu, hselasky Differential Revision: https://reviews.freebsd.org/D32645
-
Bjoern A. Zeeb authored
Make the struct pci_dev argument to the pci_{read,write}_config*() functions "const" to match the Linux definition as some drivers try to pass in a const argument which we currently fail to honor. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D32644
-
Bjoern A. Zeeb authored
Add netdev_features.h as a spearate file from the future netdevice.h implementation to avoid include problems with a future skbuff.h. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D32643
-
Bjoern A. Zeeb authored
Add a dummy simple_open() to fs.h as we have for other (unsupported) functions. This is needed by a wireless driver. MFC after: 3 days Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D32642
-
Bjoern A. Zeeb authored
netdev_priv() is a LinuxKPI function which was used with the old ifnet linux/netdevice.h implementation which was not adaptable to modern Linux drviers unless rewriting them for ifnet in first place which defeats the purpose. Rename the netdev_priv() calls in mlx4 to mlx4_netdev_priv() returning the ifnet softc to avoid conflicting symbol names with different implementations in the future. MFC after: 3 days Reviewed by: hselasky, kib Differential Revision: https://reviews.freebsd.org/D32640
-
Mateusz Guzik authored
Sponsored by: Rubicon Communications, LLC ("Netgate")
-
Mateusz Guzik authored
Unbreaks building TEGRA124 Sponsored by: Rubicon Communications, LLC ("Netgate")
-
Gleb Smirnoff authored
It was here since divert(4) was introduced, probably just came with a protocol definition boilerplate. There is no useful socket option that can be set or get for a divert socket. Reviewed by: donner Differential Revision: https://reviews.freebsd.org/D32608
-
Gleb Smirnoff authored
This function does nothing since 97d8d152. It was introduced in 252f24a2 with a sidenote "may not be needed". Reviewed by: donner Differential Revision: https://reviews.freebsd.org/D32608
-
Konstantin Belousov authored
Sponsored by: The FreeBSD Foundation MFC after: 1 week
-
Konstantin Belousov authored
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D31163
-
Konstantin Belousov authored
For making the call faster, do not count active/inactive object queues, and do not report vnode info if any (for tmpfs). Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D31163
-
Konstantin Belousov authored
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D31163
-
Konstantin Belousov authored
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D31163
-
Mark Johnston authored
Previously the MSR-based timecounter was registered during SI_SUB_HYPERVISOR, i.e., very early during boot, and before SI_SUB_LOCK. After commit 621fd9dc this triggers a panic since the timecounter list lock is not yet initialized. The hyperv timecounter does not need to be registered so early, so defer that to SI_SUB_DRIVERS, at the same time the hyperv TSC timecounter is registered. Reported by: whu Approved by: whu Fixes: 621fd9dc ("timecounter: Lock the timecounter list") MFC after: 1 week Sponsored by: The FreeBSD Foundation
-
Bjoern A. Zeeb authored
Add strreplace() needed by a driver. MFC after: 3 days Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D32597
-
Bjoern A. Zeeb authored
Analogous to the other sized version of kstrto[u]<type>() and kstrtobool_from_user() add the "u8" versions needed by a driver. MFC after: 3 days Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D32598
-
- 24 Oct, 2021 4 commits
-
-
Mateusz Piotrowski authored
This is follow-up to commits e290182b and 1f7d11e6.
-
Hans Petter Selasky authored
When EVDEV_SUPPORT was introduced, the USB transfers may be running after the main FIFO is closed. In connection to this a race may appear which can lead to use-after-free scenarios. Fix this for all FIFO consumers by initializing and resetting the FIFO queues under the lock used by the client. Then the client driver will see an empty queue in all cases a race may appear. Found by: pho@ MFC after: 1 week Sponsored by: NVIDIA Networking
-
Hans Petter Selasky authored
s/MIX_STATUS_XXX/MIX_MODE_XXX/g Differential Revision: https://reviews.freebsd.org/D32548 Submitted by: christos@ Sponsored by: NVIDIA Networking
-
Jason A. Harmening authored
unionfs uses a per-directory hashtable to cache subdirectory nodes. Currently this hashtable is looked up using the directory name, but since unionfs nodes aren't removed from the cache until they're reclaimed, this poses some problems. For example, if a directory is created on a unionfs mount shortly after deleting a previous directory with the same path, the cache may end up reusing the node for the previous directory, including its upper/lower FS vnodes. Operations against those vnodes with then likely fail because the vnodes represent deleted files; for example UFS will reject VOP_MKDIR() against such a vnode because its effective link count is 0. This may then manifest as e.g. mkdir(2) or open(2) returning ENOENT for an attempt to create a file under the re-created directory. While it would be possible to fix this by explicitly managing the name-based cache during delete or rename operations, or by rejecting cache hits if the underlying FS vnodes don't match those passed to unionfs_nodeget(), it seems cleaner to instead hash the unionfs nodes based on their underlying FS vnodes. Since unionfs prefers to operate against the upper vnode if one is present, the lower vnode will only be used for hashing as long as the upper vnode is NULL. This should also make hashing faster by eliminating string traversal and using the already-computed hash index stored in each vnode. While here, fix a couple of other cache-related issues: --Remove 8 bytes of unnecessary baggage from each unionfs node by getting rid of the stored hash mask field. The mask is knowable at compile time. --When a matching node is found in the cache, reference its vnode using vrefl() while still holding the vnode interlock. Previously unionfs_nodeget() would vref() the vnode after the interlock was dropped, but the vnode may be reclaimed during that window. This caused intermittent panics from vn_lock(9) during unionfs stress testing. Reviewed by: kib, markj Tested by: pho Differential Revision: https://reviews.freebsd.org/D32533
-
- 23 Oct, 2021 1 commit
-
-
Kirk McKusick authored
An ordered series of BIO_READ and BIO_WRITE operations are typically done as: while (work to do) { setup bp for I/O g_io_request(bp, consumer); biowait(bp); } Here you need to have biodone() called at the completion of the I/O to set the BIO_DONE flag and awaken the biowait(). The obvious way to do this would be to set bio_done = biodone, but biodone() will only take the desired action if bio_done == NULL. The relevant code at the end of biodone() is: done = bp->bio_done; if (done == NULL) { mtxp = mtx_pool_find(mtxpool_sleep, bp); mtx_lock(mtxp); bp->bio_flags |= BIO_DONE; wakeup(bp); mtx_unlock(mtxp); } else done(bp); This code would infinitely recurse if biodone() is specified as the routine to use at completion. So before this change, a wrapper done function had to be written: static void g_io_done(struct bio *bp) { bp->bio_done = NULL; biodone(bp); bp->bio_done = g_io_done; } This commit changes if (done == NULL) to if (done == NULL || done == biodone) which eliminates the need for the wrapper function. Reviewed by: kib Sponsored by: Netflix
-
- 24 Oct, 2021 1 commit
-
-
Robert Wing authored
vfs_getrootfsid() was removed in 245efbba Reviewed by: mjg Differential Revision: https://reviews.freebsd.org/D32606
-
- 23 Oct, 2021 9 commits
-
-
Edward Tomasz Napierala authored
No functional changes. Sponsored By: EPSRC
-
Edward Tomasz Napierala authored
This fixes strace(1) from Ubuntu Focal. Reviewed By: jhb Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D32367
-
Dimitry Andric authored
Merge commit 2d8c18fbbdd1 from llvm git (by Jessica Clarke): [X86] Don't add implicit REP prefix to VIA PadLock xstore Commit 8fa3e8fa1492 added an implicit REP prefix to all VIA PadLock instructions, but GNU as doesn't add one to xstore, only all the others. This resulted in a kernel panic regression in FreeBSD upon updating to LLVM 11 (https://bugs.freebsd.org/259218) which includes the commit in question. This partially reverts that commit. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D112355 MFC after: 3 days
-
Edward Tomasz Napierala authored
This fixes panic when trying to run strace(8) from Focal. Reviewed By: kib Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D32355
-
Edward Tomasz Napierala authored
No functional changes. Sponsored By: EPSRC
-
Edward Tomasz Napierala authored
The Linux way for sendfile(2) to tell the application to fallback to another way of copying data is by EINVAL, not ENOTSOCK. This fixes package installation scripts for Mono packages from Focal. Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D32604
-
Edward Tomasz Napierala authored
No functional changes. Reviewed By: emaste Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D32599
-
Peter Holm authored
-
Warner Losh authored
These files were copied from MUSL. Add the standard copyright notice and SPDX-License-Identifier: MIT consistent with our new draft license policy. It reads word for word the same as the MIT license on the SPDX web site. Add a pointer to the MUSL COPYIRGHT file which contains a list of all authors of MUSL. Sponsored by: Netflix Noticed by: Steve Kargl
-
- 22 Oct, 2021 1 commit
-
-
Ed Maste authored
From https://github.com/Yubico/libfido2: libfido2 provides library functionality and command-line tools to communicate with a FIDO device over USB, and to verify attestation and assertion signatures. libfido2 supports the FIDO U2F (CTAP 1) and FIDO 2.0 (CTAP 2) protocols. libfido2 will be used by ssh to support FIDO/U2F keys. It is currently intended only for use by ssh, and so is installed as a PRIVATELIB and is placed in the ssh pkgbase package. This is currently disabled for the 32-bit library build as libfido2 is not compatible with the COMPAT_32BIT hack in usb_ioctl.h. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32448
-