[Kernel] Add option to ignore incompatible title updates with mismatched signatures

This commit is contained in:
Michael Oliver 2025-04-11 16:28:18 +01:00 committed by Radosław Gliński
parent 47f327e848
commit 1a356f7344
1 changed files with 10 additions and 0 deletions

View File

@ -37,6 +37,9 @@
#include "third_party/crypto/TinySHA1.hpp"
DEFINE_bool(apply_title_update, true, "Apply title updates.", "Kernel");
DEFINE_bool(allow_incompatible_title_update, true,
"Allow title updates with mismatched signatures to be applied.",
"Kernel");
DEFINE_uint32(kernel_build_version, 1888, "Define current kernel version",
"Kernel");
@ -581,6 +584,13 @@ X_RESULT KernelState::ApplyTitleUpdate(
}
if (!IsPatchSignatureProper(title_module, patch_module)) {
if (!cvars::allow_incompatible_title_update) {
XELOGW(
"Skipping incompatible title update for {} due to signature mismatch",
title_module->name());
return X_STATUS_SUCCESS;
}
// First module that is loaded is always main executable. That way we can
// prevent random message spam in case of loading/unloading.
if (!GetExecutableModule()) {