From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 11AEFC43334 for ; Tue, 7 Jun 2022 12:16:29 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.343219.568455 (Exim 4.92) (envelope-from ) id 1nyY84-0001Z5-IX; Tue, 07 Jun 2022 12:16:12 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 343219.568455; Tue, 07 Jun 2022 12:16:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nyY84-0001Yy-Fu; Tue, 07 Jun 2022 12:16:12 +0000 Received: by outflank-mailman (input) for mailman id 343219; Tue, 07 Jun 2022 12:16:11 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nyY83-0001Ys-Q3 for xen-devel@lists.xenproject.org; Tue, 07 Jun 2022 12:16:11 +0000 Received: from sender4-of-o51.zoho.com (sender4-of-o51.zoho.com [136.143.188.51]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 9cfb4696-e65b-11ec-b605-df0040e90b76; Tue, 07 Jun 2022 14:16:10 +0200 (CEST) Received: from [10.10.1.138] (static-72-81-132-2.bltmmd.fios.verizon.net [72.81.132.2]) by mx.zohomail.com with SMTPS id 1654604158771316.67427795343394; Tue, 7 Jun 2022 05:15:58 -0700 (PDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 9cfb4696-e65b-11ec-b605-df0040e90b76 ARC-Seal: i=1; a=rsa-sha256; t=1654604165; cv=none; d=zohomail.com; s=zohoarc; b=ggJv8rlHPL9u04m2KPPkaH+voFIJIw6qfNNHk5w0n8a9cg5m6z040O1FrxStQ27jH0ozJSFJ5ANG8XMVkFRhwDMxjbdIBWn+G1Rkh8mDXz/e+MlLVuEAO8sSNDfy9uCgdh6pvOvqkHOPkKpigHFnFOGcgcdQMsmDKKvhp7vI8+Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654604165; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=EkEJdzTn5wsupDMSIaSNG6LmQ+ASAiYE6Uzwve0WIJE=; b=jWr599UIyhQbZ8Q8Q8Bt9FmrxG4SrN1RAZvgkDiiEolmp0pW+uHFYkCKqlVjnu4Uvox66ch1GJnhPKGR37hJcHlCQLXxuYdC67MtZGhoEhZymVKLYhaIM2HbyvcO2MsHHTdCFHuXaOiuKPELf9Bx4yynOV5SLsfkcyL6kuLec0w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=apertussolutions.com; spf=pass smtp.mailfrom=dpsmith@apertussolutions.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1654604165; s=zoho; d=apertussolutions.com; i=dpsmith@apertussolutions.com; h=Message-ID:Date:Date:MIME-Version:To:To:Cc:Cc:References:From:From:Subject:Subject:In-Reply-To:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=EkEJdzTn5wsupDMSIaSNG6LmQ+ASAiYE6Uzwve0WIJE=; b=c4gCprB/pMp792NIlbB5zJnJg8pMmFU/48HiAfmjWo/NF26NTkLgQp73xkxI/1Oo SlKFVbWXO6A4CyVtF52G0Cd1cs+DD5IZvkulGnU0N94xyFozfOi0rl4baIHWBwvcfyL gIkDBE+AcCSJVjeoaWLrQajMj9/x1M7nOM17cokU= Message-ID: Date: Tue, 7 Jun 2022 08:14:22 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Content-Language: en-US To: Jan Beulich Cc: scott.davis@starlab.io, christopher.clark@starlab.io, jandryuk@gmail.com, Bertrand Marquis , Stefano Stabellini , Julien Grall , Andrew Cooper , =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , Daniel De Graaf , xen-devel@lists.xenproject.org, Volodymyr Babchuk , Wei Liu References: <20220531150857.19727-1-dpsmith@apertussolutions.com> <20220531150857.19727-4-dpsmith@apertussolutions.com> From: "Daniel P. Smith" Subject: Re: [PATCH v3 3/3] xsm: properly handle error from XSM init In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ZohoMailClient: External On 6/1/22 02:14, Jan Beulich wrote: > 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. Ack. this was in simliar vein of the other patches where I cleaned nearby trailing space. >> @@ -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. Agreed, this was a reuse of the existing message and honestly I would like to believe this was the original author's attempt at brevity versus writing a detailed message of every implication to the security of the system. > 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. Understood but likely not necessary based on Andy's review suggestion to move these functions to void. v/r, dps