commit f562e1128475e4395f4dc041af71974d1800367f Author: Oleg Solovyov Date: Fri Aug 11 16:10:36 2023 +0300 disable sanitize-log Under certain conditions, bd_nvme_get_sanitize_log() causes stack smashing, which heavily impacts performance. https://github.com/storaged-project/udisks/issues/1152 This will disable any sanitize operations for a while until the original issue is resolved. diff --git a/udisks/src/udiskslinuxnvmecontroller.c b/udisks/src/udiskslinuxnvmecontroller.c index eb129ff..49b6244 100644 --- a/udisks/src/udiskslinuxnvmecontroller.c +++ b/udisks/src/udiskslinuxnvmecontroller.c @@ -398,10 +398,13 @@ udisks_linux_nvme_controller_refresh_smart_sync (UDisksLinuxNVMeController *ctr smart_log = bd_nvme_get_smart_log (dev_file, error); if ((device->nvme_ctrl_info->features & BD_NVME_CTRL_FEAT_SELFTEST) == BD_NVME_CTRL_FEAT_SELFTEST) selftest_log = bd_nvme_get_self_test_log (dev_file, NULL); +// sanitize-log is known to smash stack on certain conditions +#if 0 if ((device->nvme_ctrl_info->features & BD_NVME_CTRL_FEAT_SANITIZE_CRYPTO) == BD_NVME_CTRL_FEAT_SANITIZE_CRYPTO || (device->nvme_ctrl_info->features & BD_NVME_CTRL_FEAT_SANITIZE_BLOCK) == BD_NVME_CTRL_FEAT_SANITIZE_BLOCK || (device->nvme_ctrl_info->features & BD_NVME_CTRL_FEAT_SANITIZE_OVERWRITE) == BD_NVME_CTRL_FEAT_SANITIZE_OVERWRITE) sanitize_log = bd_nvme_get_sanitize_log (dev_file, NULL); +#endif if (smart_log || selftest_log || sanitize_log) { g_mutex_lock (&ctrl->smart_lock); @@ -1121,6 +1124,9 @@ handle_sanitize_start (UDisksNVMeController *_object, gint64 time_est = 0; GError *error = NULL; + // this uses sanitize-log which is known to smash stack on certain conditions + goto out; + object = udisks_daemon_util_dup_object (ctrl, &error); if (object == NULL) {