aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* libzpool: kernel: silence unrelated-function-pointer cast warningнаб2022-02-181-0/+5
| | | | | | | Reviewed-by: Alejandro Colomar <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13110
* libnvpair: json: suppress wchar_t >=0 warningsнаб2022-02-181-0/+4
| | | | | | | Reviewed-by: Alejandro Colomar <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13110
* config: prune unused -Wno-bool-compare checksнаб2022-02-182-28/+0
| | | | | | | Reviewed-by: Alejandro Colomar <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13110
* libtpool: -Wno-clobberedнаб2022-02-189-31/+34
| | | | | | | | | | Also remove -Wno-unused-but-set-variable Upstream-bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61118 Reviewed-by: Alejandro Colomar <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13110
* module: icp: remove useless assertнаб2022-02-181-2/+0
| | | | | | | | | Which produces a warning since uints are, by definition, >=0 Reviewed-by: Alejandro Colomar <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13110
* libzfs: sendrecv: fix NULL arithmetic UBнаб2022-02-181-2/+4
| | | | | | | Reviewed-by: Alejandro Colomar <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13110
* userspace: mark arguments usedнаб2022-02-186-0/+15
| | | | | | | Reviewed-by: Alejandro Colomar <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13110
* module: mark arguments usedнаб2022-02-1825-171/+119
| | | | | | | Reviewed-by: Alejandro Colomar <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13110
* linux: module/zfs: vnops: make null_xattr staticнаб2022-02-181-1/+1
| | | | | | | Reviewed-by: Alejandro Colomar <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13110
* ZTS: Fix vdev_zaps_004_pos.kshBrian Behlendorf2022-02-172-1/+1
| | | | | | | | | | When attaching a vdev to a mirror wait for the resilver to complete before invoking `zdb` to inspect the pool. This ensures the pool is essentially idle which allows `zdb` to open the imported pool reliably. Reviewed-by: John Kennedy <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #13112 Closes #6935
* Multiple dracut module install script cleanupsSavyasachee Jha2022-02-161-61/+40
| | | | | | | | | | | | | | | | | | | | | | | | - Replaced intances of `dracut_install` with `inst_simple` - Removed calls to `test -x mark_hostonly` because the function is an inbuilt dracut function - Removed redundant installation of `systemd-ask-password` and `systemd-tty-ask-password-agent` because they are already installed by the systemd module. There is no need to install them again - Removed multiple calls to the `mark_hostonly` function because the `inst_simple` has a command-line switch for it - Cleaned up the installation of the `zpool.cache`, `vdev_id.conf` and `hostid` files to make the logic easier to follow - Cleaned up and simplified the systemd service installation logic by invoking systemctl instead of creating symlinks manually - Replaced various hard-coded paths with dracut equivalents to better conform with expected dracut behaviour - Removed redundant call to `mkdir` (`inst_simple` creates the parent directory if it does not exist on the destination initrd) Reviewed-by: Ahelenia Ziemiańska <[email protected]> Reviewed-by: Andrew J. Hesford <[email protected]> Signed-off-by: Savyasachee Jha <[email protected]> Closes #13010
* Remove absolute paths to udev rules and binaries for dracutSavyasachee Jha2022-02-161-12/+5
| | | | | | | | | | | | Since dracut functions can locate both udev rules and binaries, there is no point in keeping absolute paths in the module setup script. It also breaks the --sysroot option in dracut. This commit removes mentions to absolute paths for binaries and udev rules. Reviewed-by: Ahelenia Ziemiańska <[email protected]> Reviewed-by: Andrew J. Hesford <[email protected]> Signed-off-by: Savyasachee Jha <[email protected]> Closes #13010
* Make dracut fail if essential files cannot be installedSavyasachee Jha2022-02-161-10/+30
| | | | | | | | | | Dracut will now fail in initramfs generation if essential files cannot be installed. Reviewed-by: Ahelenia Ziemiańska <[email protected]> Reviewed-by: Andrew J. Hesford <[email protected]> Signed-off-by: Savyasachee Jha <[email protected]> Closes #13010
* Make better use of dracut functions when building initramfsSavyasachee Jha2022-02-161-53/+24
| | | | | | | | | | | | | | | | | | Setting up the module involves multiple redundant calls to a bunch of dracut functions wheich can be combined into one. Additionally, the mass of code required to load libgcc_s.so* can be replaced with one dracut function. This has the additional effect of removing errors involving the non-installation of libgcc_s.so* which are seen on debian bullseye when using version 2.1.2-1~bpo11+1 from the backports repository. The systemd binaries are separated out into their own `dracut_install` function call so they do not get pulled in when dracut does not load the systemd module. Reviewed-by: Ahelenia Ziemiańska <[email protected]> Reviewed-by: Andrew J. Hesford <[email protected]> Signed-off-by: Savyasachee Jha <[email protected]> Closes #13010
* Fix Linux kernel directories detectionDamian Szuberski2022-02-161-30/+75
| | | | | | | | | | | | | | | | | | | | | | | | | Most modern Linux distributions have separate locations for bare source and prebuilt ("build") files. Additionally, there are `source` and `build` symlinks in `/lib/modules/$(KERNEL_VERSION)` pointing to them. The order of directory search is now: - `configure` command line values if both `--with-linux` and `--with-linux-obj` were defined - If only `--with-linux` was defined, `--with-linux-obj` is assumed to have the same value as `--with-linux` - If neither `--with-linux` nor `--with-linux-obj` were defined autodetection is used: - `/lib/modules/$(uname -r)/{source,build}` respectively, if exist - The first directory in `/lib/modules` with the highest version number according to `sort -V` which contains `source` and `build` symlinks/directories - The first directory matching `/usr/src/kernels/*` and `/usr/src/linux-*` with the highest version number according to `sort -V`. Here the source and prebuilt directories are assumed to be the same. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: szubersk <[email protected]> Closes #9935 Closes #13096
* Enable encrypted raw sending to pools with greater ashiftGeorge Amanakis2022-02-164-2/+202
| | | | | | | | | | | | | | | | | | | | | | Raw sending from pool1/encrypted with ashift=9 to pool2/encrypted with ashift=12 results to failure when mounting pool2/encrypted (Input/Output error). Notably, the opposite, raw sending from a greater ashift to a lower one does not fail. This happens because zio_compress_write() falsely checks only ZIO_FLAG_RAW_COMPRESS and not ZIO_FLAG_RAW_ENCRYPT which is also set in encrypted raw send streams. In this case it rounds up the psize and if not equal to the zio->io_size it modifies the block by zeroing out the extra bytes. Because this happens in a SA attr. registration object (type=46), the decryption fails upon mounting the filesystem, and zpool status falsely reports an error. Fix this by checking both ZIO_FLAG_RAW_COMPRESS and ZIO_FLAG_RAW_ENCRYPT before deciding whether to zero-pad a block. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: George Amanakis <[email protected]> Closes #13067 Closes #13074
* `checkabi`/`storeabi` relevant only to x86_64Damian Szuberski2022-02-162-15/+24
| | | | | | | | | The stored ABI files are for the x86_64 architecture. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: szubersk <[email protected]> Closes #11345 Closes #13104
* Colorize the Github test outputRich Ercolani2022-02-164-3/+35
| | | | | | | | | Let's color our workflow test output for better readability. Reviewed by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Ahelenia Ziemiańska <[email protected]> Signed-off-by: Rich Ercolani <[email protected]> Closes #13000
* libzfs: calculate receive times with sub-second precisionнаб2022-02-151-8/+20
| | | | | | | | | Provide two digits of precision when reporting send/receive times. Tiny snapshots may take significantly less than a second and rounding up to a full second can introduce a significant error. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13047
* Cross-platform xattr user namespace compatibilityRyan Moeller2022-02-159-124/+453
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ZFS on Linux originally implemented xattr namespaces in a way that is incompatible with other operating systems. On illumos, xattrs do not have namespaces. Every xattr name is visible. FreeBSD has two universally defined namespaces: EXTATTR_NAMESPACE_USER and EXTATTR_NAMESPACE_SYSTEM. The system namespace is used for protected FreeBSD-specific attributes such as MAC labels and pnfs state. These attributes have the namespace string "freebsd:system:" prefixed to the name in the encoding scheme used by ZFS. The user namespace is used for general purpose user attributes and obeys normal access control mechanisms. These attributes have no namespace string prefixed, so xattrs written on illumos are accessible in the user namespace on FreeBSD, and xattrs written to the user namespace on FreeBSD are accessible by the same name on illumos. Linux has several xattr namespaces. On Linux, ZFS encodes the namespace in the xattr name for every namespace, including the user namespace. As a consequence, an xattr in the user namespace with the name "foo" is stored by ZFS with the name "user.foo" and therefore appears on FreeBSD and illumos to have the name "user.foo" rather than "foo". Conversely, none of the xattrs written on FreeBSD or illumos are accessible on Linux unless the name happens to be prefixed with one of the Linux xattr namespaces, in which case the namespace is stripped from the name. This makes xattrs entirely incompatible between Linux and other platforms. We want to make the encoding of user namespace xattrs compatible across platforms. A critical requirement of this compatibility is for xattrs from existing pools from FreeBSD and illumos to be accessible by the same names in the user namespace on Linux. It is also necessary that existing pools with xattrs written by Linux retain access to those xattrs by the same names on Linux. Making user namespace xattrs from Linux accessible by the correct names on other platforms is important. The handling of other namespaces is not required to be consistent. Add a fallback mechanism for listing and getting xattrs to treat xattrs as being in the user namespace if they do not match a known prefix. Do not allow setting or getting xattrs with a name that is prefixed with one of the namespace names used by ZFS on supported platforms. Allow choosing between legacy illumos and FreeBSD compatibility and legacy Linux compatibility with a new tunable. This facilitates replication and migration of pools between hosts with different compatibility needs. The tunable controls whether or not to prefix the namespace to the name. If the xattr is already present with the alternate prefix, remove it so only the new version persists. By default the platform's existing convention is used. Reviewed-by: Christian Schwarz <[email protected]> Reviewed-by: Ahelenia Ziemiańska <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #11919
* module: icp: remove provider statsнаб2022-02-154-135/+1
| | | | | | | | | | | These were all folded into a single kstat at /proc/spl/kstat/kcf/NONAME_provider_stats with no way to know which one it actually was, and only the AES and SHA (so not Skein) ones were ever updated Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12901
* module: icp: enforce KCF_{OPS_CLASSSIZE,MAXMECHTAB}наб2022-02-151-1/+7
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12901
* module: icp: remove unused pd_{remove_cv,hash_limit}наб2022-02-152-8/+0
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12901
* module: icp: remove vestigia of crypto sessionsнаб2022-02-158-126/+50
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12901
* module: icp: remove unused (and mostly faked) ↵наб2022-02-1510-83/+21
| | | | | | | | cm_{{min,max}_key_length,mech_flags} Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12901
* module: icp: remove unused crypto_provider_handle_tнаб2022-02-157-93/+54
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12901
* module: icp: remove pre-set entries from mechtabsнаб2022-02-151-22/+2
| | | | | | | | They don't do anything except clogging up the AVL tree Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12901
* module: icp: rip out insane crypto_req_handle_t mechanism, inline KM_SLEEPнаб2022-02-1516-339/+187
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12901
* include: crypto: clean out api.hнаб2022-02-153-86/+3
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12901
* module: icp: remove unused headers. Migrate {ops => sched}_implнаб2022-02-154-354/+5
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12901
* include: crypto: clean out unused SYSCALL32 and flagsнаб2022-02-152-72/+0
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12901
* module: icp: remove algorithm name defines used only in the default mechtabнаб2022-02-152-27/+1
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12901
* include: crypto: remove unused algorithm name definesнаб2022-02-151-13/+0
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12901
* module: icp: remove set-but-unused cd_miscdataнаб2022-02-156-72/+22
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12901
* module: icp: fold away all key formats except CRYPTO_KEY_RAWнаб2022-02-1514-264/+28
| | | | | | | | It's the only one actually used Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12901
* module: icp: remove unused CRYPTO_* error codesнаб2022-02-155-94/+12
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12901
* module: icp: rip out modhash. Replace the one user with AVLнаб2022-02-158-1271/+39
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12901
* module: icp: remove unused me_mutexнаб2022-02-154-24/+1
| | | | | | | | It only needs to be locked if dynamic changes can occur. They can't. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12901
* module: icp: remove unused me_thresholdнаб2022-02-152-94/+21
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12901
* module: icp: remove unused struct crypto_ctx::cc_{session,flags,opstate}наб2022-02-154-37/+5
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12901
* module: icp: remove unused gswq, kcfpool, [as]req_cache, reqid_table, ↵наб2022-02-153-464/+0
| | | | | | | | obsolete kstat Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12901
* module: icp: remove unused notification frameworkнаб2022-02-158-237/+25
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12901
* module: icp: remove unused kcf_op_{group,type}, req_params, ...наб2022-02-157-897/+0
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12901
* module: icp: remove unused p[di]_flagsнаб2022-02-154-47/+1
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12901
* module: icp: remove unused CRYPTO_{NOTIFY_OPDONE,SKIP_REQID,RESTRICTED}наб2022-02-156-29/+9
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12901
* module: icp: remove unused CRYPTO_ALWAYS_QUEUEнаб2022-02-157-357/+42
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12901
* module: icp: remove unused kcf_digest.cнаб2022-02-154-384/+0
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12901
* module: icp: drop software provider generation numbersнаб2022-02-155-84/+10
| | | | | | | | We register all providers at once, before anything happens Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12901
* module: icp: remove unused kcf_mac operationsнаб2022-02-152-52/+2
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12901
* module: icp: remove unused kcf_cipher operationsнаб2022-02-152-544/+3
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12901