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 7B7B87803DF for ; Tue, 19 Sep 2023 13:19:29 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=aEAcRYJFl1IfpYisRFV99NagJUz4jZOMwQl0zggyYxY=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:Message-ID:Date:User-Agent:Subject:To:Cc:References:From:In-Reply-To:MIME-Version: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=1695129568; v=1; b=UMo08ctpbRmrJ3d+S9ty218xDl4ShgSBBz4TyUp+2Rg3GElWqsGwnofhkRKwsSefwC5fS/oX mRYXAWhdyDoP5WZl9sg8R8ZAdRVuV29dqB4oYqLO9/ybeqH8dKMxhlCCMTsCyNFgBxb3yKsI0WE 9OGgMwcAMzt5oLa2NXqVD/ZA= X-Received: by 127.0.0.2 with SMTP id nKuFYY7687511xzwhxjLh5to; Tue, 19 Sep 2023 06:19:28 -0700 X-Received: from NAM10-DM6-obe.outbound.protection.outlook.com (NAM10-DM6-obe.outbound.protection.outlook.com [40.107.93.61]) by mx.groups.io with SMTP id smtpd.web11.8352.1695129566983411283 for ; Tue, 19 Sep 2023 06:19:27 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DA27rdcbLFBX+kB4m1VAxo3hSPst/4eCgX+Xlne7MIxzOnpniGmx39MVObpKySHQusNLNf8vqrIzkX+nC6nOcOjKgb0/aHQYHEILez0tWUzFNHm+cvxp6UFm0htUVu5g+CHwO3QJP+SJfYIbr2ZLvjYf63Zf51ftGVMtd3oPC4Xt0qIkMOOA7201ViXcw5bksdl4iIpAzqibRNjNJV9uksAuSmsU/Bi0x5UJysPR4xBmXCuU0TZUNbpKYwukBJJ5LnUmPQolVoTeqWhO2qt6Aoei9JjNqlyxW3+cTLt3Xq6K3tAuBwyYtfTF8bBNVEjVSAnhzL+ViIE1EPq85MnAow== 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=mvmPhplmJNH+2a0HPBY0c4/yPwtbghTq7glq9muO8Pk=; b=VBDmSKS6nlJ8VJ2kYbw7m1o3bxExYdzX9qxvtUqPLebbKg06U8nl21i0uZa6ehXt2jK1FhTau5WEQ3HNDgbbVr3r+yPidhhUTpO9Kztketv8BTo7vo7XAtqKR6HbMWX/FvNepJluYJGyG4Wk+J3NEWM9aKzff8eQyVA/GzbfWDuMg6BMdaGlBlx1tIhd7Z0wHEMAwwFH5O5PiGV609yDUU0hv+Mne+ASCUb03h1bw8Ci+3ovZtAzyXBHnpllnjPLYrzs/7wqZNIo8uTL9WJTOqY7YbOH0AVY6GRagB80ccIqEz+VsCytg9ALxZAglMDOhOuI0DEm8C8qcWFfwFVijQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none X-Received: from DM4PR12MB5229.namprd12.prod.outlook.com (2603:10b6:5:398::12) by PH7PR12MB8826.namprd12.prod.outlook.com (2603:10b6:510:26a::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.24; Tue, 19 Sep 2023 13:19:23 +0000 X-Received: from DM4PR12MB5229.namprd12.prod.outlook.com ([fe80::d267:7b8b:844f:8bcd]) by DM4PR12MB5229.namprd12.prod.outlook.com ([fe80::d267:7b8b:844f:8bcd%7]) with mapi id 15.20.6792.026; Tue, 19 Sep 2023 13:19:22 +0000 Message-ID: Date: Tue, 19 Sep 2023 08:19:20 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [edk2-devel] [PATCH] OvmfPkg/ResetVector: Fix assembler bit test flag check To: Gerd Hoffmann Cc: devel@edk2.groups.io, Ard Biesheuvel , Jiewen Yao , Jordan Justen , Erdem Aktas , James Bottomley , Min Xu , Michael Roth References: From: "Lendacky, Thomas via groups.io" In-Reply-To: X-ClientProxiedBy: DS7P222CA0017.NAMP222.PROD.OUTLOOK.COM (2603:10b6:8:2e::26) To DM4PR12MB5229.namprd12.prod.outlook.com (2603:10b6:5:398::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM4PR12MB5229:EE_|PH7PR12MB8826:EE_ X-MS-Office365-Filtering-Correlation-Id: 32cfd245-42b1-4ccf-eda1-08dbb91309f8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: FuPhss0DSWxIDNnqqj4jaIc5TeyMyvGMEtan6wh7GSmW+SBjoWGyKKwcAvdXLSiECOS7mppGRxIv1uv/5utnUEKirkGJjQYrOVne1VbRioHWrcA00UDSfEIoA8CHnB+JaRc6b+Ci78J9/5370mCzv0dnbsjad9WqEdBvXnolLDQ5uZNu3GGs5Z0DkHnZq4BwXz8IeUBUk/PUIvygyRo5ITX45seT3cUztB03hVQdY9du5q8Fwm6LUQlQ3HMduzKwWy8SlD+Tb1a+IA0Spa1cVfwVSPXH2B9sBApQJ1dETazXt89Tlk1Ypm/5Nb77fH62oMA16pPxmklhy2cNVd8FjPlI++lyeafMJJWqvAo4lfJz4xUqvU+Zsf1+urj5ugnNtIWI6Y3WX1W1aCJAkTcG4rGZaBEmyWtNDRuN9kCK4aDsnLkmEgVe5bgdK+dAqP5cdtBhcNuvgzIEplLjo/9ptmcVdW8f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allIblJIRjAxdml5ektsZUViVWhBYVNtaUdwdXZKRzlRN0QzSW9IQ0l6?= =?utf-8?B?RkVnKzBySDRQajAzRyt1bS9Bdm4zU25tVWtvbUR6SzZIQ3VjdjcweVF6c2xi?= =?utf-8?B?T3c0b1BCUEluZ0Z2cW4wcXJOQnVlNDFTU3VkU2dFaTRZYjlpZnpxQzY4eEkz?= =?utf-8?B?Q0VqalRpRy8wOUg1aEtDVDk2RDhKNzFBTGlRTTZZdktsNzdJdytrQXV4ekhB?= =?utf-8?B?RkozZEdMeFhnSENJanJncmpld3ZsZ05UVW9TMnFYK2JETzVuRXFEbzc2ZERa?= =?utf-8?B?YktoM2VKQmxwZXB0ZnoyTzdPS0YvZFpZcG5MWFYxeEFJZHRqQ2RBNDVHeW5q?= =?utf-8?B?bHlKTlZDd3QxbzI3ZFNhNXFDMDBEOWs1NFhVbXpiKzQ5Vm9aMU5WRUVPNHBx?= =?utf-8?B?dEdiaWZmZG5pUjhlUVVKV0dtNzArNWJTN0R3d0F0Y2lMZGwzaGZqYmlwa3ln?= =?utf-8?B?U2FKKzM5Q1c5Tlc1Mzh6WmFZYThzck10SEg2RmtXb0hyd0FMd09mSEpqYVg3?= =?utf-8?Q?GWhXFh6JY+/JbWSn7YJ8LQGqA?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 32cfd245-42b1-4ccf-eda1-08dbb91309f8 X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5229.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Sep 2023 13:19:22.7760 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: kfvW+VCtJzpQ3MXaH+5Coqc3C0CeX9Yhw8q9Qhv8FRIV45MoBoXtJbnHD3Gy1kuevKFOBBV1kkpYXzuDadZ3xg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB8826 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,thomas.lendacky@amd.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: ScS5mgfKpd148D5NQt6OnrYAx7686176AA= Content-Language: en-US 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=UMo08ctp; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=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 9/19/23 02:59, Gerd Hoffmann wrote: > On Fri, Jul 14, 2023 at 03:28:26PM -0500, Tom Lendacky wrote: >> Commit 63c50d3ff2854a76432b752af4f2a76f33ff1974 changed the check that i= s >> used to determine if SEV-ES is active. Originally, a CMP instruction wit= h >> a supporting JZ instruction was used for the check. It was changed to us= e >> the BT instruction but not JZ instruction. The result of a BT instructio= n >> changes the the carry flag (CF) and not the zero flag (ZF). As a result, >> the wrong condition is being checked. Update the JZ to a JNC to properly >> detect if SEV-ES is active. >=20 > What is the effect of this bug? Is it just the encryption sanity check > being skipped? Yes, it is just causing the mitigation check to be skipped. Because of the= =20 previous xor instruction, the JZ instruction will always be taken. Thanks, Tom >=20 > take care, > Gerd >=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 (#108830): https://edk2.groups.io/g/devel/message/108830 Mute This Topic: https://groups.io/mt/100149226/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-