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 024747803DA for ; Tue, 19 Sep 2023 14:31:52 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=QXyXd2lywzWNEOt0KNView0Y+k/IqQjYfZttoBZYHKQ=; c=relaxed/simple; d=groups.io; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:To:Cc:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20140610; t=1695133911; v=1; b=D9qWG9hHGjL/nZ3qwXKNDu7tJMKs5zTU0AuR9eB0d48QUXu4c96OGqXVCnGbn5hxetFrHXun L8xp7blb4oCXTn8B0cXW5KyFF/pyxE64DjZUN403iSnk9sgAQlJOyAbqvMpH2mQ/ukxu5lzrA3k N/MqMq3GGSiaapwBIOqBTdNg= X-Received: by 127.0.0.2 with SMTP id zOvOYY7687511xE4l3niznj9; Tue, 19 Sep 2023 07:31:51 -0700 X-Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by mx.groups.io with SMTP id smtpd.web10.10392.1695133910409995317 for ; Tue, 19 Sep 2023 07:31:50 -0700 X-Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 3E371CE129B for ; Tue, 19 Sep 2023 14:31:47 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D343C433C8 for ; Tue, 19 Sep 2023 14:31:45 +0000 (UTC) X-Received: by mail-lj1-f179.google.com with SMTP id 38308e7fff4ca-2c008d8fd07so38194501fa.1 for ; Tue, 19 Sep 2023 07:31:45 -0700 (PDT) X-Gm-Message-State: uWu4dHu3j39EeMNy58AhjDhux7686176AA= X-Google-Smtp-Source: AGHT+IGMGBfD90pP1yfyWot23fLkXcU2jOtnZkn7H0dwLiA1Sf0jbgwaUiI8UaNA/hpEHROKr+XTJ3FL2hjaBLx4GMg= X-Received: by 2002:a2e:6f0a:0:b0:2bf:f133:62e9 with SMTP id k10-20020a2e6f0a000000b002bff13362e9mr6760448ljc.17.1695133903394; Tue, 19 Sep 2023 07:31:43 -0700 (PDT) MIME-Version: 1.0 References: <20230919044303.21523-1-andrei.warkentin@intel.com> <20230919044303.21523-2-andrei.warkentin@intel.com> In-Reply-To: <20230919044303.21523-2-andrei.warkentin@intel.com> From: "Ard Biesheuvel" Date: Tue, 19 Sep 2023 14:31:32 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [edk2-devel] [PATCH v1 1/1] RISCV: Fix InternalLongJump to return correct value To: devel@edk2.groups.io, andrei.warkentin@intel.com, Michael Kinney , Andrew Fish , Leif Lindholm Cc: Yong Li , Sunil V L , Tuan Phan , Daniel Schaefer 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,ardb@kernel.org List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: text/plain; charset="UTF-8" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=D9qWG9hH; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=kernel.org (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 Hello Andrei, 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/OpensslLib/openssl > index de90e54bbe82..830bf8e1e474 160000 > --- a/CryptoPkg/Library/OpensslLib/openssl > +++ b/CryptoPkg/Library/OpensslLib/openssl > @@ -1 +1 @@ > -Subproject commit de90e54bbe82e5be4fb9608b6f5c308bb837d355 > +Subproject commit 830bf8e1e4749ad65c51b6a1d0d769ae689404ba This does not belong here > 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.
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? 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) Should we have some project/community wide guidance on this? (The problem is that claiming copyright gives the right to distribute the code without being bound by the terms of the license) > // > // 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 (#108839): https://edk2.groups.io/g/devel/message/108839 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] -=-=-=-=-=-=-=-=-=-=-=-