From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=helo; client-ip=104.47.38.58; helo=nam02-bl2-obe.outbound.protection.outlook.com; envelope-from=brijesh.singh@amd.com; receiver=edk2-devel@lists.01.org Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0058.outbound.protection.outlook.com [104.47.38.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id CD6AF2205BEBF for ; Thu, 4 Jan 2018 13:50:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=7ngjNyxpeZgAFgUa7HT7hOOVHqkiYBu/qJqWEo9Et/U=; b=Fm0iWzt2yCGp7r31IU40DL+C6PXUJnkv0UG1KvosQT0AXiWsU3fkwpeEoHJX3lXXjq02tu4cjrgLLfUU4Nn9g7MSNTg5Gmsx4bN/bWW8CM3kujAVXHh/pGowuYinhp4+RqK3loYTSrjqJwJW0StuC4rFT1Bm9YOxi9Z7vDbm2tE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Received: from [10.236.136.62] (165.204.77.1) by DM2PR12MB0156.namprd12.prod.outlook.com (2a01:111:e400:50ce::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.366.8; Thu, 4 Jan 2018 21:55:54 +0000 Cc: brijesh.singh@amd.com, Tom Lendacky , Jian J Wang , Jiewen Yao , Jordan Justen , Ard Biesheuvel To: Laszlo Ersek , edk2-devel@lists.01.org References: <20180104170602.6617-1-brijesh.singh@amd.com> <016c210b-2f23-2624-fc7c-867d247521ee@redhat.com> From: Brijesh Singh Message-ID: Date: Thu, 4 Jan 2018 15:55:51 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <016c210b-2f23-2624-fc7c-867d247521ee@redhat.com> X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: CY4PR02CA0033.namprd02.prod.outlook.com (2603:10b6:903:117::19) To DM2PR12MB0156.namprd12.prod.outlook.com (2a01:111:e400:50ce::19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 9ebb4db2-e389-49f9-5117-08d553bdee68 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(7153060); SRVR:DM2PR12MB0156; X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0156; 3:D47wOdcM/HU6QJuzJobIgnNwtgabrEwesBOd7MJO5CUyF9owFWLOA69gj6FRB4kBtWKrig/l6ymwBOccRLy4dLAG6oA7HcdQVXxBKKA8jpcitGLn4PuXI44/OtosHwMocMSj3uI4HiTXXEcDHBr+o932et7Me2RSwFuv1i3lStLft+RDh9O40XxysGYP98LngxdWS6W79nnnkU4p1cfi9CHyNe9f2RuVkmP+jj7Nd8i0BDq6r7Jh/Y+Vv91uHdxq; 25:2K56LGwzldMckePIhvszlQ3VzV4xrW9SjMqXPkXltA2EjzEc0eH69wqxRtCYYAg4ahLWdPkJuWZE4n7O/BlQHc08Q4bCEBA5+yUrOzK1u/DW3tqC5oHzdnsnOWR64c45ykCctLi6SulknXmrGHoPiHvBC/EFonoru/dZfTL2quAEehkWd/9KRp0ufb1d56ZNcQHZIzXgODYcmh2TYHDLuOYyLZBKLJszQCCcx7Ie885PoAjdZVv5OrPYKchpUFlnvx2vmBaXZ77AtntEqrmbchHz4QWFlAzHKdYTS3/yKVy8nDJCCwmgTKk6ILRYCCacIIUj/7Iw3se9DXA2gNgdmg==; 31:oyVqG2kf3uVXAkt0qxntw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ldMwReJZn0WO255Ah4lcIN6XiJIziionAtpw2+MdwSeSGYmUirtZ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192374486261705); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3231023)(944501075)(3002001)(6055026)(6041268)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123564045)(20161123562045)(6072148)(201708071742011); SRVR:DM2PR12MB0156; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:DM2PR12MB0156; X-Forefront-PRVS: 054231DC40 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(346002)(396003)(366004)(376002)(39860400002)(39380400002)(199004)(24454002)(189003)(58126008)(76176011)(230700001)(81166006)(6246003)(52116002)(59450400001)(67846002)(8676002)(23676004)(2486003)(6666003)(52146003)(53936002)(81156014)(16526018)(53546011)(2906002)(478600001)(54906003)(31696002)(16576012)(6486002)(2950100002)(83506002)(229853002)(3846002)(6116002)(86362001)(316002)(50466002)(305945005)(31686004)(36756003)(105586002)(77096006)(97736004)(7736002)(386003)(68736007)(65826007)(25786009)(65806001)(4326008)(5660300001)(64126003)(47776003)(106356001)(65956001)(8936002)(66066001)(213903007)(19627235001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR12MB0156; H:[10.236.136.62]; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTJQUjEyTUIwMTU2OzIzOi9kQWFkME5qV0diOXFzd3lPc1VEQmxBK0xI?= =?utf-8?B?Q0tSNzAybkkzRkpiMkY0RUNselhVdUFTZTBLeVFSOG16QksyekJGUjg5SzNW?= =?utf-8?B?QjlCM3d6bmViMVdmdHJJT2JNbTZERmEyMHIyY1dQRTBS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EPL/MqWMokWo=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0156; 6:7tUzximiPBcsgnolW5AJ7/vifKMajXC804u1zyMOc2sSM5IySCEgbpUyazEAeNHUFNljdwVYOTFckdjb4X0YlpZx+6ysPxmXUMhLOR8KI1GsqEVWS/eKUmCHt2YvT0KXz96mw2UqpqFvWQAJQ2WItPwHERMBe7Ja+X9qeKGMCwvS8UzVbF2EeZ9mg88vCqqDxqg3EYABTwWrse05nsDBt2a1QZ7j7Vcjdfe6MkKVtXfNNpNInT4Ak1vRUESliAYBAaW6CpD46c1tfF6+ELdUo/kBWGFziHE7sk8NsfSieU4nkB/871FNDljmtGHWs4NvWkh/4IBNR83foLXkS83+haZWZSsSSkjpKoDpIUdmcQs=; 5:lGJ/wmUgROGs5JRaeK86DW5kjUU9x0DFppfOmXFTM3t0HlU8xtPzyKc0FlIolizQanLi5t+36KF5wnbG5JcvAPCQS9J2DSLIbfS0kXe3fB6ArzwjxSNUPNg+CVeLeMYHQOy7xmg5D+vN48TrO5VFTMirKRssiVG6k43n/qmeprI=; 24:MBBPtZBRTdswfJutQhj8w4X62cFY1UmbL1QXXndG7E9H1w6OvrpUCV+X+kmZd114xbl+jYuHqmt8VOYbFKjEzUctrYU8wSWyAYoGpsTpi78=; 7:Ta9ynrHsdKMH3hBPPYMAh7BG1VEPfSYkIPfUeI83KYSuJfX1mhg1sypnhyriIvLElqQMUzuCKHdM4w8HY+UgP6V/HB2WeaqygGVNFAES75C7W/c9GlBytEt2gGX5bFZ2Lm4ZLz2MstbByBZJYafZK0WKKDB2hytsQU2BSF3tkLEU0r3DbPlOIH/XKYkPi8YiSeTFGqIxQ2btis+bUFzeuke39QbXxIXv7vuQ8qs4XlD0XkpUYaBLG+APVFe9g+J1 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0156; 20:imdzOpuGcASrC+j3AHfiYwEhxgWw986mI6qkaO7/lutBoyozVF2ySi8+b4St+wpzQFPy3vwAp/oAifjRhaHxpcnUtuD/B/+TXusNuGfEJeeAhPvmk+X6S05wbwa4Agmzo7xAYkJ3G+3rgP8KPvarkd+CLhfrbxVzIbk0oiOHqne34g0syeuJxEueNVc6IVa+xZfaAEFNiS6rBQx9xGM8HcF9zWPABDkxxwJZiKo0vAnswYrEHWI2TMMxbuhkeZbh X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jan 2018 21:55:54.7937 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9ebb4db2-e389-49f9-5117-08d553bdee68 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR12MB0156 Subject: Re: [PATCH] OvmfPkg/BaseMemEncryptSevLib: Enable protection for newly added page table X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 21:50:54 -0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Hi Laszlo, On 01/04/2018 01:07 PM, Laszlo Ersek wrote: > > meta comment: please also CC Ard on OvmfPkg patches; he too co-maintains > OvmfPkg. I will keep that in mind and include Ard on all OvmfPkg patches. > > The following line is missing, from above your S-o-b: > > Contributed-under: TianoCore Contribution Agreement 1.1 > Ah, if v2 needed then I will fix that in commit. >> --- >> OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.h | 28 ++ >> OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.c | 378 +++++++++++++++++++- >> 2 files changed, 399 insertions(+), 7 deletions(-) > > I find it awful that we have to duplicate all this code in OvmfPkg. I am also against this duplication and I did silently hinted out this issue while adding the memory encryption PCD and BaseMemEncryptSevLib support. I must admit that I am new to EDKII world and don't have much history to strongly say that the page table creation or split code duplication was actually for a good reason or it was just an easy way to get the things done. As you say there is a good possibility that things will need to change more as Jian does more security related fixes in core packages. > > The page protection (+ other security) features have been constantly > refined since Jian started to work on them. There's no guarantee that > this is the last synchronization we have to do in OvmfPkg due to another > feature (or bugfix) under UefiCpuPkg. > > You can see in the messages of both commits 2ac1730bf2a5 and > 147fd35c3e38 that I participated in the regression-testing of those commits. > > You can also see on the commit messages that I simply ran out of steam > while trying to keep up with rapid iterations of those patches -- I > regression-tested versions that I thought would be final, but even after > that, further updates were made, and I couldn't test the final versions. > > Even in those regression tests that I managed to do, I didn't test the > patches in a SEV guest. It is totally understandable, I do have a cron job which pulls OVMF every week and runs SEV test but I was on paternity leave in Dec hence was not able to flag this issue sooner. I think after SEV patches gets accepted in Qemu/KVM then we should be able to expand your smoke test to cover some SEV specific test. The reason is that the test matrix has now grown > to an unmanageable size, such that sometimes it doesn't even occur to me > that this or that virt environment could be affected by a UefiCpuPkg or > Mde*Pkg patch. I realized the risk, which is why I asked for, and got, > Reviewer role under UefiCpuPkg -- purely so I could *test* (not > necessarily review!) UefiCpuPkg patches first-hand, *before* they are > committed. But, I'm at (and beyond) capacity, even in recognizing what > affects what. > > There are only two fixes for this (they are independent, and both should > be done): > > (1) An automated regression test environment. We discussed this earlier > with Jian (because his work had both introduced, and elsewhere exposed, > a large number of bugs). After that, I also talked to virt-QE at Red > Hat. Hopefully virt-QE @RH will find some resources in February 2018 to > write OVMF test cases for the avocado-vt project. I'm not sure. It will be awesome. We will add some SEV specific test when this becomes online. > Currently, *zero* OVMF test cases exist in any automated test > environment that I'm aware of; and I have spent a frightening amount of > time on manual regression testing. > > (2) Code sharing / reuse between top-level Pkgs in edk2, as diligently > as possible. I very much dislike that we have page table management > scattered between MdeModulePkg/Core/DxeIplPeim, UefiCpuPkg/CpuDxe, and > OvmfPkg. If there is a well-defined security feature, namely "protect > page tables by making them read-only", then the core feature had better > provide the toolkit for *all* relevant modules to reuse. > Agreed. > Do we really need two definitions of the macro PAGING_L4_ADDRESS_SHIFT? > Since the macro is defined in MdeModulePkg's local header (MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.h) and I was not able to include the header outside the MdeModulePkg and have to redefine in OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.h > Do we really need *three* definitions of the macro IA32_PG_RW? > > - MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.h > - OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.h > - UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h > > This is just sloppy work, mindless code duplication. > Totally agree, may be the right thing to do is to create a Library (either in MdeModulePkg or UefiCpuPkg). The library should provide the routines to create and manipulate the page table all in one place. Any packages wanting to use the services can simply call the function. > I'm not willing to review ~400 lines of page table manipulation in > detail that admittedly duplicates UefiCpuPkg code, from commit > 147fd35c3e38. Sorry, I don't scale to that level. > > > Here's what we can do: > > (a) I can ACK this patch, and push it, without looking at more than just > the commit message and the diffstat. > > (b) Or else, you and Jian could collaborate on factoring out the shared > bits to new Include/IndustryStandard headers, Include/Library class > headers, and Library instances. (UefiCpuPkg can consume Mde*Pkg, and > OvmfPkg can consume all of those.) After that, we might not need any > such OvmfPkg patches in the first place, or if we did, I could > reasonably find the time to look at them. > > I totally don't request that library interfaces and industry standard > macros be added to public headers *upfront*, before *multiple* consumers > appear. I don't believe in "design by committee". > > However, I do subscribe to interface extraction when organic project > growth results in multiple uses of the same pattern. > > (c) Obviously, other OvmfPkg maintainers are welcome to review the patch > for you! > > > NB, it is not lost on me that previous edk2 practice has actively > discouraged feature normalization, on occasion. The rejection of the > IoFifoLib class was a prime example, and I disagree with that decision > -- including the resultant duplication of the new IoFifo* functions to > all IoLib instances -- to this day. > > Another utility function we sorely miss is scanning PCI config space for > a given capability that has known size constraints. So we have > open-coded such scanning at least thrice. > > This dire situation is not helped by the fact that upstreaming features > to core packages, such as MdeModulePkg and UefiCpuPkg, is *incredibly* > hard. *Way* harder than it should be. So I don't "blame" you for > starting with the easier way (I have followed that path myself in the > past, several times, out of desperation), but as a reviewer / > co-maintainer, I simply cannot keep up with this level of code > duplication, and the consequent (predictable) churn in the future. > > > Please pick (a), (b) or (c). > Can we please do #a. I don't know how much core package maintainer want to cleanup the code duplication, I don't mind opening a bugzilla talking about this page table creation/manipulation code duplication. Thanks