From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web11.3099.1595466636505151432 for ; Wed, 22 Jul 2020 18:10:36 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=i3VBpjdO; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: liming.gao@intel.com) IronPort-SDR: 3GoCzUnZaVq4MCijsgaam5IZK+A8Vij4DCmBOTRpbTCvk5wrPr0B3kbI0OFXKGn5Y/F32qK4WJ jpuM7mTKA+vw== X-IronPort-AV: E=McAfee;i="6000,8403,9690"; a="235317540" X-IronPort-AV: E=Sophos;i="5.75,383,1589266800"; d="scan'208";a="235317540" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jul 2020 18:10:36 -0700 IronPort-SDR: wBSbacdV9YvITw+bU+EH31meYnUv2nQNvI87OHXEcKS+eUcu+RVfckzZfjh0dniGQ4NYwsppbC i9yoo1omlCBQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,383,1589266800"; d="scan'208";a="326862245" Received: from orsmsx110.amr.corp.intel.com ([10.22.240.8]) by FMSMGA003.fm.intel.com with ESMTP; 22 Jul 2020 18:10:35 -0700 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX110.amr.corp.intel.com (10.22.240.8) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 22 Jul 2020 18:10:35 -0700 Received: from orsmsx606.amr.corp.intel.com (10.22.229.19) by ORSMSX609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 22 Jul 2020 18:10:35 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by orsmsx606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 22 Jul 2020 18:10:35 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.108) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 22 Jul 2020 18:10:35 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XTM8FmipdMOnA0nBOt9onfqVsU/xmh26meEDFWANtglfS+GZ+KKPumwVR/96FrXyTAgeRovx2f9NwiRRWuagTrjiHyl/rqyuLcxt1daNw8i/ahR3CxaW0rr/w3i0hJqq5mzDPCUGvmzTZfxUPqFLbUtUkvet5HOkLsIuVz4rtnn9jg6Iw3A0HUW6IFoh4w6E1iDlAolD3/5tCySkNDCNzgN8iE8wLuzPci1xXEty3Q6FIkvnKDpHOLhLq1gnAuhV1mBJG7tQZ8rR8ajg45bUTMmMiZWe/gdthA9JTduuHgIqdX2U3oPEg1NieS5foDhscO9P5XWiekDwGR5qvGwGvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hpqnNvYdXtlSf6J3ij37ZigNoAk1nXW6tiQnbarxxWM=; b=PaouaHoLO0UJO34Ss7FQtQyAbYYuPOsCQLh8aYZIp/v2VWRXbZAcX548ga3cC4EowQJvJt83ZWKNJyC2qWchaaHo4YASgvr3byiFMwSLIps2wl+h6VGMK9WOj0clFp/jLtS/R2A+1+PQb4Dc23l9n5wnwYqpznBxx2ucCCWH3vSAZitxyltqTRJHpugGRKvSB7c2NxQzQS/mEMt3/nEatujEHTparANdhGtO3SyCm4j+DbQfa5VuQRZi9SCRhmvWAtPqsFZbrt2OQlrxVGHT9t1elc0Qm8TTCgLtMwxZjvmisOcBjZZ51+g4D9KkwjyDPkC22DtFlmAhOvNJ50GA7Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hpqnNvYdXtlSf6J3ij37ZigNoAk1nXW6tiQnbarxxWM=; b=i3VBpjdOZ510oJAYl9OINu9TwDf2kHyDmKBj48d+ZyQ0pxzVRfvKCh7yAugRI31U97pF7vivvoDXYcVBs8g5aXHKFG3ODvWUDJUOhYz+3TINmixnn5DlgWZ0Ul4q/ZRarnwkBl6hgt1MurNbchOc7iNA7shK6AH4QHWL5iOplNw= Received: from MWHPR11MB1630.namprd11.prod.outlook.com (2603:10b6:301:e::7) by MW3PR11MB4683.namprd11.prod.outlook.com (2603:10b6:303:5c::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.20; Thu, 23 Jul 2020 01:10:34 +0000 Received: from MWHPR11MB1630.namprd11.prod.outlook.com ([fe80::7847:b564:1b55:b67e]) by MWHPR11MB1630.namprd11.prod.outlook.com ([fe80::7847:b564:1b55:b67e%6]) with mapi id 15.20.3216.020; Thu, 23 Jul 2020 01:10:34 +0000 From: "Liming Gao" To: "devel@edk2.groups.io" , "Gao, Liming" , Jessica Clarke CC: "leif@nuviainc.com" , "Kinney, Michael D" Subject: Re: [edk2-devel] [PATCH] MdePkg Base.h: Delete prototype for __builtin_return_address Thread-Topic: [edk2-devel] [PATCH] MdePkg Base.h: Delete prototype for __builtin_return_address Thread-Index: AQHWXp7MrDF3nWgtXUeDcNm/EMifTakQjqnAgAACxYCAAL3gwIADD0og Date: Thu, 23 Jul 2020 01:10:34 +0000 Message-ID: References: <20200720134946.33723-1-jrtc27@jrtc27.com> <20200720140446.GP12303@vanye> <1872CF8A-5DEE-4F17-B1C5-3E0E243594C8@jrtc27.com> <1623A39CDBDFA4B6.5706@groups.io> In-Reply-To: <1623A39CDBDFA4B6.5706@groups.io> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.2.0.6 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.194] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 39f7dd25-cbcc-4b80-f19d-08d82ea5339c x-ms-traffictypediagnostic: MW3PR11MB4683: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:519; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: rZSXGmdby6/veT5qT1Q60WPe5V/4o7PVngoAPKF2pC/SP5YuRbKCY7/cd6WcMrLfDDdFYW3onOV6DbqApmNPJ+Iveu/y7EivsVFnxODoprjYwgSV/T8AEMZI2NcYY7mKcEhBVerLonKUPDxUvVsVZBPzCsH/92j/WsO9LxpuG3hAOellQ57wto0z8O/JujNG3OrjX9k0qX2ZOwsSP5OYGV3gxbvSrD75gGWkMvOfmbl4XgngsOjgavsQwYMeBOCc7t/xgCuP4HfL4E1xe7OIYFWP0mYX4tb/2UDKv/WvHC1ROu9+2Igf3mzv5MThXLx7odWwpa+/Rclu+cE2FO1UdfWrS4wvlvZCbvdC2ouZcLH7jueLhhH+b4NCY1t77StbZYbnG/jWksNy6NNuX8r99w== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR11MB1630.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(136003)(346002)(376002)(366004)(396003)(39860400002)(55016002)(9686003)(8676002)(478600001)(186003)(64756008)(66446008)(66556008)(966005)(7696005)(52536014)(6506007)(66476007)(83380400001)(53546011)(76116006)(66946007)(316002)(33656002)(107886003)(26005)(54906003)(8936002)(5660300002)(71200400001)(4326008)(86362001)(2906002)(110136005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: wRLiYMKkBXHNDPHsNexYlF01Gx2KMbdZx6t+lry2jBAujYzY0ZsWbDSdC7hyyckzgwR2+vYFcUd9JsrTKe97F4BmoW4TZ3F8ubkyTsmWnZjk56UcFCwrinAVGdaT6zc4yMcTmR5w78gfcqXnPLMEktHZ04X5IQya6/0kSH6uKobnwnYVLCWPNm6XNW0wA4HVJEMXTfUXET+kxsybUb7t9ZjlkKzUfHmF0IpEoggGNTqkpGafQgCufsfjieExp5wWqWdpvQG1Qd2jKpIFm3QIiaLfWLATGkky+dItqr5vGoLA95laCqoUnd64JHDAcay1vazsejRdCc+gqH8RqAHGXQCzc4NPB08AO/eFeh83BNUjqT4hP8Ql3Cd+357NV+fhF/2okL+of003peGuRCeEvySI/J/aBaqoNNvXmk+OKMbVZQnOmCZfTo7WiACSk0K76Q6F5yQSfhrmUWOlHVtQkMfZuxx3iVxEEeADHg0CUyfUKzQruF9E45bFaTJ05XRW MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR11MB1630.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 39f7dd25-cbcc-4b80-f19d-08d82ea5339c X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Jul 2020 01:10:34.2700 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 28MHu2rQah/wLomBbKk3TCEeLqG2//8dcLdJwhEPLJNZdOs0Wp6xVDck74JL2loKCtfGqM27zGxU1n9kt/ipEA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR11MB4683 Return-Path: liming.gao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable Jess: In the commit message, below line is too long that can't pass patch chec= k. Can you move this line from the commit message to BZ? [1] https://github.com/llvm/llvm-project/commit/41af97137572ad6d4dafc872e7= ecf6bbb08d4984 Thanks Liming -----Original Message----- From: devel@edk2.groups.io On Behalf Of Liming Gao Sent: 2020=1B$BG/=1B(B7=1B$B7n=1B(B21=1B$BF|=1B(B 10:30 To: Jessica Clarke Cc: devel@edk2.groups.io; leif@nuviainc.com; Kinney, Michael D Subject: Re: [edk2-devel] [PATCH] MdePkg Base.h: Delete prototype for __bu= iltin_return_address Jess: OK. Seemly, there is no impact with this change. Reviewed-by: Liming Gao= Thanks Liming -----Original Message----- From: Jessica Clarke Sent: 2020=1B$BG/=1B(B7=1B$B7n=1B(B20=1B$BF|=1B(B 23:06 To: Gao, Liming Cc: devel@edk2.groups.io; leif@nuviainc.com; Kinney, Michael D Subject: Re: [edk2-devel] [PATCH] MdePkg Base.h: Delete prototype for __bu= iltin_return_address It will always look like void *__builtin_return_address(unsigned) and work= like that, just that under the hood it's being implemented slightly differ= ently, which has the unfortunate side-effect of triggering this bug. We've = been compiling the embedded EDK2 in our CheriBSD with that line deleted for= years now with no issue. Jess > On 20 Jul 2020, at 15:58, Gao, Liming wrote: >=20 > Clarke: > Do you mean CLANG compiler may have the different prototype for __built= in_return_address()? If so, dose __builtin_return_address (L) always work?= =20 >=20 > Thanks > Liming >> -----Original Message----- >> From: devel@edk2.groups.io On Behalf Of Leif=20 >> Lindholm >> Sent: Monday, July 20, 2020 10:05 PM >> To: Jessica Clarke >> Cc: devel@edk2.groups.io; Kinney, Michael D=20 >> ; Gao, Liming >> Subject: Re: [edk2-devel] [PATCH] MdePkg Base.h: Delete prototype for= =20 >> __builtin_return_address >>=20 >> +Mike, Liming >>=20 >> On Mon, Jul 20, 2020 at 14:49:46 +0100, Jessica Clarke wrote: >>> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1004 >>>=20 >>> Being a compiler builtin, the type of __builtin_return_address is=20 >>> already known to the compiler so no prototype is needed. Clang also=20 >>> errors out when redeclaring certain builtins like this[1], though=20 >>> currently only for ones with custom type checking. At the moment,=20 >>> __builtin_return_address does not use custom type checking and so=20 >>> does not trigger this error, however, the CHERI fork of LLVM, which=20 >>> will form the basis of the toolchain for Arm's experimental Morello=20 >>> platform, does use custom type checking for it, and so gives an=20 >>> error. Thus, simply delete the unnecessary line. >>>=20 >>> [1] >>> https://github.com/llvm/llvm-project/commit/41af97137572ad6d4dafc872 >>> e7ecf6bbb08d4984 >>>=20 >>> Cc: Leif Lindholm >>> Signed-off-by: Jessica Clarke >>> --- >>> MdePkg/Include/Base.h | 1 - >>> 1 file changed, 1 deletion(-) >>>=20 >>> diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h index=20 >>> 85a091b9d5..8e4271f6ea 100644 >>> --- a/MdePkg/Include/Base.h >>> +++ b/MdePkg/Include/Base.h >>> @@ -1273,7 +1273,6 @@ typedef UINTN RETURN_STATUS; >>> **/ >>> #define RETURN_ADDRESS(L) ((L =3D=3D 0) ? _ReturnAddress() : (VO= ID *) 0) >>> #elif defined (__GNUC__) || defined (__clang__) >>> - void * __builtin_return_address (unsigned int level); >>=20 >> Agreed this looks somewhat bonkers. >> And I can't see any ill effects from dropping it, so: >> Reviewed-by: Leif Lindholm >>=20 >>> /** >>> Get the return address of the calling function. >>>=20 >>> -- >>> 2.20.1 >>>=20 >>=20 >>=20 >=20