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 AE0C9AC145D for ; Tue, 19 Sep 2023 14:41:26 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=Cz2kZQeG1zJ+0QU7N5DI+ZVyJKy6GmGKWazeX519fXE=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:User-Agent:Subject:To:CC:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1695134485; v=1; b=tkKcM9UcDFk9XtdCKq1ossj3Nn2543hQA/9UfplqQ8pXNTE7A6LUyu/7nU9yMe0374igYyyZ Q0oXINYD8OhowsQHWuPyZ+9C+RVEuBFE9GHgBEP47RHHhL9xY5hDStg8BazVW1InzQE2Nvd8BNs syHiaGA1BLVOApUBGrEnmF0E= X-Received: by 127.0.0.2 with SMTP id q8OkYY7687511x8vtBLakn6R; Tue, 19 Sep 2023 07:41:25 -0700 X-Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by mx.groups.io with SMTP id smtpd.web11.10974.1695134484552759442 for ; Tue, 19 Sep 2023 07:41:24 -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 38JDsrug028092; Tue, 19 Sep 2023 14:41: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 3t6mtsb47j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 19 Sep 2023 14:41: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 38JEfI4u023512 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 19 Sep 2023 14:41:19 GMT X-Received: from [10.111.128.147] (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; Tue, 19 Sep 2023 07:41:16 -0700 Message-ID: <6b5d732e-fe65-44c0-b63a-f4320846da9e@quicinc.com> Date: Tue, 19 Sep 2023 15:41:14 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [PATCH v1 1/1] RISCV: Fix InternalLongJump to return correct value To: Ard Biesheuvel , , , Michael Kinney , Andrew Fish CC: Yong Li , Sunil V L , Tuan Phan , Daniel Schaefer References: <20230919044303.21523-1-andrei.warkentin@intel.com> <20230919044303.21523-2-andrei.warkentin@intel.com> From: "Leif Lindholm" 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: nk9jHoMaTgKZaSCR9H_-_ws3wsOXo4JK X-Proofpoint-ORIG-GUID: nk9jHoMaTgKZaSCR9H_-_ws3wsOXo4JK 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: md0oSw22B4KOpWBisSpjKEMbx7686176AA= Content-Language: en-GB Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=tkKcM9Uc; 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 2023-09-19 15:31, Ard Biesheuvel wrote: > Hello Andrei, >=20 > On Tue, 19 Sept 2023 at 04:43, Andrei Warkentin > wrote: >> >> 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/Op= ensslLib/openssl >> index de90e54bbe82..830bf8e1e474 160000 >> --- a/CryptoPkg/Library/OpensslLib/openssl >> +++ b/CryptoPkg/Library/OpensslLib/openssl >> @@ -1 +1 @@ >> -Subproject commit de90e54bbe82e5be4fb9608b6f5c308bb837d355 >> +Subproject commit 830bf8e1e4749ad65c51b6a1d0d769ae689404ba >=20 > This does not belong here >=20 >> diff --git a/MdePkg/Library/BaseLib/RiscV64/RiscVSetJumpLongJump.S b/Mde= Pkg/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.
>=20 > I suppose there is some internal policy at Intel that tells you to > claim copyright, but do you really think fixing existing HP code by > removing 4 instructions and adding one back is sufficient for claiming > copyright on the entire file? >=20 > Note that I am not objecting to this in principle: I am just curious > (and I have objected in the past to patches that only removed lines > from existing code and then added a copyright line) >=20 > Should we have some project/community wide guidance on this? I reacted early on when joining this project that copyright was=20 frequently added/bumped for trivial changes, including things like=20 fixing typos in comments. So I think the custom for this project is that=20 the bar is a lot lower than for projects like Linux, grub, etc. So I see this as on par for tianocore. > (The problem is that claiming copyright gives the right to distribute > the code without being bound by the terms of the license) Wouldn't all the other copyright holders also need to agree? / Leif >> // >> // 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 >> >> >> >>=20 >> >> -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#108844): https://edk2.groups.io/g/devel/message/108844 Mute This Topic: https://groups.io/mt/101450445/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/19134562= 12/xyzzy [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-