On 2024-10-06 17:49, Daniel P. Smith wrote:
Iterate through the unclaimed struct boot_module to see if any are an XSM FLASK
policy. If one is located, mark it as an xsm policy.
Signed-off-by: Daniel P. Smith <dpsm...@apertussolutions.com>
@@ -161,6 +162,14 @@ int __init xsm_multiboot_init(
}
ret = xsm_core_init(policy_buffer, policy_size);
+ if ( ret == 0 )
+ {
+ int idx = first_boot_module_index(bi, BOOTMOD_XSM_POLICY);
+
+ /* If the policy was loaded from a boot module, mark it consumed */
+ if ( idx >= 0 )
+ bi->mods[idx].flags |= BOOTMOD_FLAG_X86_CONSUMED;
Maybe xsm_multiboot_policy_init() should return the idx used instead of
having a second search? (Also, xsm_multiboot_policy_init() can't fail?)
+ }
bootstrap_map(NULL);
return 0;
The other changes look okay.
Regards,
Jason