From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id C8CF5AC152E for ; Mon, 2 Oct 2023 15:52:24 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=MmPo4YV30+8wNOpJW6I8gbc+xz8gp9/C3IH/ggG4wQA=; c=relaxed/simple; d=groups.io; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Disposition; s=20140610; t=1696261943; v=1; b=g6ocVj97oYN9D1i+3Dqm2OWEETSCa6B7zV3+5pnYxEioVyAPpFoA5lWAQc3M2z+ynWBHC1Zy 7NzT949IS1pCxff1ZIRrfgoJ+H3X+z1sQzUJgr3UWqprcUrtRGxDjEeM4bbQ5kKux87Ji7i3jOx jo+YcVeEMgjm78hn7NHEv79M= X-Received: by 127.0.0.2 with SMTP id p62ZYY7687511x4a9KiDyaas; Mon, 02 Oct 2023 08:52:23 -0700 X-Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by mx.groups.io with SMTP id smtpd.web10.85806.1696261942878927791 for ; Mon, 02 Oct 2023 08:52:22 -0700 X-Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 392FF7io014687; Mon, 2 Oct 2023 15:52:20 GMT X-Received: from nasanppmta03.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3teamxm3tg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 02 Oct 2023 15:52:19 +0000 X-Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 392FqJ46017317 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 2 Oct 2023 15:52:19 GMT X-Received: from qc-i7.hemma.eciton.net (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.36; Mon, 2 Oct 2023 08:52:17 -0700 Date: Mon, 2 Oct 2023 16:52:14 +0100 From: "Leif Lindholm" To: Sami Mujawar CC: , Philippe =?iso-8859-1?Q?Mathieu-Daud=E9?= , Ard Biesheuvel , "nd@arm.com" Subject: Re: [edk2-devel] [PATCH v2 2/5] MdePkg/BaseLib: add ASSERT in ARM* SetJump implementations Message-ID: References: <20230926171523.368706-1-quic_llindhol@quicinc.com> <20230926171523.368706-3-quic_llindhol@quicinc.com> MIME-Version: 1.0 In-Reply-To: X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-GUID: zAglshcZ1Yn-EtCoKEzmZQ2ynpvcfh0g X-Proofpoint-ORIG-GUID: zAglshcZ1Yn-EtCoKEzmZQ2ynpvcfh0g Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,quic_llindhol@quicinc.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: zKL2Xy6JcdvmAPhOZEheDxDPx7686176AA= Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=g6ocVj97; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=quicinc.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On Fri, Sep 29, 2023 at 16:06:54 +0100, Sami Mujawar wrote: > Hi Leif, > > Thank you for this patch. > > This patch looks good to me. > > Just a question, should we also do the same for the AArch32 builds? Hmm, fair point. But I just managed to get rid of this set after nearly 4 years :):) > In either case, > > Reviewed-by: Sami Mujawar Thanks! Commit message typo in 5/5 fixed and series merged as f6a314e5b5dc..1a66bd51ca21. Regards, Leif > Regards, > > Sami Mujawar > > On 26/09/2023 06:15 pm, Leif Lindholm wrote: > > The SetJump comment header states that: > > If JumpBuffer is NULL, then ASSERT(). > > > > However, this was not currently done. > > Add a call to InternalAssertJumpBuffer. > > > > Signed-off-by: Leif Lindholm > > Cc: Ard Biesheuvel > > Cc: Sami Mujawar > > --- > > MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.S | 8 ++++++++ > > MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.asm | 8 ++++++++ > > 2 files changed, 16 insertions(+) > > > > diff --git a/MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.S b/MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.S > > index 78db9b3d1e78..de79ad3a0a3e 100644 > > --- a/MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.S > > +++ b/MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.S > > @@ -46,6 +46,14 @@ GCC_ASM_EXPORT(InternalLongJump) > > # > > ASM_PFX(SetJump): > > AARCH64_BTI(c) > > +#ifndef MDEPKG_NDEBUG > > + stp x29, x30, [sp, #-32]! > > + mov x29, sp > > + str x0, [sp, #16] > > + bl InternalAssertJumpBuffer > > + ldr x0, [sp, #16] > > + ldp x29, x30, [sp], #32 > > +#endif > > mov x16, sp // use IP0 so save SP > > #define REG_PAIR(REG1, REG2, OFFS) stp REG1, REG2, [x0, OFFS] > > #define REG_ONE(REG1, OFFS) str REG1, [x0, OFFS] > > diff --git a/MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.asm b/MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.asm > > index d8b267addc1a..c2774eece311 100644 > > --- a/MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.asm > > +++ b/MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.asm > > @@ -44,6 +44,14 @@ > > ; ); > > ; > > SetJump > > +#ifndef MDEPKG_NDEBUG > > + stp x29, x30, [sp, #-32]! > > + mov x29, sp > > + str x0, [sp, #16] > > + bl InternalAssertJumpBuffer > > + ldr x0, [sp, #16] > > + ldp x29, x30, [sp], #32 > > +#endif > > mov x16, sp // use IP0 so save SP > > #define REG_PAIR(REG1, REG2, OFFS) stp REG1, REG2, [x0, OFFS] > > #define REG_ONE(REG1, OFFS) str REG1, [x0, OFFS] -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#109256): https://edk2.groups.io/g/devel/message/109256 Mute This Topic: https://groups.io/mt/101600803/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-