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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5BAEC38142 for ; Wed, 25 Jan 2023 00:20:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233616AbjAYAUl (ORCPT ); Tue, 24 Jan 2023 19:20:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231269AbjAYAUh (ORCPT ); Tue, 24 Jan 2023 19:20:37 -0500 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14CA54B4A5 for ; Tue, 24 Jan 2023 16:20:31 -0800 (PST) Received: by mail-pj1-x102b.google.com with SMTP id o13so16853487pjg.2 for ; Tue, 24 Jan 2023 16:20:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Vd0fuRLUDjU8rvXBur9NhqOrPTXVZKZJ4oN8G/lkhJI=; b=o+HXYRIxPxQ8KPpGLHKkZdPsJO5M09uHZapYHKFtwuihESZLkI6Zkm4ULLnmfHYxaN z6Bkf5/oL9w9YxifsJFcA+QqHXQpANCQz/OmWBa9Rlyll+JFY8LEgS0okBOrevjCF1S3 zR7B+TPDrrG/OfCNb5TJIPizamziaqvNbn8/9CvRZxXi09FQ5URRCGE/FpZIYdJ6T4/N AY4adBiPMnMz+1wL4iuMS9jBXixwStGqund1wI/dbZkKpFhaJDOGRoji+PGQ7Xch442u xgwPTskywSS01/xVU1ilxRAsaLiYsitEfD5ZykZTycKtYgDSWCaIA6Ar69OkijI/Sgc/ 1/Fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Vd0fuRLUDjU8rvXBur9NhqOrPTXVZKZJ4oN8G/lkhJI=; b=iDdu/bER2yiAOiUynp58AcgSu1iilvEGb01KXoNldLRyQJtFMdy7X5rS66tU4DP+Pm Q8r/LyPR0bumlaO2+kyxMlAytRlJgWUMnf7OgyMXbZ0kHP2TgtZpMZcoFUcXCeRr6Dsv EmN0snx0yoeKE2eY4THSTuxOJxMvlmAOfcXbyz9LB8AbCzmRdk7X4IOMkID2u0qApKDN mzp4fnDiBbnFu0kozuw8YKGzt0Qu/JivoQzIvOOadRxuhxKlC9xv5dMy5dh0Nelgie+d 6FYGDIm3Bl1XKr8BmvqISC+yrKwX9YNSSfUr3o1iLzXsghyM2uB0PoohNeAokZt0ZSwL CUVw== X-Gm-Message-State: AO0yUKWzUSEiE8k9CCyKYbpdsSfIZJiKbI8HqCwYJLXViYPQuuDXP7AS gfJOrAfqzArP3RCzIQJWdUTl7w== X-Google-Smtp-Source: AK7set8DMFuhHtJA8X11WSyZdq14F8cMlJuZ6jde92u/m6yVtA5WC0P8SrmivvZz4XbeH1VArDptDg== X-Received: by 2002:a17:90a:690e:b0:22b:b82a:8b5f with SMTP id r14-20020a17090a690e00b0022bb82a8b5fmr436422pjj.2.1674606030366; Tue, 24 Jan 2023 16:20:30 -0800 (PST) Received: from google.com (7.104.168.34.bc.googleusercontent.com. [34.168.104.7]) by smtp.gmail.com with ESMTPSA id l8-20020a17090a49c800b0022bae5c3e1esm148419pjm.9.2023.01.24.16.20.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Jan 2023 16:20:29 -0800 (PST) Date: Wed, 25 Jan 2023 00:20:26 +0000 From: Sean Christopherson To: Liam Merwick Cc: Chao Peng , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org, linux-doc@vger.kernel.org, qemu-devel@nongnu.org, Paolo Bonzini , Jonathan Corbet , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Arnd Bergmann , Naoya Horiguchi , Miaohe Lin , x86@kernel.org, "H . Peter Anvin" , Hugh Dickins , Jeff Layton , "J . Bruce Fields" , Andrew Morton , Shuah Khan , Mike Rapoport , Steven Price , "Maciej S . Szmigiero" , Vlastimil Babka , Vishal Annapurve , Yu Zhang , "Kirill A . Shutemov" , luto@kernel.org, jun.nakajima@intel.com, dave.hansen@intel.com, ak@linux.intel.com, david@redhat.com, aarcange@redhat.com, ddutile@redhat.com, dhildenb@redhat.com, Quentin Perret , tabba@google.com, Michael Roth , mhocko@suse.com, wei.w.wang@intel.com Subject: Re: [PATCH v10 0/9] KVM: mm: fd-based approach for supporting KVM Message-ID: References: <20221202061347.1070246-1-chao.p.peng@linux.intel.com> <48953bf2-cee9-f818-dc50-5fb5b9b410bf@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48953bf2-cee9-f818-dc50-5fb5b9b410bf@oracle.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 24, 2023, Liam Merwick wrote: > On 14/01/2023 00:37, Sean Christopherson wrote: > > On Fri, Dec 02, 2022, Chao Peng wrote: > > > This patch series implements KVM guest private memory for confidential > > > computing scenarios like Intel TDX[1]. If a TDX host accesses > > > TDX-protected guest memory, machine check can happen which can further > > > crash the running host system, this is terrible for multi-tenant > > > configurations. The host accesses include those from KVM userspace like > > > QEMU. This series addresses KVM userspace induced crash by introducing > > > new mm and KVM interfaces so KVM userspace can still manage guest memory > > > via a fd-based approach, but it can never access the guest memory > > > content. > > > > > > The patch series touches both core mm and KVM code. I appreciate > > > Andrew/Hugh and Paolo/Sean can review and pick these patches. Any other > > > reviews are always welcome. > > > - 01: mm change, target for mm tree > > > - 02-09: KVM change, target for KVM tree > > > > A version with all of my feedback, plus reworked versions of Vishal's selftest, > > is available here: > > > > git@github.com:sean-jc/linux.git x86/upm_base_support > > > > It compiles and passes the selftest, but it's otherwise barely tested. There are > > a few todos (2 I think?) and many of the commits need changelogs, i.e. it's still > > a WIP. > > > > When running LTP (https://github.com/linux-test-project/ltp) on the v10 > bits (and also with Sean's branch above) I encounter the following NULL > pointer dereference with testcases/kernel/syscalls/madvise/madvise01 > (100% reproducible). > > It appears that in restrictedmem_error_page() inode->i_mapping->private_data > is NULL > in the list_for_each_entry_safe(inode, next, &sb->s_inodes, i_sb_list) > but I don't know why. Kirill, can you take a look? Or pass the buck to someone who can? :-)