Re: [PATCH] xsm: refactor and optimize policy loading

2022-05-25 Thread Jan Beulich
On 25.05.2022 16:11, Daniel P. Smith wrote: > On 5/25/22 02:37, Jan Beulich wrote: >> On 24.05.2022 19:42, Daniel P. Smith wrote: >>> On 5/24/22 11:50, Jan Beulich wrote: On 23.05.2022 17:40, Daniel P. Smith wrote: > @@ -36,10 +36,17 @@ int __init xsm_multiboot_policy_init( > { >

Re: [PATCH] xsm: refactor and optimize policy loading

2022-05-25 Thread Daniel P. Smith
On 5/25/22 02:37, Jan Beulich wrote: > On 24.05.2022 19:42, Daniel P. Smith wrote: >> On 5/24/22 11:50, Jan Beulich wrote: >>> On 23.05.2022 17:40, Daniel P. Smith wrote: @@ -36,10 +36,17 @@ int __init xsm_multiboot_policy_init( { int i; module_t *mod = (module_t *)__

Re: [PATCH] xsm: refactor and optimize policy loading

2022-05-24 Thread Jan Beulich
On 24.05.2022 19:42, Daniel P. Smith wrote: > On 5/24/22 11:50, Jan Beulich wrote: >> On 23.05.2022 17:40, Daniel P. Smith wrote: >>> @@ -36,10 +36,17 @@ int __init xsm_multiboot_policy_init( >>> { >>> int i; >>> module_t *mod = (module_t *)__va(mbi->mods_addr); >>> -int rc = 0; >>>

Re: [PATCH] xsm: refactor and optimize policy loading

2022-05-24 Thread Daniel P. Smith
On 5/24/22 12:17, Jason Andryuk wrote: > On Mon, May 23, 2022 at 11:40 AM 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 th

Re: [PATCH] xsm: refactor and optimize policy loading

2022-05-24 Thread Daniel P. Smith
On 5/24/22 11:50, Jan Beulich wrote: > On 23.05.2022 17:40, Daniel P. Smith wrote: >> --- a/xen/xsm/xsm_core.c >> +++ b/xen/xsm/xsm_core.c >> @@ -55,19 +55,35 @@ static enum xsm_bootparam __initdata xsm_bootparam = >> XSM_BOOTPARAM_DUMMY; >> #endif >> >> +static bool __initdata init_polic

Re: [PATCH] xsm: refactor and optimize policy loading

2022-05-24 Thread Jason Andryuk
On Mon, May 23, 2022 at 11:40 AM 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

Re: [PATCH] xsm: refactor and optimize policy loading

2022-05-24 Thread Jan Beulich
On 23.05.2022 17:40, Daniel P. Smith wrote: > --- a/xen/xsm/xsm_core.c > +++ b/xen/xsm/xsm_core.c > @@ -55,19 +55,35 @@ static enum xsm_bootparam __initdata xsm_bootparam = > XSM_BOOTPARAM_DUMMY; > #endif > > +static bool __initdata init_policy = > +#ifdef CONFIG_XSM_FLASK_DEFAULT > +tr

[PATCH] xsm: refactor and optimize policy loading

2022-05-24 Thread Daniel P. Smith
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 n