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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1ACB5C433F5 for ; Mon, 4 Apr 2022 17:35:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2M9k9TXO927wAgJ/R2LBxbl9SAA8sAj2jPg+qLDrGkw=; b=npw2GplvJxiDRP ZCsaVak806jrvWOsYCBhUtW2l9LUifl3cIVy4+CJAZ4ozQkMykQKAzZysQibg4FIpCkb0GfiymE6r giS+mf0owWTzYh64SyLwNkJrCULP/CPm4gKwYjPqxl/kO5ZkAvhFH5+eGB451R3qTjGLFWxkoPydk xzKOVBzn+F7udFWriP/BLeiQrdO5zJ5PWu5qXMK3juVw22pbnhPzg0wQXpWawLm/Sir0bQfXXglTm tfFbtnpELhhHU4esMgO8KP4pA/qUkQAmMsUkJS0CKNG5FX8BmVpVh30f80fvXGIx12SuaSvjdAfwz 5jzdW60+Tmu9J/yDyeRw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nbQaE-00G1hK-1y; Mon, 04 Apr 2022 17:33:42 +0000 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nbQaA-00G1gL-HQ for linux-arm-kernel@lists.infradead.org; Mon, 04 Apr 2022 17:33:39 +0000 Received: by mail-pj1-x1030.google.com with SMTP id i10-20020a17090a2aca00b001ca56c9ab16so141794pjg.1 for ; Mon, 04 Apr 2022 10:33:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=3eEb1Fbi03Tqfrd9+V/qD2RzIsPJ4iRE2QaaWt7eods=; b=l/xcKvP+X/QNDFo8xztJ73QES2Bgc0urPyjP8JRiWoVOq7xTRLys6nwW8ykl/7cTKd QoKEoYcj9dyoHPKku12UZfF5UyXIUp+ZVpz+cxWV9sWRVB1ae0+hkVGKeUFMsK9jUu2F lwCfZWPoxX8GfuuLJ8ecimBfibmEtZxJq1kwvqzoaWxoEQbrgOeTLOZgV6c3wRJEEeQx rCtwRHS1vfYQZwpsM3vnxgWTVgBZ66YUQIfmChct9n8ArkKRUgBO2Rt49Uxq2WUSblwM WQUlsfWFVlj/hPdKjyWf1QFXQntETu4xbL4dJOTqNP0N7lFCJZOAfmvDeVZEy4+yfyoX HXUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=3eEb1Fbi03Tqfrd9+V/qD2RzIsPJ4iRE2QaaWt7eods=; b=cOEMpFSQq0XN/uk7WEb4CCgt2Sq71+aTLTNsg1unKKkji2zZElNcHIRaaSfQHNwFxl zvPtvCeIqZXHyDT+6wYqLnEGO3lSWtL074f47ci/sgkObpRugxz+O++4o4wcoKkq9WsZ /y5VKr/2mlLIv/1MV2W4e7DOmbn1RjyKsgkCppdXIMjmNr7cx5oN1xNeI3sa91On8tXV ev+1NPqrkyqDnQ9dV50gx4RmlRjbtw+EPUt2F0tHu8J7xYeXElBdu9QW6jwwUT6/qOaH uUVLxzBCCrBTeTtocZmPID6wz/s0vBeFnew6kAyx9/zSyF1yMeVDlcY/sETlpI1UukYg FtZQ== X-Gm-Message-State: AOAM532O29hhl4Ba+DEp837qCbFAgR81bUM6mXgQleN3NXI+Qa883hkg g+Fa9h98x78yofLeBcVJQdOwnA== X-Google-Smtp-Source: ABdhPJxYv9sp2wZAlY2XXftWgMKjZXUHM83ydJOkHJkf644kZkqhPJr0fwd+bpDuyqb2kqscBTDZJw== X-Received: by 2002:a17:903:22c9:b0:156:9c66:5cf4 with SMTP id y9-20020a17090322c900b001569c665cf4mr768264plg.22.1649093613751; Mon, 04 Apr 2022 10:33:33 -0700 (PDT) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id x67-20020a623146000000b004fdf02851e5sm6463233pfx.220.2022.04.04.10.33.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 10:33:32 -0700 (PDT) Date: Mon, 4 Apr 2022 17:33:29 +0000 From: Sean Christopherson To: Oliver Upton Cc: kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, Marc Zyngier , James Morse , Alexandru Elisei , Suzuki K Poulose , linux-arm-kernel@lists.infradead.org, Peter Shier , Ricardo Koller , Reiji Watanabe , Paolo Bonzini , stable@kernel.org Subject: Re: [PATCH 2/4] KVM: Only log about debugfs directory collision once Message-ID: References: <20220402174044.2263418-1-oupton@google.com> <20220402174044.2263418-3-oupton@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220402174044.2263418-3-oupton@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220404_103338_616955_EA3184F3 X-CRM114-Status: GOOD ( 22.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, Apr 02, 2022, Oliver Upton wrote: > In all likelihood, a debugfs directory name collision is the result of a > userspace bug. If userspace closes the VM fd without releasing all > references to said VM then the debugfs directory is never cleaned. > > Even a ratelimited print statement can fill up dmesg, making it > particularly annoying for the person debugging what exactly went wrong. > Furthermore, a userspace that wants to be a nuisance could clog up the > logs by deliberately holding a VM reference after closing the VM fd. > > Dial back logging to print at most once, given that userspace is most > likely to blame. Leave the statement in place for the small chance that > KVM actually got it wrong. > > Cc: stable@kernel.org > Fixes: 85cd39af14f4 ("KVM: Do not leak memory for duplicate debugfs directories") I don't think this warrants Cc: stable@, the whole point of ratelimiting printk is to guard against this sort of thing. If a ratelimited printk can bring down the kernel and/or logging infrastructure, then the kernel is misconfigured for the environment. > Signed-off-by: Oliver Upton > --- > virt/kvm/kvm_main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c > index 69c318fdff61..38b30bd60f34 100644 > --- a/virt/kvm/kvm_main.c > +++ b/virt/kvm/kvm_main.c > @@ -959,7 +959,7 @@ static int kvm_create_vm_debugfs(struct kvm *kvm, int fd) > mutex_lock(&kvm_debugfs_lock); > dent = debugfs_lookup(dir_name, kvm_debugfs_dir); > if (dent) { > - pr_warn_ratelimited("KVM: debugfs: duplicate directory %s\n", dir_name); > + pr_warn_once("KVM: debugfs: duplicate directory %s\n", dir_name); I don't see how printing once is going to be usefull for a human debugger. If we want to get rid of the ratelimited print, why not purge it entirely? _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel