| 90fa789c | 04-Oct-2025 |
Robert Clausecker <fuz@FreeBSD.org> |
sys/crypto: import md5c.c C rewrite
The reimplementation is a bit cleaner than the original code, although it is also slightly slower. This shouldn't matter too much as we will have asm code for the
sys/crypto: import md5c.c C rewrite
The reimplementation is a bit cleaner than the original code, although it is also slightly slower. This shouldn't matter too much as we will have asm code for the major platforms.
The code is unrolled when built in the kernel or user space, but not when in libsa, as to reduce the code size.
Differential Revision: https://reviews.freebsd.org/D45670 Reviewed by: jrtc27, imp Approved by: markj (mentor) MFC after: 1 month
show more ...
|
| 690ae8a2 | 22-Aug-2025 |
Kirk McKusick <mckusick@FreeBSD.org> |
Bail out of corrupt directory entries during boot
A directory with a zero-valued d_reclen causes boot to hang, This patch checks for directory entries with value zero and bails out rather than spin
Bail out of corrupt directory entries during boot
A directory with a zero-valued d_reclen causes boot to hang, This patch checks for directory entries with value zero and bails out rather than spin forever. The hope is that the user has other options.
Sadly this was reported on Jun 16 2015 and is just now attended to as part of a sweep of old unclosed phabricator reports.
Reported-by: Daniel O'Connor darius-dons.net.au Differential Revision: https://reviews.freebsd.org/D2844 MFC-after: 1 week Sponsored-by: Netflix
show more ...
|
| 5bfb3045 | 21-Aug-2025 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Allow secure-netboot
When doing file verification, tftp needs to be able to handle multiple open files concurrently. We also need tftp_stat() to provide useful values for st_dev and st_ino.
Allow a
Allow secure-netboot
When doing file verification, tftp needs to be able to handle multiple open files concurrently. We also need tftp_stat() to provide useful values for st_dev and st_ino.
Allow an architecture to define NETPROTO_DEFAULT. The default is NET_NFS for backwards compatability.
In net_parse_rootpath() fix parsing of <scheme>://<ip>[:<port]/<path> and ensure we return INADDR_NONE unless we successfully parsed an addr, so we don't end up clobbering rootip obtained from bootp().
Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D51187
show more ...
|
| b44cc1b4 | 21-Aug-2025 |
Simon J. Gerraty <sjg@FreeBSD.org> |
loader: do not try to open directories with TFTP
Attempting to mount or even open / with some tftp servers causes a several minute delay in boot.
Since opening a directory via TFTP does not make se
loader: do not try to open directories with TFTP
Attempting to mount or even open / with some tftp servers causes a several minute delay in boot.
Since opening a directory via TFTP does not make sense, we avoid it. We don't know if using TFTP until after net_open() has been called.
Add an is_tftp() accessor to avoid everyone having to include all the net* headers.
Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D51447
show more ...
|
| fe2418f2 | 20-Aug-2025 |
Gleb Smirnoff <glebius@FreeBSD.org> |
libsa/zfs: inline vdev_init_from_label() into vdev_probe()
This function is used only once and also pulls three variables from the nvlist that the only caller have already pulled out.
Reviewed by:
libsa/zfs: inline vdev_init_from_label() into vdev_probe()
This function is used only once and also pulls three variables from the nvlist that the only caller have already pulled out.
Reviewed by: mav, imp Differential Revision: https://reviews.freebsd.org/D52031
show more ...
|
| a1572e20 | 20-Aug-2025 |
Gleb Smirnoff <glebius@FreeBSD.org> |
libsa/zfs: further improve handling of stale labels
Fix two problems with 6dd0803ffd31. First problem is that situation when newer label was read before stale one, was handled differently to revers
libsa/zfs: further improve handling of stale labels
Fix two problems with 6dd0803ffd31. First problem is that situation when newer label was read before stale one, was handled differently to reverse order case. Second problem is that vdev_free() would free the fully initialized leaf vdev that carried stale label. In a case when vdev carries a stale label, but is still referenced by a different label with new a configuration, we don't want to free it, but rather insert it into the new configuration.
o Provide a helper function nvlist_find_vdev_guid() that checks presence of certain GUID in a label. o In top level vdev store the GUID of vdev used to instantiate top vdev. o Cover all possible cases in the block in vdev_probe() where we encounter a known configuration. Make the diagnostic print more informative and looking same regardless of probe order. Make this whole block easier to read reducing one level of indentation for a price of a single comparison at runtime.
Reviewed by: mav, imp Differential Revision: https://reviews.freebsd.org/D51913 Fixes: 6dd0803ffd31c60a84488d06928813353c6303d3
show more ...
|
| 9dbd8ee1 | 20-Aug-2025 |
Gleb Smirnoff <glebius@FreeBSD.org> |
libsa/zfs: refactor vdev tree for better resiliency against stale disks
Before this change in vdev_insert() we would avoid inserting a duplicate vdev to the list of children, however this duplicate
libsa/zfs: refactor vdev tree for better resiliency against stale disks
Before this change in vdev_insert() we would avoid inserting a duplicate vdev to the list of children, however this duplicate being unlinked from the parent is still stored on the global list with initialized v_guid. Such leaked duplicate can later be returned by vdev_find(). After 6dd0803ffd31 such leaked vdev may be freed or pointing to a freed parent, which leads to a loader crash. Note that the leak problem was there before 6dd0803ffd31.
First, in vdev_insert() free conflicting vdev and return the existing one. Update callers accordingly. There is only one caller that actually may encounter this condition.
Second, eliminate global list of vdevs and make vdev_find() to work recursively on the tree that a caller must provide. Of course, a chance of GUID collision between members of different pools is extremely low. The main motivation here is just to increase code robustness and fully isolate the data structures of different pools being tasted by the loader, and make easier debugging of bugs like the one being fixed.
Reviewed by: mav, imp Differential Revision: https://reviews.freebsd.org/D51912 Fixes: 6dd0803ffd31c60a84488d06928813353c6303d3
show more ...
|
| 8ef5016f | 20-Aug-2025 |
Gleb Smirnoff <glebius@FreeBSD.org> |
libsa/zfs: simplify vdev_find_previous()
An empty list case is properly covered by the cycle. Don't pass pointer to vdev being looked up, pass just id.
Reviewed by: mav, imp Differential Revision:
libsa/zfs: simplify vdev_find_previous()
An empty list case is properly covered by the cycle. Don't pass pointer to vdev being looked up, pass just id.
Reviewed by: mav, imp Differential Revision: https://reviews.freebsd.org/D51911
show more ...
|
| de055556 | 20-Aug-2025 |
Gleb Smirnoff <glebius@FreeBSD.org> |
libsa/zfs: ignore labels with zero txg
Zero txg means this vdev has been correctly removed from the pool. For reference see module/zfs/vdev_removal.c in OpenZFS. It calls vdev_label_init(vd, 0, VD
libsa/zfs: ignore labels with zero txg
Zero txg means this vdev has been correctly removed from the pool. For reference see module/zfs/vdev_removal.c in OpenZFS. It calls vdev_label_init(vd, 0, VDEV_LABEL_REMOVE), and second argument there is the txg to write.
Reviewed by: tsoome, mav, imp Differential Revision: https://reviews.freebsd.org/D51910
show more ...
|