From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 02F461A1E13 for ; Fri, 9 Sep 2016 04:18:13 -0700 (PDT) Received: by mail-wm0-x22b.google.com with SMTP id w12so26945673wmf.0 for ; Fri, 09 Sep 2016 04:18:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=HiI2vC7XP9d8hr4KbsSqlqQwSI0lFjQoQy1ForlGq2A=; b=GlD2r2A2RfEfwdwqcbdSlGthDkTgvw18s99UwCYItXEOQ/nkiQNNybahprb3KXagRJ cMUfRErce/US0B3NQXqMnv53H4lnJkVdg31F48HlgZMRRpcKBgzqmVNU2icV1UbyHcso TjUKGuZFJbK2cgGBCcB7PZJvuo5+qjElIWco0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=HiI2vC7XP9d8hr4KbsSqlqQwSI0lFjQoQy1ForlGq2A=; b=P+kAMCuvGzmg/9J4N8VoxIC+BS+frCVgfV0CEUIJEA73lk++IxiW1XZAgdYS/gPxnN IiFOErAlohZBOY3kD9byBMDoL+iIMwir+kkEDVpQgNPa69nMz7PsL/2B1eIYC24Stpg4 TKVPWmQljI6Yk6AfylRftJelD/IlxMQ8908dXS2zZNSUwH758b9vLRTdH/nrG5C4yqx3 o+DSNsAgcUXJgZPYmIRP1K3BcUgxe62VkSsE8040inLGT2SDKva2MgUcogtGiQupZX9v 2dECO7ZF6wXQK10LpnCycLXq74TiDmJ6OURe8Nr3eCTA+JQ1lhJlDJ0VWj8kIKLkyf1a OFeA== X-Gm-Message-State: AE9vXwPnOIyiHFFKHGDbPFfkOfxhDgmX55V1oQVtmJ3j30wsqLW032g+X+tDgHB2foimewRR X-Received: by 10.28.10.194 with SMTP id 185mr2328352wmk.53.1473419892593; Fri, 09 Sep 2016 04:18:12 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id bo7sm2890755wjb.28.2016.09.09.04.18.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Sep 2016 04:18:11 -0700 (PDT) Date: Fri, 9 Sep 2016 12:18:10 +0100 From: Leif Lindholm To: Ard Biesheuvel Cc: edk2-devel@lists.01.org, liming.gao@intel.com Message-ID: <20160909111810.GM16080@bivouac.eciton.net> References: <1473405686-5465-1-git-send-email-ard.biesheuvel@linaro.org> MIME-Version: 1.0 In-Reply-To: <1473405686-5465-1-git-send-email-ard.biesheuvel@linaro.org> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [PATCH] MdePkg/BaseLib AARCH64: terminate stack frame list on stack switch X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Sep 2016 11:18:14 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Sep 09, 2016 at 08:21:26AM +0100, Ard Biesheuvel wrote: > When switching to the DXE phase stack, set the frame pointer to zero so > that code walking the stack frame will not try to access stack frames\ Trailing '\'. > belonging to the old stack. Do you mean that code will check for zero and stop processing, or that it will be accessing rubbish instead of parsing a valid-looking frame? Either is an improvement, but if it is the latter I would prefer it more explicitly stated. You can fix up on commit: Reviewed-by: Leif Lindholm > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel > --- > MdePkg/Library/BaseLib/AArch64/SwitchStack.S | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/MdePkg/Library/BaseLib/AArch64/SwitchStack.S b/MdePkg/Library/BaseLib/AArch64/SwitchStack.S > index 2bce9c998f4f..c3ac8d7e4dfe 100644 > --- a/MdePkg/Library/BaseLib/AArch64/SwitchStack.S > +++ b/MdePkg/Library/BaseLib/AArch64/SwitchStack.S > @@ -40,6 +40,7 @@ InternalSwitchStackAsm ( > ); > **/ > ASM_PFX(InternalSwitchStackAsm): > + mov x29, #0 > mov x30, x0 > mov sp, x3 > mov x0, x1 > -- > 2.7.4 >