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 X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B95C4C83017 for ; Mon, 30 Nov 2020 16:21:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 88D60206E3 for ; Mon, 30 Nov 2020 16:21:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728819AbgK3QVI (ORCPT ); Mon, 30 Nov 2020 11:21:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:54204 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728777AbgK3QVH (ORCPT ); Mon, 30 Nov 2020 11:21:07 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 699C72073C; Mon, 30 Nov 2020 16:20:26 +0000 (UTC) Date: Mon, 30 Nov 2020 11:20:24 -0500 From: Steven Rostedt To: Paul Gortmaker Cc: linux-kernel@vger.kernel.org, Andi Kleen , Petr Mladek , Sergey Senozhatsky , John Ogness Subject: Re: [PATCH 2/3] clear_warn_once: bind a timer to written reset value Message-ID: <20201130112024.34bcbbd1@gandalf.local.home> In-Reply-To: <20201126063029.2030-3-paul.gortmaker@windriver.com> References: <20201126063029.2030-1-paul.gortmaker@windriver.com> <20201126063029.2030-3-paul.gortmaker@windriver.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 26 Nov 2020 01:30:28 -0500 Paul Gortmaker wrote: > +++ b/Documentation/admin-guide/clearing-warn-once.rst > @@ -7,3 +7,12 @@ echo 1 > /sys/kernel/debug/clear_warn_once > > clears the state and allows the warnings to print once again. > This can be useful after test suite runs to reproduce problems. > + > +Values greater than one set a timer for a periodic state reset; e.g. > + > +echo 3600 > /sys/kernel/debug/clear_warn_once I wonder if the value should be in minutes and not seconds, otherwise, a wrong value could possibly DoS the machine, if you were to write 2 into it. If there were a lot of warnings in high frequency events. Or is dumping out a bunch of warnings every 2 seconds not be a problem? Anyway, would there ever be a need to have it cleared in less than 1 minute intervals? -- Steve > + > +will establish an hourly state reset, effectively turning WARN_ONCE > +into a long period rate-limited warning.