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 EC555D81179 for ; Tue, 19 Sep 2023 04:43:13 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=usYU4+LTLpzE28+2UmF2QMwvPAHOH4dwl4M5Pv7RbKk=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1695098592; v=1; b=DbJoNKsMye/kkCCZanJaHi/42Ga2DByVde1Xc9oVATVa4pSNMo6o07jFt/466Ez242Im5PQt BnnxLofBU4eL4/pyccBTuZWNrp6whmdj5LL1MzIPb5Q3gPOz5v+BqWKURlOELx/x17Y+Lvq0vK5 P7H9HbFhbfIaxpSMaMGwgNhM= X-Received: by 127.0.0.2 with SMTP id 59XzYY7687511xodQOKIMCax; Mon, 18 Sep 2023 21:43:12 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by mx.groups.io with SMTP id smtpd.web10.603.1695098591855162739 for ; Mon, 18 Sep 2023 21:43:12 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10837"; a="370167162" X-IronPort-AV: E=Sophos;i="6.02,158,1688454000"; d="scan'208";a="370167162" X-Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2023 21:43:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10837"; a="836290830" X-IronPort-AV: E=Sophos;i="6.02,158,1688454000"; d="scan'208";a="836290830" X-Received: from awarkent-desk.amr.corp.intel.com ([10.212.118.183]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2023 21:43:10 -0700 From: "Andrei Warkentin" To: devel@edk2.groups.io Cc: Andrei Warkentin , Yong Li , Sunil V L , Tuan Phan , Daniel Schaefer Subject: [edk2-devel] [PATCH v1 1/1] RISCV: Fix InternalLongJump to return correct value Date: Mon, 18 Sep 2023 23:43:03 -0500 Message-Id: <20230919044303.21523-2-andrei.warkentin@intel.com> In-Reply-To: <20230919044303.21523-1-andrei.warkentin@intel.com> References: <20230919044303.21523-1-andrei.warkentin@intel.com> MIME-Version: 1.0 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,andrei.warkentin@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: nFRf8q0Q05XV92p4M04LcBkNx7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=DbJoNKsM; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none) InternalLongJump was not returning the 2nd parameter passed to LongJmp (Value) as the return value from SetJmp. Seen with code compiled with -Os, where an LongJmp (Buffer, -1) somehow translated to SetJmp returning 0... Cc: Yong Li Cc: Sunil V L Cc: Tuan Phan Cc: Daniel Schaefer Signed-off-by: Andrei Warkentin --- CryptoPkg/Library/OpensslLib/openssl | 2 +- MdePkg/Library/BaseLib/RiscV64/RiscVSetJumpLongJump.S | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/CryptoPkg/Library/OpensslLib/openssl b/CryptoPkg/Library/OpensslLib/openssl index de90e54bbe82..830bf8e1e474 160000 --- a/CryptoPkg/Library/OpensslLib/openssl +++ b/CryptoPkg/Library/OpensslLib/openssl @@ -1 +1 @@ -Subproject commit de90e54bbe82e5be4fb9608b6f5c308bb837d355 +Subproject commit 830bf8e1e4749ad65c51b6a1d0d769ae689404ba diff --git a/MdePkg/Library/BaseLib/RiscV64/RiscVSetJumpLongJump.S b/MdePkg/Library/BaseLib/RiscV64/RiscVSetJumpLongJump.S index 34486eabba4c..e97a7d0727b8 100644 --- a/MdePkg/Library/BaseLib/RiscV64/RiscVSetJumpLongJump.S +++ b/MdePkg/Library/BaseLib/RiscV64/RiscVSetJumpLongJump.S @@ -3,6 +3,7 @@ // Set/Long jump for RISC-V // // Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.
+// Copyright (c) 2023, Intel Corporation. All rights reserved.
// // SPDX-License-Identifier: BSD-2-Clause-Patent // @@ -47,9 +48,5 @@ InternalLongJump: REG_L s10, 11*SZREG(a0) REG_L s11, 12*SZREG(a0) REG_L sp, 13*SZREG(a0) - - add a0, s0, 0 - add a1, s1, 0 - add a2, s2, 0 - add a3, s3, 0 + mv a0, a1 ret -- 2.34.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#108816): https://edk2.groups.io/g/devel/message/108816 Mute This Topic: https://groups.io/mt/101450445/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-