Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp569917imn; Tue, 26 Jul 2022 03:52:50 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tojXDK2flyd1ucRThtby/c2OZLq9pNI2OMV4VQMKJ8A0yGiVTT91EhGDdaRH9avgmSeqMO X-Received: by 2002:a17:907:1c19:b0:72f:cc9e:3a7 with SMTP id nc25-20020a1709071c1900b0072fcc9e03a7mr9972426ejc.631.1658832770148; Tue, 26 Jul 2022 03:52:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658832770; cv=none; d=google.com; s=arc-20160816; b=D/UOxH9gfUhwn24wKiAaqSftMFjsdL+ZLrRPJDMSTpHWi6iTKkGDewbN1PBkHuS0Y9 zMxBq7iyVYA2YS66KqYpGESYJxSI/XcGCxb79ueJ2JQILH5/9aAqwDtmrzsEVxN5ji8f 0RYZ6sdEkCn6G9RWCQYzhAfIF5D5eS6I9o4s2Ksux3nHYVnjFSqtVRqaenO1qV7fq1z3 IBYdofY4aYcbwhKqcGQBfG+vaSypImgZUDaK1d0gIjjDrCJ6h69S442joVlaA9Qnwfhf fL5jzspQ4vPk6SIxslHI5PUedOFB0I6/JZaUAJqZFMHaUlpsRYmZNJlYKYhSN2OXeqKN IUCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/P1wM6FgHkzkzzeSWlInZ0RYBV1gb4eC4ZgQi5olGm4=; b=hVOw/cdZMQBarTY12sNpS02x+1Jodk8ZdLf4OrJ7y4v1kowympV4ZRKwlQg5Vi/25+ lnwxHLcoBsIwDXa81DYliTzuyUXvF0xZry60SB7Nsh8f/YD+qN0xZY1saqJzM3iirNWY Wdd66S08oplsKIkqx9xmq2bUzv0HuMPrt7ogKefitkRvw7wNqTyiKd4Opgj0rcDWFVPh nCmx/zqzdYy5Gbz/BGgxD4mPldSwBAdxkyYWFq+L64fc+Vixw3bX3abelnNOqyjNxq+o MOVkpxoUNWyBErIVAdvf4K+o98MRHGfz7xOsAnRbuFiDdDTQjbHO9z5A2PbHRAsvGrkY wpKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=PbdzczJD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jj24-20020a170907985800b0072b3a923e6csi13790658ejc.974.2022.07.26.03.52.25; Tue, 26 Jul 2022 03:52:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=PbdzczJD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238358AbiGZKWC (ORCPT + 99 others); Tue, 26 Jul 2022 06:22:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230262AbiGZKWA (ORCPT ); Tue, 26 Jul 2022 06:22:00 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78E70248FD; Tue, 26 Jul 2022 03:21:58 -0700 (PDT) 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> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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