Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp5560642imw; Wed, 20 Jul 2022 08:01:35 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sCw7oA9xnaP56HdsKZaS8DzhjB3gQD10otQrJNYmBWlWbZVF/jD5NAYRef1YrYPPbonvHr X-Received: by 2002:a05:6402:54:b0:43b:5cbd:d5db with SMTP id f20-20020a056402005400b0043b5cbdd5dbmr25580183edu.264.1658329295081; Wed, 20 Jul 2022 08:01:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658329295; cv=none; d=google.com; s=arc-20160816; b=HrP4kRZLfCt5lIdC4vIDmrNKb1tCsqXJHRMH8jPFZzt1rwjomcMfrXzlqRfybWnjiC hO3DIIrvqbcmI+FuM10sHBLvJlW9uH2UxQAu+PPuvCKL45NYAQiYnGhC7QqWVZsD1ynk AUQ/BAlbIreRcIWRBEuJsTwElNJSFwWOwImcOk219VUyId8dGWDPw+35+k0VPDpVu2yt 1PJUTcFPmpnk8Mn5q5HSgdWTSSU1IO/UP1aPEcn/d5HyrQAdbYKgiShaq4+AQuf1//G4 yo1YNj+OA4VZBddLpnUWiCwSv+NrlfHki4+4PMteHs/ixpgKAgx9GkpNdf59AWQsTMQr p4eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=RRaY6VCJyy8p3R4meVEtNU5jcXzlakmZJHQvGlG84UA=; b=VGf7Tr7i5OPPjaK0WJsqy30NVfDNMPZ1a2JrdNcnMlJ+n4YXsaAlz2CRf48vNdN6bY Is0lpaMdLqxav4tySEsoM8g1wh30iuQXUNuXWrxTvSwmP4mSe7JjnmVjdTuicbgf+u3K k5qTHIeL+6G87hAqgYU0t9LV9UmY3ucaOsSrcAelz51ZclnXFdYlZ/fuPd3o2pc26Ofb uq9TnlsXNQXkpqIYTRapHjU9sDIaCRzNtUjpYabcTUWxPx9KMChRwlIvPEtEPraoHaLS vMMEjPkFIsRpDUXwUn/X1N97aO4iNEc27U5h3cX0ve2zxDxGrEESZh2Cy/I2yd7TMs2t 8IlA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e18-20020a056402149200b0043bc007de84si21780edv.46.2022.07.20.08.01.04; Wed, 20 Jul 2022 08:01:35 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234835AbiGTOr1 (ORCPT + 99 others); Wed, 20 Jul 2022 10:47:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231962AbiGTOr0 (ORCPT ); Wed, 20 Jul 2022 10:47:26 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 409CB4E63C; Wed, 20 Jul 2022 07:47:25 -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 ams.source.kernel.org (Postfix) with ESMTPS id E8C6CB81FB5; Wed, 20 Jul 2022 14:47:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 67C5DC3411E; Wed, 20 Jul 2022 14:47:20 +0000 (UTC) Date: Wed, 20 Jul 2022 10:47:18 -0400 From: Steven Rostedt To: Daniel Bristot de Oliveira Cc: 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 , Tao Zhou , Randy Dunlap , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-trace-devel@vger.kernel.org Subject: Re: [PATCH V6 01/16] rv: Add Runtime Verification (RV) interface Message-ID: <20220720104718.59148968@gandalf.local.home> In-Reply-To: <69bb4c369b4f6f12014eb9ca3c28b74e4378c007.1658244826.git.bristot@kernel.org> References: <69bb4c369b4f6f12014eb9ca3c28b74e4378c007.1658244826.git.bristot@kernel.org> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,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 Tue, 19 Jul 2022 19:27:06 +0200 Daniel Bristot de Oliveira wrote: > +/* > + * Interface to read the enable/disable status of a monitor. > + */ > +static ssize_t monitor_desc_read_data(struct file *filp, char __user *user_buf, size_t count, > + loff_t *ppos) > +{ > + struct rv_monitor_def *mdef = filp->private_data; > + char buff[256]; > + > + memset(buff, 0, sizeof(buff)); > + > + mutex_lock(&rv_interface_lock); > + snprintf(buff, sizeof(buff), "%s\n", mdef->monitor->description); > + mutex_unlock(&rv_interface_lock); What exactly is the mutex protecting here? -- Steve > + > + return simple_read_from_buffer(user_buf, count, ppos, buff, strlen(buff) + 1); > +} > +