Closed
Conversation
…nd-add-kextstoblock Replace legacy BlockSkywalk with KextsToBlock array and implement blocking logic
Modified KEXT_TO_BLOCK::ShouldBlock to rely solely on MenuItem.BValue. Previously, if a kext block entry was marked as Disabled in the configuration file, it could not be re-enabled via the GUI because ShouldBlock would return false immediately. Now, MenuItem.BValue acts as the master switch, which is initialized from the config's Disabled state but can be overridden by the user in the Options menu.
This commit fixes two issues preventing the KextsToBlock GUI from working: 1. Logic: KEXT_TO_BLOCK::ShouldBlock now relies only on MenuItem.BValue. Previously it also checked the Disabled flag from config.plist, which prevented re-enabling a kext that was initially disabled. 2. Timing: Moved FilterKextsToBlock() call in LOADER_ENTRY::StartLoader() to an earlier point. It must be called before the OpenCore integration block that populates mOpenCoreConfiguration.Kernel.Block, otherwise it builds the OC config using stale values.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
BlockSkywalksupport and UI field and added a newKextsToBlockplist array example toconfig-sample.plistwith the requested fields (Comment,Disabled,MatchOS,Name).KernelAndKextPatches_KextsToBlock_Classto the XML config schema and integratedKextsToBlockinto the config parser so entries are validated and accessible via the settings model.KEXT_TO_BLOCKmodel withtakeValueFrom(...)and aShouldBlock(const MacOsVersion&)method implementing theDisabled/MatchOS/Namelogic and case-insensitiveallhandling.Kernel.Blockgeneration forBlockSkywalkwith a loop that buildsKernel.Blockentries from allKextsToBlockentries that return true fromShouldBlock, preserving safety for absent or empty arrays and avoiding crashes.FilterKextsToBlock()call inLOADER_ENTRY::StartLoader()to an earlier point. It must be called before the OpenCore integration block that populatesmOpenCoreConfiguration.Kernel.Block, otherwise it builds the OC config using stale values.Type of change
Checklist
Additional information
Motivation
BlockSkywalkand provide a flexibleKextsToBlockarray that can list zero-or-more kexts to block with per-entryMatchOSandDisabledsemantics.Testing
KextsToBlockwork, providing identical capabilities to block kexts to what OpenCore is capable of. Does not provide ability to block nested kexts included as plugins (WiP to fix later, OpenCore cannot do this either).