From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9AA56C433EF for ; Tue, 26 Jul 2022 10:22:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A751D8E0002; Tue, 26 Jul 2022 06:22:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A24338E0001; Tue, 26 Jul 2022 06:22:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8EBBE8E0002; Tue, 26 Jul 2022 06:22:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 7D2568E0001 for ; Tue, 26 Jul 2022 06:22:04 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 568C9AABD2 for ; Tue, 26 Jul 2022 10:22:04 +0000 (UTC) X-FDA: 79728860568.04.7B3D2BB Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by imf30.hostedemail.com (Postfix) with ESMTP id 6927F8000A for ; Tue, 26 Jul 2022 10:21:58 +0000 (UTC) Received: from zn.tnic (p200300ea970f4ff2329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:970f:4ff2:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id B337F1EC0752; Tue, 26 Jul 2022 12:21:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1658830912; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=/P1wM6FgHkzkzzeSWlInZ0RYBV1gb4eC4ZgQi5olGm4=; b=PbdzczJDeQ8LLlXksk7hVHQ+T2TLNFi5/od1iAPMkG/SpwqVeFVPeMxAGLmG4UGEhQRHBY MH7M/FAFaHUptHivgNBeijb6YkGj2olR1lf7jAUeVa2FbhM0+IWqiX+5sOgMNZthnBHYx4 La2ARG9vO/kG+snwBdh4BAuY1+QQX74= Date: Tue, 26 Jul 2022 12:21:40 +0200 From: Borislav Petkov To: "Kirill A. Shutemov" Cc: Andy Lutomirski , Sean Christopherson , Andrew Morton , Joerg Roedel , Ard Biesheuvel , Andi Kleen , Kuppuswamy Sathyanarayanan , David Rientjes , Vlastimil Babka , Tom Lendacky , Thomas Gleixner , Peter Zijlstra , Paolo Bonzini , Ingo Molnar , Varad Gautam , Dario Faggioli , Dave Hansen , Mike Rapoport , David Hildenbrand , marcelo.cerri@canonical.com, tim.gardner@canonical.com, khalid.elmously@canonical.com, philip.cox@canonical.com, x86@kernel.org, linux-mm@kvack.org, linux-coco@lists.linux.dev, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCHv7 10/14] x86/mm: Avoid load_unaligned_zeropad() stepping into unaccepted memory Message-ID: References: <20220614120231.48165-1-kirill.shutemov@linux.intel.com> <20220614120231.48165-11-kirill.shutemov@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220614120231.48165-11-kirill.shutemov@linux.intel.com> ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1658830921; a=rsa-sha256; cv=none; b=kQKgBdb7MnE6jNVWi8gKtr0HYWviU8WF+EeorFpBJlTK+97JvHGwPusWrfX+ckwxHZSxtw qG1HmU0cTZZFFwOhsyObtEeAUX9YNeb4UXxyFepy+zpHqHpy8lGkfSErDAEOebf7wDSGhV IY0a5YoDMYiYRXxyB/TyloT1bL/7TaE= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=temperror ("DNS error when getting key") header.d=alien8.de header.s=dkim header.b=PbdzczJD; dmarc=temperror reason="SPF/DKIM temp error" header.from=alien8.de (policy=temperror); spf=temperror (imf30.hostedemail.com: error in processing during lookup of bp@alien8.de: DNS error) smtp.mailfrom=bp@alien8.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1658830921; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=/P1wM6FgHkzkzzeSWlInZ0RYBV1gb4eC4ZgQi5olGm4=; b=6ggATowVJ3fA7jm/dCun3OV0zlihQfS/EbdmQieuIC3faCuNEWcuFijVDAAwjiHjvozY9m JzaYSC1YmdKFOKJHismfmBT+gAdYyH9tB+jPdIs3rg+Vf0+xX4FSa1GYx+MR1+1nl3koXF PkMAWF/D9Fx86uQNV5ybnt9kREPYDE8= X-Stat-Signature: uwyrphj7hnztm613wbb5jctxonpc5e1m X-Rspamd-Queue-Id: 6927F8000A Authentication-Results: imf30.hostedemail.com; dkim=temperror ("DNS error when getting key") header.d=alien8.de header.s=dkim header.b=PbdzczJD; dmarc=temperror reason="SPF/DKIM temp error" header.from=alien8.de (policy=temperror); spf=temperror (imf30.hostedemail.com: error in processing during lookup of bp@alien8.de: DNS error) smtp.mailfrom=bp@alien8.de X-Rspam-User: X-Rspamd-Server: rspam01 X-HE-Tag: 1658830918-40479 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Jun 14, 2022 at 03:02:27PM +0300, Kirill A. Shutemov wrote: > But, this approach does not work for unaccepted memory. For TDX, a load > from unaccepted memory will not lead to a recoverable exception within > the guest. The guest will exit to the VMM where the only recourse is to > terminate the guest. FTR, this random-memory-access-to-unaccepted-memory-is-deadly thing is really silly. We should be able to handle such cases - because they do happen often - in a more resilient way. Just look at the complex dance this patch needs to do just to avoid this. IOW, this part of the coco technology needs improvement. Just sayin... -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette