From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by mx.groups.io with SMTP id smtpd.web11.13534.1583153867821558017 for ; Mon, 02 Mar 2020 04:57:48 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=LNxv4i1x; spf=pass (domain: nuviainc.com, ip: 209.85.221.66, mailfrom: leif@nuviainc.com) Received: by mail-wr1-f66.google.com with SMTP id t11so6052141wrw.5 for ; Mon, 02 Mar 2020 04:57:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=5KqZUMYt4+YsgO7AIjorPzKKxwl5tlUi1WFC13bFnB0=; b=LNxv4i1xaJJfi+MEgehkOYDMyn3oBMLN49HcDhyvoFNsyzfEUZ9DgWlquaDwnCgF9j 4fvunuxOSCuSTFnaJ6VzC1lX6NSiz5cv1qKz2HHsKD9TY9F+KeEPqAVvVJvUMMTWE04J t9B8jwH+Mv+ZSuRoI0N0e3sKg/mvPKUzvR24DHVJc/ri5mnHPStlhWwvJk5jP4kmcr/u h+F+qI9FMQcRqzp1doi9NTzqbh439HtF62yK4/6buRP/MwsqQNcwa96dK+VpF7jzCIMd 8sNSa6Plq+7QIkHio2nVsuj91an+gxDrDOjn0C7vV7zyDopjk/8FvX/k7J9QrmwMfdPO dMow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=5KqZUMYt4+YsgO7AIjorPzKKxwl5tlUi1WFC13bFnB0=; b=IRZFPipqMUzKSVY7xG3OeMP3m0FAf89EVVw2s6XQrcaCfKRA55rfiVVO21qcPBa4gx tZQtRG7+LkNJeHQTCI00r0pkVzQO5JBlhhRIYDcbzqIGFXcKgu0XJH4FageVg0lgZma+ Si/Z3zXwS5ZjJ86hhMlqbwxclcts3e6EHrHBKNiFJHT122Y+SaHr0+k6x5LsHS9ITQKY ZIJBAcvBxsKizQRFGhKd+8nuD58QWE71h6RxNCaWHxJjIWbcyfJS2o9r3ZP6k0tzc2Q7 EVN6BZ8CEQTm/1W6c7A/2NoOmCM6fmyzepT5NPHP9ao2vnQ5mSQ+TTVdA5EpDNjfKveM XyfQ== X-Gm-Message-State: APjAAAVgbfdqVSpht61aoQqNrdg/srt+dydWDBodOvrUkxfdgUCLoL08 JOFS3O+Nja7RdaaNC0coKcTcug== X-Google-Smtp-Source: APXvYqzGXiqD1bQ1Cl6tS7Xjee2AYuCmdOCCYUcEikPsLV5VWiZ7cmgLJNwATLPnYqgQanuIkw1R2g== X-Received: by 2002:adf:e9cc:: with SMTP id l12mr21013524wrn.131.1583153866434; Mon, 02 Mar 2020 04:57:46 -0800 (PST) Return-Path: Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id g10sm29215631wrr.13.2020.03.02.04.57.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Mar 2020 04:57:45 -0800 (PST) Date: Mon, 2 Mar 2020 12:57:44 +0000 From: "Leif Lindholm" To: Ard Biesheuvel Cc: devel@edk2.groups.io, liming.gao@intel.com Subject: Re: [PATCH 1/1] ArmPkg/MmCommunicationDxe: fix logic bug in DXE driver entrypoint Message-ID: <20200302125744.GG23627@bivouac.eciton.net> References: <20200226124103.17125-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 In-Reply-To: <20200226124103.17125-1-ard.biesheuvel@linaro.org> User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Feb 26, 2020 at 13:41:03 +0100, Ard Biesheuvel wrote: > Commit 2fe25a74d6fee3c2 ("ArmPkg/MmCommunicationDxe: relay architected PI > events to MM context") update the ARM specific standalone MM client > driver to register for certain events in the entrypoint code, but did > so in a way that makes the entrypoint always return with an error. > > Instead, return EFI_SUCCESS if registering for those events succeeds, > and back out the registrations that did succeed if one fails, and > return an error. > > Fixes: 2fe25a74d6fee3c2 ("ArmPkg/MmCommunicationDxe: relay architected PI events to MM context") > Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm Are you looking for this one to make the stable tag? You're not explicitly asking for it, but you're cc:ing Liming. > --- > ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c b/ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c > index a4ee4dcd864c..6c06b3574861 100644 > --- a/ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c > +++ b/ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c > @@ -385,8 +385,16 @@ MmCommunication2Initialize ( > MmGuidedEventNotify, mGuidedEventGuid[Index], > mGuidedEventGuid[Index], &mGuidedEvent[Index]); > ASSERT_EFI_ERROR (Status); > + if (EFI_ERROR (Status)) { > + while (Index-- > 0) { > + gBS->CloseEvent (mGuidedEvent[Index]); > + } > + goto UninstallProtocol; > + } > } > + return EFI_SUCCESS; > > +UninstallProtocol: > gBS->UninstallProtocolInterface ( > mMmCommunicateHandle, > &gEfiMmCommunication2ProtocolGuid, > -- > 2.17.1 >