Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp1474821imn; Sun, 31 Jul 2022 08:22:57 -0700 (PDT) X-Google-Smtp-Source: AA6agR6Wz9tRU2pL1auxd9pPWb1zyYyohcA6/ApZOszyd0bb3QqmQ+dPcDZBmpuE1zbZ0ujuytIN X-Received: by 2002:a17:903:228d:b0:16d:4549:1078 with SMTP id b13-20020a170903228d00b0016d45491078mr12490290plh.78.1659280977444; Sun, 31 Jul 2022 08:22:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659280977; cv=none; d=google.com; s=arc-20160816; b=RoqxT5K/SFSgE7aBweooAZ6b43Guo0kVsNwI/Ii3O7tstnJrcR/iQaC/jKXYNxbsyC ioE2O9GN7cGoRzhHI8zt42YRQ2ZrhmNi+74XZktZ5SoTlbY2IKkBNr3UKb2AL4hk8npH E6SX1YLnHoUYBaH7c44wjmsjs6Uz/gUp/idPP4nvo9MWWGIGNGiSolPIsFX/I1+aoVRN pj99G65DYQGkMmEIod98tLd4RtWdWOAxpqyUScCw4ZuBMQj2DZ9mCa4nHGSfI/hQPmn6 vY348L7YxV6Ay5cX78fA5CGFf1DRASVaeAFruf0JHuLV7Vhfcq6HbBpa+JPlTwJ89YKL 01jQ== 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=MlYMxr4RTjKSXNttPFczidbRb/FlMGktoNy0WMLR7Gs=; b=0eh3Yadku9jaSxuBy5UbS1UZjyZ3GoE1DUYJ4t2S1Zx1fxC8wpuxsIpmceHTtymvMk 3iLjwQEtH7xYMsutyL2+D9y4CPPyZFRdDiIfrG8FB+pnsIJqTDlm3wIRzpLP8/BQcjt5 kgJGU8nSimYttsyrJZpVCij527SKRtOMsvaD/T72Yaw71mnGqXI7UYLPbwSKANYozSU8 oY++nB5vGwDxIESPB5DlvZg8oWqP7unjt4WwYVguh1+Hl8GWVQeLpBbKAZMn1vmri4e4 Qn1zQpLOvp3IB6uYWaxGVUhZiDW+AeYpeHOUyjjRaYn8dDFbGkrNWyVTSN2x5/lJSRvw 6T5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=ix+oqU1e; 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 5-20020a630205000000b0041bbfbd2ee4si5096196pgc.168.2022.07.31.08.22.43; Sun, 31 Jul 2022 08:22:57 -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=ix+oqU1e; 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 S231197AbiGaPML (ORCPT + 99 others); Sun, 31 Jul 2022 11:12:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229651AbiGaPMJ (ORCPT ); Sun, 31 Jul 2022 11:12:09 -0400 Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01C1C60ED; Sun, 31 Jul 2022 08:12:08 -0700 (PDT) Date: Sun, 31 Jul 2022 23:11:51 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1659280326; 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=MlYMxr4RTjKSXNttPFczidbRb/FlMGktoNy0WMLR7Gs=; b=ix+oqU1eRUu+Lx68xU5+ahbg5V9iJkl/16uOuxdLAS7KKz/rBzS1FeP08md9JxsVEQCmZL F5zggzByGr6LnOFWh4277o29exDoNSDfqviguV1lGsL3+OQAj/GvWToz0ACST/oSVcUUJS PLrFsWEhfUSf0EIiZnhSIg/n6ezeuEI= 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, Tao Zhou Subject: Re: [PATCH V8 02/16] rv: Add runtime reactors interface Message-ID: References: <8be3e66a8f0ab42feb3de4e6a630775b68df2d58.1658940828.git.bristot@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8be3e66a8f0ab42feb3de4e6a630775b68df2d58.1658940828.git.bristot@kernel.org> X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 27, 2022 at 07:11:30PM +0200, Daniel Bristot de Oliveira wrote: > A runtime monitor can cause a reaction to the detection of an > exception on the model's execution. By default, the monitors have > tracing reactions, printing the monitor output via tracepoints. > But other reactions can be added (on-demand) via this interface. > > The user interface resembles the kernel tracing interface and > presents these files: > > "available_reactors" > - Reading shows the available reactors, one per line. > > For example: > # cat available_reactors > nop > panic > printk > > "reacting_on" > - It is an on/off general switch for reactors, disabling s/switch/switcher/ s/disabling/enabling\/disabling/ [...] > + * "available_reactors" > + * - List the available reactors, one per line. > + * > + * For example: > + * # cat available_reactors > + * nop > + * panic > + * printk > + * > + * "reacting_on" > + * - It is an on/off general switch for reactors, disabling s/switch/switcher/ s/disabling/enabling\/disabling/ [...] > +/** > + * rv_register_reactor - register a rv reactor. > + * @reactor: The rv_reactor to be registered. > + * > + * Returns 0 if successful, error otherwise. > + */ > +int rv_register_reactor(struct rv_reactor *reactor) > +{ > + int retval = 0; > + > + if (strlen(reactor->name) >= MAX_RV_REACTOR_NAME_SIZE) { s/>=/>/