All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "Daniel P. Smith" <dpsmith@apertussolutions.com>
Cc: scott.davis@starlab.io, christopher.clark@starlab.io,
	jandryuk@gmail.com, "Bertrand Marquis" <bertrand.marquis@arm.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Julien Grall" <julien@xen.org>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	"Daniel De Graaf" <dgdegra@tycho.nsa.gov>,
	xen-devel@lists.xenproject.org,
	"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
	"Wei Liu" <wl@xen.org>
Subject: Re: [PATCH v3 3/3] xsm: properly handle error from XSM init
Date: Wed, 1 Jun 2022 08:14:28 +0200	[thread overview]
Message-ID: <e7582bd3-1a3b-49e9-7d3f-f86ae3d4ab2b@suse.com> (raw)
In-Reply-To: <20220531150857.19727-4-dpsmith@apertussolutions.com>

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



  reply	other threads:[~2022-06-01  6:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-31 15:08 [PATCH v3 0/3] xsm: refactor and optimize policy loading Daniel P. Smith
2022-05-31 15:08 ` [PATCH v3 1/3] xsm: only search for a policy file when needed Daniel P. Smith
2022-05-31 15:51   ` Jan Beulich
2022-05-31 16:15     ` Daniel P. Smith
2022-06-01  6:04       ` Jan Beulich
2022-06-07 12:07         ` Daniel P. Smith
2022-06-01  6:08   ` Jan Beulich
2022-06-07 12:08     ` Daniel P. Smith
2022-05-31 15:08 ` [PATCH v3 2/3] xsm: consolidate loading the policy buffer Daniel P. Smith
2022-05-31 16:05   ` Jan Beulich
2022-05-31 17:02     ` Daniel P. Smith
2022-05-31 15:08 ` [PATCH v3 3/3] xsm: properly handle error from XSM init Daniel P. Smith
2022-06-01  6:14   ` Jan Beulich [this message]
2022-06-07 12:14     ` Daniel P. Smith
2022-06-07 13:21       ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e7582bd3-1a3b-49e9-7d3f-f86ae3d4ab2b@suse.com \
    --to=jbeulich@suse.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=bertrand.marquis@arm.com \
    --cc=christopher.clark@starlab.io \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=dpsmith@apertussolutions.com \
    --cc=jandryuk@gmail.com \
    --cc=julien@xen.org \
    --cc=roger.pau@citrix.com \
    --cc=scott.davis@starlab.io \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.