On 31.05.2022 17:08, Daniel P. Smith wrote:
> @@ -1690,7 +1691,7 @@ void __init noreturn __start_xen(unsigned long mbi_p)
>
> open_softirq(NEW_TLBFLUSH_CLOCK_PERIOD_SOFTIRQ,
> new_tlbflush_clock_period);
>
> - if ( opt_watchdog )
> + if ( opt_watchdog )
> nmi_watchdog = NMI_LOCAL_APIC;
>
> find_smp_config();
Please omit formatting changes to entirely unrelated pieces of code.
> @@ -1700,7 +1701,11 @@ void __init noreturn __start_xen(unsigned long mbi_p)
> mmio_ro_ranges = rangeset_new(NULL, "r/o mmio ranges",
> RANGESETF_prettyprint_hex);
>
> - xsm_multiboot_init(module_map, mbi);
> + if ( xsm_multiboot_init(module_map, mbi) )
> + warning_add("WARNING: XSM failed to initialize.\n"
> + "This has implications on the security of the system,\n"
> + "as uncontrolled communications between trusted and\n"
> + "untrusted domains may occur.\n");
Uncontrolled communication isn't the only thing that could occur, aiui.
So at the very least "e.g." or some such would want adding imo.
Now that return values are checked, I think that in addition to what
you already do the two function declarations may want decorating with
__must_check.
Jan