Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp4686715pxb; Wed, 20 Apr 2022 08:11:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9DW+eNd7Y1Ii9Ktk4Uba242pqiGbEPC7mKx/JZwfUY9u+aYk78xQGlTvIE/faNZ5rWkmA X-Received: by 2002:a17:907:d19:b0:6ef:fd71:90e7 with SMTP id gn25-20020a1709070d1900b006effd7190e7mr3622722ejc.203.1650467463576; Wed, 20 Apr 2022 08:11:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650467463; cv=none; d=google.com; s=arc-20160816; b=pGc9K9DbajVdsABDXW6JcB0w0ns/xv8owpuVYEFb0yjdpOZRWoQnoU7nITNhx9vARx +US1S0jGc5h8+Crs4TQeuougYJz0lPrMZ2KwTR6ZoDN3ODYS1I4YxMzu1aKbz5/hZhvv N8dR1qgsvtqXQv17+FTesQ51lROHucEkd4mUifrOcwZLnbc6KABzhsbIiJKv9ORq/7bC 2nq6ZhulHal7kh8AJPgnsB9wRJlCTJjY0DQpyg2t+Oeesbtn7qcY9CsXOZKbhEZY3N5g IlYpG+zNarBkA/YlIKVeH2ZtuUA0rcVKC6holyPwlNhn9BWJZ2HKFVSPt7ZUJhlh1Rb8 kpqA== 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=b+KpYERe7iZK+15MlLVyhdLndyZDa6Jd75RTn1QHkhg=; b=ihMdwz0fJM7J+NFP91x+ctRmdl+JajbSRgJA99rhfnoB793M83NTnQah6mjzwQCh7E G485C8iwP8zmcy4nQVBb/pP6tj3IMLaAyst/9YmhhhL4RsnSnnlvZT2PkAGs75wUi7IX YpXkW5WZkAKULtg4ZMzPVXSAuO/KLGyrKFZenYjZ+VJHOjCmXqxOUwf19TlezicSwfcN DB+dj0XpWye2hqQi7/b5eINvp+rjaMFnXoKx0T1EoLOAsYqE1L9bnHiMexx0CMdw0tGS C9uVWzrF5tqTRWZ3v2aAb1xDpu0VyflN7hh0LKa4Tg944ehysaYdnPzyneQJqO5ZnfBS Becg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2AURuQ+k; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j8-20020aa7c0c8000000b00423e88cfbe1si1582858edp.588.2022.04.20.08.10.36; Wed, 20 Apr 2022 08:11:03 -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=@linuxfoundation.org header.s=korg header.b=2AURuQ+k; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349433AbiDSHf5 (ORCPT + 99 others); Tue, 19 Apr 2022 03:35:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349427AbiDSHfx (ORCPT ); Tue, 19 Apr 2022 03:35:53 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BEF42DF75; Tue, 19 Apr 2022 00:33:11 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 528D46148C; Tue, 19 Apr 2022 07:33:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A444C385A7; Tue, 19 Apr 2022 07:33:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650353590; bh=zeE1qBpOuQzHwmbXjqUNr9bxVBPdrhURSLT2LJ7WTC4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=2AURuQ+ky5cpVb1vWZXdiCL4GR0JuAFQ1aB7Wv4tWtSbvGaLT9mDIRta37uX8BWQj 00t5YnbEVS7Gm/BU81p439GVu0HlnncqnM0gye6tfLmfvcKcTrYgBDRU8KQv6KzJkc Yp4rTNICiVPN8D4MsV3oIWhE8rfjUj51YPLqB+kw= Date: Tue, 19 Apr 2022 09:33:07 +0200 From: Greg Kroah-Hartman To: Oliver Upton Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, stable@kernel.org, Marc Zyngier , Sean Christopherson Subject: Re: [PATCH 5.17 183/219] KVM: Dont create VM debugfs files outside of the VM directory Message-ID: References: <20220418121203.462784814@linuxfoundation.org> <20220418121212.002023130@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Mon, Apr 18, 2022 at 10:14:42AM -0700, Oliver Upton wrote: > Hi Greg, > > On Mon, Apr 18, 2022 at 5:24 AM Greg Kroah-Hartman > wrote: > > > > From: Oliver Upton > > > > commit a44a4cc1c969afec97dbb2aedaf6f38eaa6253bb upstream. > > > > Unfortunately, there is no guarantee that KVM was able to instantiate a > > debugfs directory for a particular VM. To that end, KVM shouldn't even > > attempt to create new debugfs files in this case. If the specified > > parent dentry is NULL, debugfs_create_file() will instantiate files at > > the root of debugfs. > > > > For arm64, it is possible to create the vgic-state file outside of a > > VM directory, the file is not cleaned up when a VM is destroyed. > > Nonetheless, the corresponding struct kvm is freed when the VM is > > destroyed. > > > > Nip the problem in the bud for all possible errant debugfs file > > creations by initializing kvm->debugfs_dentry to -ENOENT. In so doing, > > debugfs_create_file() will fail instead of creating the file in the root > > directory. > > > > Cc: stable@kernel.org > > Fixes: 929f45e32499 ("kvm: no need to check return value of debugfs_create functions") > > Signed-off-by: Oliver Upton > > Signed-off-by: Marc Zyngier > > Link: https://lore.kernel.org/r/20220406235615.1447180-2-oupton@google.com > > Signed-off-by: Greg Kroah-Hartman > > Can you drop this patch from stable for the time being? There's a bug > in it because KVM does init/destroy awkwardly. Sean working on a fix > [1]. > > [1]: https://lore.kernel.org/kvm/20220415004622.2207751-1-seanjc@google.com/ Will do, I'll go drop it from everywhere. greg k-h