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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 355E4E784A5 for ; Mon, 2 Oct 2023 06:25:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235491AbjJBGZp (ORCPT ); Mon, 2 Oct 2023 02:25:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229720AbjJBGZo (ORCPT ); Mon, 2 Oct 2023 02:25:44 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A026CB4; Sun, 1 Oct 2023 23:25:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=InW3sf1bK5Wc2jmOSnsvmSrnjzk2Pzj04pfxMdYCcWw=; b=KeC8/ODHqVRyPLLWTzKg4B/RiX fPBt0w/lD4S8/QIqpD+hkjWXG/ZRlw2awKa7EeCDakGqfaUYsRpXLfLIdnX5ZdhHACB5v+HSFdHhy 6SU/hpjWN+8azZT5kEBsea/MFxaP6zhO5asfb3UYYjJOIASgSWpozEbgmEg69rOgtS/MtbcK6hwY8 9zXkZzVH3S1k4EE42GznSO6OYLokbZGqWmuEyYIJ/hhSAXHXxRhW+/ITDrnSwQ2JZk6zvwl8r09q/ x42JUrQIjBGe7n/CXpq9oUwMZyaxAf93dytavaeVE5nDl7wbV8TVh7N39BOluX0nUYe8bEVnl2rGi q4KhlGZA==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1qnCN4-00C1Xw-0I; Mon, 02 Oct 2023 06:25:34 +0000 Date: Sun, 1 Oct 2023 23:25:34 -0700 From: Christoph Hellwig To: Sean Christopherson Cc: Christoph Hellwig , David Stevens , Yu Zhang , Isaku Yamahata , Zhi Wang , kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Subject: Re: [PATCH v9 0/6] KVM: allow mapping non-refcounted pages Message-ID: References: <20230911021637.1941096-1-stevensd@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 29, 2023 at 09:06:34AM -0700, Sean Christopherson wrote: > KVM needs to be aware of non-refcounted struct page memory no matter what; see > CVE-2021-22543 and, commit f8be156be163 ("KVM: do not allow mapping valid but > non-reference-counted pages"). I don't think it makes any sense whatsoever to > remove that code and assume every driver in existence will do the right thing. Agreed. > > With the cleanups done, playing nice with non-refcounted paged instead of outright > rejecting them is a wash in terms of lines of code, complexity, and ongoing > maintenance cost. I tend to strongly disagree with that, though. We can't just let these non-refcounted pages spread everywhere and instead need to fix their usage.