On 31.05.2022 17:08, Daniel P. Smith wrote: > It is possible to select a few different build configurations that results in > the unnecessary walking of the boot module list looking for a policy module. > This specifically occurs when the flask policy is enabled but either the dummy > or the SILO policy is selected as the enforcing policy. This is not ideal for > configurations like hyperlaunch and dom0less when there could be a number of > modules to be walked or doing an unnecessary device tree lookup. > > This patch introduces the policy_file_required flag for tracking when an XSM > policy module requires a policy file.
In light of the "flask=late" aspect of patch 2, I'd like to suggest to slightly alter wording here: "... requires looking for a policy file." > --- a/xen/xsm/xsm_core.c > +++ b/xen/xsm/xsm_core.c > @@ -55,19 +55,31 @@ static enum xsm_bootparam __initdata xsm_bootparam = > XSM_BOOTPARAM_DUMMY; > #endif > > +static bool __initdata policy_file_required = > + IS_ENABLED(CONFIG_XSM_FLASK_DEFAULT); The variable may then also want renaming, to e.g. "find_policy_file". Jan