Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1193771rwd; Tue, 16 May 2023 13:15:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5bRtGE8qOkXxgC5Nykcm8Jrn9Od+R0K3Umv5d5hWBLmTSYleI2YPJi9mrma41WYkzL3gwK X-Received: by 2002:a05:6a20:549c:b0:102:6b0:a648 with SMTP id i28-20020a056a20549c00b0010206b0a648mr29399921pzk.4.1684268132410; Tue, 16 May 2023 13:15:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684268132; cv=none; d=google.com; s=arc-20160816; b=G62pTsm5zjQSrm+w2OuSn0grzWM7aaEpPSq9UteLnQpnQNBlOMX9kQDMOBhoNacv+2 Hjyb0U+vIJkK4v/Bww8kcKy9iS+7EDCLDu5uFx8rpZn5DyyPfjGdHCm4VjZJxKiuzAGn waZ9gAaXt3vEMyDvl9EkZD8oNL13Rg+P9KcUn6YBABQUzKhjjiXNh8tugDSOV4IOLasy VFSOA1JuBGa3ixjUY1O3DRkH0ZOw3IL6GVlVwHQlFfZA7wOmLi3O7dDFgxPjtHudgrxq d77MFb5URDp8NzQAw0aRM8tWSKT1tk7E52h3B94wX18Uicq6wE20VGBH6PQjeibkdCX/ w8+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=UfjGuD2e0ugGDXfVQ07WdsFxuHKpeo1g2ISot0iJ1pU=; b=085kD/Tuvmkl44O24FT3m5P4nzgAWL6NdjeqhRUqRoirsimimDSYA2lacX2OpZK5xV ew6izgBxLfmaWw4qLLjJ8YCIqvii3u0lYoD/PXyipBvts4KmpExA612tZ/03v7ExP6YW W248Dkfxf3ICCH84u5UH8SvGiXVmqxNPG3/pfy9WW5XI0ZcA46bYVT6YtZ/wlnWVQ+Oq YJ6xkSMb5CDwTH55MSxdcMFPhb4NoxUZH3ouch5Q1uee820E28A5AUwUFR45M0EVUGUw jQw8yZylN+yWnaE5A9W/ZnoW9kuL1Bq9jzCgWl6m8Qb2lwk3TS7smk5vJxcl2uiN2NEC D1oQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=giAhZizU; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x1-20020aa79561000000b0063b8ab7f91csi20040750pfq.365.2023.05.16.13.15.17; Tue, 16 May 2023 13:15:32 -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=@intel.com header.s=Intel header.b=giAhZizU; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229618AbjEPUEC (ORCPT + 99 others); Tue, 16 May 2023 16:04:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229497AbjEPUEB (ORCPT ); Tue, 16 May 2023 16:04:01 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BCE75FD3; Tue, 16 May 2023 13:03:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684267432; x=1715803432; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=953wYAY7UWvrm1tXjfski6EbreQeUgE/9pY7lM47LiQ=; b=giAhZizUhd5c/eXALB3h7EnS+M3NUW3edybry7WIUjtWBmY1/KtmUXHs tl6TqJzlPJVSQcTrMEIO+1dFZXysVGujtyRuSqCSeQGl25zBpbkhK4cdz nNHgars+aLn/umoGNTYGC37AUcnxSppIrKslr+jl3CFTKNykXkl3sSmrD kikR2609FPRX29lauPAMnBozf5ejddARIl9Kmxln54ICSGemSk9R6cFX5 wzf1ricVq8VT1XPD+21BSGktIUjCnkx82go8YehU5ikw7/KwSuv3KGalA GzwFXfj03qTk2PuLchqs9+crq6+dGeGiXBtVmF5uv8jOOtXVoMCGtWc4E g==; X-IronPort-AV: E=McAfee;i="6600,9927,10712"; a="414982863" X-IronPort-AV: E=Sophos;i="5.99,278,1677571200"; d="scan'208";a="414982863" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 May 2023 13:03:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10712"; a="875784499" X-IronPort-AV: E=Sophos;i="5.99,278,1677571200"; d="scan'208";a="875784499" Received: from mtpanu-mobl1.amr.corp.intel.com (HELO [10.212.203.6]) ([10.212.203.6]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 May 2023 13:03:32 -0700 Message-ID: Date: Tue, 16 May 2023 13:03:32 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCHv11 6/9] efi/unaccepted: Avoid load_unaligned_zeropad() stepping into unaccepted memory Content-Language: en-US To: Ard Biesheuvel Cc: "Kirill A. Shutemov" , Borislav Petkov , Andy Lutomirski , Sean Christopherson , Andrew Morton , Joerg Roedel , Andi Kleen , Kuppuswamy Sathyanarayanan , David Rientjes , Vlastimil Babka , Tom Lendacky , Thomas Gleixner , Peter Zijlstra , Paolo Bonzini , Ingo Molnar , Dario Faggioli , Mike Rapoport , David Hildenbrand , Mel Gorman , marcelo.cerri@canonical.com, tim.gardner@canonical.com, khalid.elmously@canonical.com, philip.cox@canonical.com, aarcange@redhat.com, peterx@redhat.com, x86@kernel.org, linux-mm@kvack.org, linux-coco@lists.linux.dev, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, Dave Hansen References: <20230513220418.19357-1-kirill.shutemov@linux.intel.com> <20230513220418.19357-7-kirill.shutemov@linux.intel.com> <6fe42f66-819c-f2c8-176b-759c1c5a9cf5@intel.com> From: Dave Hansen In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 5/16/23 11:35, Ard Biesheuvel wrote: >>> Does this mean that the kernel maps memory before accepting it? As >>> otherwise, I would assume that such an access would page fault inside >>> the guest before triggering an exception related to the unaccepted >>> state. >> Yes, the kernel maps memory before accepting it (modulo things like >> DEBUG_PAGEALLOC). >> > OK, and so the architecture stipulates that prefetching or other > speculative accesses must never deliver exceptions to the host > regarding such ranges? I don't know of anywhere that this is explicitly written. It's probably implicit _somewhere_ in the reams of VMX/TDX and base SDM docs, but heck if I know where it is. :) If this is something anyone wants to see added to the SEPT_VE_DISABLE documentation, please speak up. I don't think it would be hard to get it added and provide an explicit guarantee.