Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2419540imw; Sun, 17 Jul 2022 08:23:09 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sF6imp7+Alsk0TxvHYskYLWEq4Rc16gkSz/GcdlkxtpgZPo/DFKv3R/fMEBW1E78Tomo69 X-Received: by 2002:a17:902:b690:b0:16c:ba6d:1c15 with SMTP id c16-20020a170902b69000b0016cba6d1c15mr16168175pls.89.1658071389460; Sun, 17 Jul 2022 08:23:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658071389; cv=none; d=google.com; s=arc-20160816; b=S4x4EewQGNW5jTQX1atB5J+Ajm3siZxbdz2tHVOI6OZ6r/Lpo1P2cSzJGQdvkOQ5mC ls4/CaUr3OVmI3Nf7Riy/pT2vgEC0BIgoXOxFpcBdvyPh78M/yN+9E4XKIj5pNmJ1a/D 3wQV/UCJDDngbgM9I/lkxIDs6+wcmWywgL91Yje3/OLFRbPBYMz1G+V00GQgxlxzFcX3 tLsCRdKlAi5BQHYp2XrTlaFKnGUdhWCIMk0z9u5oPdRmQ2Q6xcgmwtxQkE1byRNfNLEo z9toQS1JvQevxV4miJEYsolI/BAsaKfZQFMvTLSCfOopg26cNeYDxYFThwyo5AKX3k6p U8gQ== 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:dkim-signature:date; bh=Dz1AwDi0TADJJc/MT4EIs1y66eRS6Ot3v2L/c0ATXYI=; b=G/b9yU44ztdagdX2ay4bZDBIO8L8i6loLGwHFEkwKiMyarzc5fDl9GCqbJFdk4cPOx SGTHMzvCClthxJtbbhRwiCDD9U/wnB1nf8aUvBResJi1Ah8gqTOOWsrUrvrpM54ZEJFX P0LvG0ZRQ6lAudkEWzmIhMn+kvQb8AwuC+9oiH/enbwRrylw40q+4x1H801DhuqS/cq7 GmuMM9LdFpiLI1lGIrlutL77s7zqyu5ssVVzBKuoQV6LmuGDFTUfHvX1rdDuUjS1XIAl 3PsR1Z2Gq6YvZSqgCjuGeIbkP0mpG2cCOADjyEhRiAicFkeIqyFLMDvhtrXqpKHdYOJ1 d+6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="IM8u/HtG"; 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=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f6-20020a63de06000000b004160cd9df9csi12151044pgg.435.2022.07.17.08.22.54; Sun, 17 Jul 2022 08:23:09 -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=@linux.dev header.s=key1 header.b="IM8u/HtG"; 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=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229536AbiGQPTj (ORCPT + 99 others); Sun, 17 Jul 2022 11:19:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233064AbiGQPTh (ORCPT ); Sun, 17 Jul 2022 11:19:37 -0400 Received: from out1.migadu.com (out1.migadu.com [91.121.223.63]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30A1ACE12; Sun, 17 Jul 2022 08:19:36 -0700 (PDT) Date: Sun, 17 Jul 2022 23:19:19 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1658071174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Dz1AwDi0TADJJc/MT4EIs1y66eRS6Ot3v2L/c0ATXYI=; b=IM8u/HtG4g5eg9lWxdyAKv0n1q8t1zvT4Ief6w4+8mh1FmVTZDEdwMFoZTqNpmki07dLVb H+TqCzyZx/1cjjUVZwqmajPP3DxLnFDZL9YgV5nYEFtTJNM5sChLDU0c0akDPGogWi6LWx 1SQq4XaJX3Pr7GDSal9moQX4fxqVV2U= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Tao Zhou To: Daniel Bristot de Oliveira Cc: Steven Rostedt , Wim Van Sebroeck , Guenter Roeck , Jonathan Corbet , Ingo Molnar , Thomas Gleixner , Peter Zijlstra , Will Deacon , Catalin Marinas , Marco Elver , Dmitry Vyukov , "Paul E. McKenney" , Shuah Khan , Gabriele Paoloni , Juri Lelli , Clark Williams , Randy Dunlap , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-trace-devel@vger.kernel.org Subject: Re: [PATCH V5 06/16] Documentation/rv: Add a basic documentation Message-ID: References: <72d6b6619c9c336b254f5e560ac4ee5f44cb3956.1657745645.git.bristot@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <72d6b6619c9c336b254f5e560ac4ee5f44cb3956.1657745645.git.bristot@kernel.org> X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS 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 Wed, Jul 13, 2022 at 11:17:22PM +0200, Daniel Bristot de Oliveira wrote: > Add the runtime-verification.rst document, explaining the basics of RV > and how to use the interface. > > Cc: Wim Van Sebroeck > Cc: Guenter Roeck > Cc: Jonathan Corbet > Cc: Steven Rostedt > Cc: Ingo Molnar > Cc: Thomas Gleixner > Cc: Peter Zijlstra > Cc: Will Deacon > Cc: Catalin Marinas > Cc: Marco Elver > Cc: Dmitry Vyukov > Cc: "Paul E. McKenney" > Cc: Shuah Khan > Cc: Gabriele Paoloni > Cc: Juri Lelli > Cc: Clark Williams > Cc: Tao Zhou > Cc: Randy Dunlap > Cc: linux-doc@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > Cc: linux-trace-devel@vger.kernel.org > Signed-off-by: Daniel Bristot de Oliveira > --- > Documentation/trace/index.rst | 1 + > Documentation/trace/rv/index.rst | 9 + > .../trace/rv/runtime-verification.rst | 233 ++++++++++++++++++ > kernel/trace/rv/Kconfig | 3 + > kernel/trace/rv/rv.c | 3 + > 5 files changed, 249 insertions(+) > create mode 100644 Documentation/trace/rv/index.rst > create mode 100644 Documentation/trace/rv/runtime-verification.rst > + runtime-verification.rst [snip] > +The user interface > +================== > + > +The user interface resembles the tracing interface (on purpose). It is > +currently at "/sys/kernel/tracing/rv/". > + > +The following files/folders are currently available: > + > +**available_monitors** > + > +- Reading list the available monitors, one per line > + > +For example:: > + > + # cat available_monitors > + wip > + wwnr > + > +**available_reactors** > + > +- Reading shows the available reactors, one per line. > + > +For example:: > + > + # cat available_reactors > + nop > + panic > + printk > + > +**enabled_monitors**: > + > +- Reading lists the enabled monitors, one per line > +- Writing to it enables a given monitor > +- Writing a monitor name with a '-' prefix disables it s/-/!/ > +- Truncating the file disables all enabled monitors > + > +For example:: > + > + # cat enabled_monitors > + # echo wip > enabled_monitors > + # echo wwnr >> enabled_monitors > + # cat enabled_monitors > + wip > + wwnr > + # echo '!wip' >> enabled_monitors > + # cat enabled_monitors > + wwnr > + # echo > enabled_monitors > + # cat enabled_monitors > + # > + > +Note that it is possible to enable more than one monitor concurrently. > + > + > +**monitoring_on** > + > +This is an on/off general switcher for monitoring. It resembles the > +"tracing_on" switcher in the trace interface. > + > +- Writing "0" stops the monitoring > +- Writing "1" continues the monitoring > +- Reading returns the current status of the monitoring > + > +Note that it does not disable enabled monitors but stop the per-entity > +monitors monitoring the events received from the system. > + > +**reacting_on** > + > +- Writing "0" prevents reactions for happening > +- Writing "1" enable reactions > +- Reading returns the current status of the monitoring s/monitoring/reaction/