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 B8ED5AC11E4 for ; Fri, 29 Sep 2023 15:08:16 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=DUZptZO/ykpLp8Mmi2fFjZoboLjH6+ZpxejqS8vE4vk=; c=relaxed/simple; d=groups.io; h=Received-SPF:ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:Authentication-Results-Original:Message-ID:Date:User-Agent:Subject:To:Cc:References:From:In-Reply-To:MIME-Version:NoDisclaimer:Original-Authentication-Results:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Transfer-Encoding; s=20140610; t=1696000095; v=1; b=MwIEdwzK6tlpf+T4c0gsLay8B61RtGz15Zx5IfKTQQMqJau+dSkHKEvHAWhpL0OBsNztS23u JWKgcM/xQBcNkbMmIDiT0lW0dpHHq7LKSHD9rk9flTYGvc+PUAMogGHExSpl2qqF2YAFhMGeB+h 36hoO9FZaSByfFR+DCSwQUbY= X-Received: by 127.0.0.2 with SMTP id Cp5rYY7687511xJuQeFUf8Wf; Fri, 29 Sep 2023 08:08:15 -0700 X-Received: from EUR05-AM6-obe.outbound.protection.outlook.com (EUR05-AM6-obe.outbound.protection.outlook.com [40.107.22.64]) by mx.groups.io with SMTP id smtpd.web10.20039.1696000094609896948 for ; Fri, 29 Sep 2023 08:08:14 -0700 X-Received: from AS8PR07CA0006.eurprd07.prod.outlook.com (2603:10a6:20b:451::27) by PA4PR08MB6109.eurprd08.prod.outlook.com (2603:10a6:102:e2::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.26; Fri, 29 Sep 2023 15:08:09 +0000 X-Received: from AM7EUR03FT032.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:451:cafe::86) by AS8PR07CA0006.outlook.office365.com (2603:10a6:20b:451::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.15 via Frontend Transport; Fri, 29 Sep 2023 15:08:09 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM7EUR03FT032.mail.protection.outlook.com (100.127.140.65) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.19 via Frontend Transport; Fri, 29 Sep 2023 15:08:09 +0000 X-Received: ("Tessian outbound 6d14f3380669:v211"); Fri, 29 Sep 2023 15:08:08 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 0daee62347b55911 X-CR-MTA-TID: 64aa7808 X-Received: from 3f384dcb8a43.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id EE6307FC-D3D9-49A6-AA10-C1304CF7A954.1; Fri, 29 Sep 2023 15:08:01 +0000 X-Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 3f384dcb8a43.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 29 Sep 2023 15:08:01 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hiQAEvquubeUVbhjoQaZFekaZb/CWbN3LVssSHs+J4IplAZUvxdO/3lXevxCvRtVEVH+ItlGo2NKHLQxUzXithLWe7djXOEMgK1acVf15s5RZJLwssCzW2MlpHSxz11lrEANzgtmDairVq9IF6puQqo9Is6z6jHUzE8zEmgyUFO3GBwu0CvGKgYL6kpGCrd5VDT4DR4bdLYNXm9to3JvcWcowYvSOsIYFzrq7HPX1yS1jRtQAIrvIAHWiuh6BVz5bmW+zl+VChnEcpL5ZbD/+HmYJGDOY5FX1jKewUwwvov1N0zTpOAXl8xA+DPNlLiGor7OOBEiUW/tWlSPzWL7jg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=N/cr4T74UrMpT1XglUgyJnXJLpu36tsc+UVF0BebCas=; b=QkN5rDkW//yFkC67l6yv9q8TVk/+VX+UGu5KETvzimvHR0Zf0ZjVVXPXJIT/z0w4o4JlDPS8MtjI3oJofO9vg7rF2xMlmwo+OwvtQP2NI0AXDOCzwNo41ox9PXMjbKPStW1eM/QZbyojRvJHcCsoYv6d2ncFHkkLTZmjZ2uH3bjo4xmySjmTVheuXiHMOWlu+C3cl92R1pr7bLG/R1ZKamouFy2JbUEWE/TwTEucCyCz4w6JL+Ri2c/CgWOYq0O2HksxgM9AbctYkzWOXEHfh9hccrPXdrE57Ga1NkavcEF35vHRe/H6hvC5J45CFXUwZZxV2UtNsGoRqHUGdQzQqQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-Received: from AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) by VI1PR08MB5310.eurprd08.prod.outlook.com (2603:10a6:803:135::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.26; Fri, 29 Sep 2023 15:07:59 +0000 X-Received: from AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::ac37:4594:ab86:59ce]) by AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::ac37:4594:ab86:59ce%4]) with mapi id 15.20.6838.024; Fri, 29 Sep 2023 15:07:59 +0000 Message-ID: <49efe5b0-2702-9fab-960f-3dc34f95ae3c@arm.com> Date: Fri, 29 Sep 2023 16:07:57 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [edk2-devel] [PATCH v2 5/5] MdePkg/BaseLib: ensure ARM LongJump never returns 0 To: Leif Lindholm , devel@edk2.groups.io Cc: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= , Ard Biesheuvel , "nd@arm.com" References: <20230926171523.368706-1-quic_llindhol@quicinc.com> <20230926171523.368706-6-quic_llindhol@quicinc.com> From: "Sami Mujawar" In-Reply-To: <20230926171523.368706-6-quic_llindhol@quicinc.com> X-ClientProxiedBy: LO2P265CA0307.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a5::31) To AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: AS8PR08MB6806:EE_|VI1PR08MB5310:EE_|AM7EUR03FT032:EE_|PA4PR08MB6109:EE_ X-MS-Office365-Filtering-Correlation-Id: 7bc3cf22-aa9d-4832-78a1-08dbc0fde441 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: O8fcWXKmkpuNTuQ9HOdOs+C6AXEyE04SMNwjlpsgPmNkNn4Qe2ffRY2g/r+nv+pfIKqJJHx+T2ubHXZiS8G2E1K98sxPe+mHVScGstzbkONBCB1dmovOlGhM6pa5Ercpjb89l2V9CeROV4Mikt/2htpzDNMq40nEQFQE+Kl1haM65at13TvAIp0bFB4K3prVO1/sFjBy3F0Gpsf4TQUTt6RdiZZCH+P4PSCqopvpWhUighwLJpCgyfRCCVNsz9WidqzQQ4efJfp6AKVg781ubk1VN+A0ggwIX6fwMbSG0KV5nqRCXUrVBIO4LCwr0X/MgC0v4CsHLoymOX0dZgP+odhDbvwfLJZj/Kfney/0zQ3Fxn06YAPhuEQ3othd/iyNiW1uyF6g61V85tIalOXbOUyQ2fzI/fCLHRLefyNJxWPAoVMdsowNeKOkMm2GL2BS5lTAxLJwXdQbatBvaYz2qizVuDwQ9C1jX56aE6ceKCjjJOy5gjF0u+xdVMzWsxdwgTK4ImuVFJiQDMygc3RuMN+W0D/1ubu/yP9xlnT2lkYOrL83SkQDpvH5BwB2O3/QrUphcfulASke0hEc+H2JMssQ17inQBteQyU+bbnncKRnj8rzbzdZHg4+pvEkqMDR38KJHh1A6G7BJwWrcw50Xg== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR08MB6806.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(39850400004)(366004)(376002)(346002)(396003)(230922051799003)(451199024)(186009)(64100799003)(1800799009)(6486002)(31686004)(6506007)(2616005)(53546011)(6512007)(38100700002)(31696002)(86362001)(36756003)(4326008)(2906002)(478600001)(83380400001)(8936002)(8676002)(26005)(41300700001)(54906003)(44832011)(66476007)(316002)(66556008)(5660300002)(66946007)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB5310 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT032.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 353cd20c-2d9d-4064-e4db-08dbc0fdde5e X-Microsoft-Antispam-Message-Info: zXC5CS5WXZmxDoIAY4M3Y+Y2KOulTSbVdAhlxxmt3lPh8El7qiJ9vZ2jsoFXJOVxb0mK99n5GyXw2gTG58PJXQa3IaVaja5IgTNg5iuWjUPETmWcF0VuBb5Ns5bf/+rw8V20ghzthRZ3w2P/cn42UjaUuKX8JHhuRFIqQ+Nvnb1K2F4j425/xw91rBGP4iW6L8M61RKazcKh4r9Vkm1P7fZZGlP4R2XGjiFLEPwiQRMiBgMt1hz0O3xuYXBMb9M182WZJKcEdZBOdGKeo5JCKaCb0TnxQ/AJGyjRrPRY7uGnhstev7Y/gxl1TnXWFrE0PtSNMvF928zm5Br2dHL0tL5wV35A1zIiZAf09nn7Kbcrw1gojrHDj8XPidsjZlQePCLcu/uiQUxsvMOn0/LInrDk+LI65/FxyC38cYxlvoJa190tYeDRg2NVtlJr3UVoTLGDq8wMW5soA1Tiqq8AUuRoau73C6HJv+ZvaVR5QTqZF0xcR1ccK9fdkATMI3JjEwLUubJK2X4JIc6IFX4Q95ugs2de44bnDLwQ8OjgzjRMyFAVKY++og5pFZhGlMvvI868YnkdvMN4/DLuU/kQAnP81p4QX1C7zDdbtFs19CIpnolQSlRn5aWBJNphmyiENYY9zcST3ozOYnAjTrhxWcLCEtWFrEQyxpWHB7jJHUszTD2VA8VPf6F+ZjIG50grSr/4uhcJWjsKdN+XY2XjLuV+PIJc/mgDR29upaynSdKRdTNEm9xT3v9pauSMVWDEVEzAaUOCgORSdsaRRV7ZCg== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Sep 2023 15:08:09.1187 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7bc3cf22-aa9d-4832-78a1-08dbc0fde441 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM7EUR03FT032.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB6109 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,sami.mujawar@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: x4GhZWbXxMMb3p5ynlj2gI3Ax7686176AA= 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=MwIEdwzK; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=arm.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 Hi Leif, Thank you for this patch. There is a minor typo in the commit message, other than that these=20 changes look good to me. Reviewed-by: Sami Mujawar Regards, Sami Mujawar On 26/09/2023 06:15 pm, Leif Lindholm wrote: > The ARM implementation of of InternalLongJump always returned the value [SAMI] Minor typo in that 'of' is repeated twice. > Value - but it is not supposed to ever return 0. Add the test to prevent > that, and return 1 if Value is 0 - as is already present in AArch64. > > Signed-off-by: Leif Lindholm > Cc: Ard Biesheuvel > Cc: Sami Mujawar > --- > MdePkg/Library/BaseLib/Arm/SetJumpLongJump.S | 2 ++ > MdePkg/Library/BaseLib/Arm/SetJumpLongJump.asm | 2 ++ > 2 files changed, 4 insertions(+) > > diff --git a/MdePkg/Library/BaseLib/Arm/SetJumpLongJump.S b/MdePkg/Librar= y/BaseLib/Arm/SetJumpLongJump.S > index e91320252255..14006c6123e3 100644 > --- a/MdePkg/Library/BaseLib/Arm/SetJumpLongJump.S > +++ b/MdePkg/Library/BaseLib/Arm/SetJumpLongJump.S > @@ -57,6 +57,8 @@ ASM_PFX(SetJump): > ASM_PFX(InternalLongJump): > ldmia r0, {r3-r12,r14} > mov r13, r3 > + cmp r1, #0 > + moveq r1, #1 > mov r0, r1 > bx lr > =20 > diff --git a/MdePkg/Library/BaseLib/Arm/SetJumpLongJump.asm b/MdePkg/Libr= ary/BaseLib/Arm/SetJumpLongJump.asm > index ef02d85e0e66..15eb3dc28fb7 100644 > --- a/MdePkg/Library/BaseLib/Arm/SetJumpLongJump.asm > +++ b/MdePkg/Library/BaseLib/Arm/SetJumpLongJump.asm > @@ -57,6 +57,8 @@ SetJump > InternalLongJump > LDM R0, {R3-R12,R14} > MOV R13, R3 > + CMP R1, #0 > + MOVEQ R1, #1 > MOV R0, R1 > BX LR > =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 (#109204): https://edk2.groups.io/g/devel/message/109204 Mute This Topic: https://groups.io/mt/101600811/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-