From a8f8f9a789badb247be09d46e2a127c4f5eb53dd Mon Sep 17 00:00:00 2001 From: YBronst <157227982+YBronst@users.noreply.github.com> Date: Mon, 16 Mar 2026 15:35:45 +0200 Subject: [PATCH] Restores the missing log messages for kexts listed in the `KextsToBlock` This change restores the missing log messages for kexts listed in the `KextsToBlock` section of `config.plist`. Users noticed that messages like "Allow IOSkywalk Downgrade" (which is a comment label for blocking `com.apple.iokit.IOSkywalkFamily`) were no longer appearing in `bdmesg`. The implementation iterates through the `KextsToBlock` array, evaluates whether each entry should be active based on user settings and macOS version compatibility, and logs the result using the `DBG` macro. This logging mirrors the behavior of other patch types in Clover, providing transparency into which kexts are being blocked during the boot process without affecting the actual blocking logic. --- rEFIt_UEFI/refit/main.cpp | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/rEFIt_UEFI/refit/main.cpp b/rEFIt_UEFI/refit/main.cpp index 029d69261..98dd46c5d 100644 --- a/rEFIt_UEFI/refit/main.cpp +++ b/rEFIt_UEFI/refit/main.cpp @@ -747,15 +747,23 @@ void LOADER_ENTRY::FilterKextsToBlock() { if (gSettings.KernelAndKextPatches.KextsToBlock.isEmpty()) { return; } + DBG("Filtering KextsToBlock:\n"); + for (size_t i = 0; i < gSettings.KernelAndKextPatches.KextsToBlock.size(); i++) { + const char* status = "allowed"; + if (!gSettings.KernelAndKextPatches.KextsToBlock[i].MenuItem.BValue) { + status = "disabled by user"; + } else if (!gSettings.KernelAndKextPatches.KextsToBlock[i].ShouldBlock(macOSVersion)) { + status = "not allowed"; + } -// size_t count = gSettings.KernelAndKextPatches.KextsToBlock.size(); -//// size_t entryCount = KernelAndKextPatches.KextsToBlock.size(); -//// size_t count = (settingsCount < entryCount) ? settingsCount : entryCount; -// -// for (size_t i = 0; i < count; ++i) { -// gSettings.KernelAndKextPatches.KextsToBlock[i].MenuItem.BValue = -// gSettings.KernelAndKextPatches.KextsToBlock[i].MenuItem.BValue; -// } + DBG(" - [%02zu]: %s :: [OS: %s | MatchOS: %s] ==> %s\n", i, + gSettings.KernelAndKextPatches.KextsToBlock[i].Label.c_str(), + macOSVersion.asString().c_str(), + gSettings.KernelAndKextPatches.KextsToBlock[i].MatchOS.notEmpty() + ? gSettings.KernelAndKextPatches.KextsToBlock[i].MatchOS.c_str() + : "All", + status); + } } // @@ -1994,6 +2002,7 @@ void LOADER_ENTRY::StartLoader() FilterKextPatches(); FilterKernelPatches(); + FilterKextsToBlock(); FilterBootPatches(); if (LoadedImage && !BooterPatch((UINT8 *)LoadedImage->ImageBase, LoadedImage->ImageSize)) {