Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp558650imw; Fri, 8 Jul 2022 07:43:35 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uFjshHgIJB8g/0ySp2Gzs6lCarEpjYi0bZunsDTlXXwysnEkm60JwpUY/fO1iOdq6EAypV X-Received: by 2002:a17:907:3e11:b0:726:372b:6c32 with SMTP id hp17-20020a1709073e1100b00726372b6c32mr4053135ejc.157.1657291415446; Fri, 08 Jul 2022 07:43:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657291415; cv=none; d=google.com; s=arc-20160816; b=HVqskfsk1b2jMwms672rVnBi0qmJCzYdOipdS20jjPnNPLj6rAbD7x4Xvuz/qBzFK0 MtDUcwYrZ+wV/valoqnCtwB83rpHDHXNiFSUoyYFUcntuRYYcUvsJufmVf8yyKxsQprp IdFTURddgde8rBNYvhvIeMq0wxRWjRIO8sisdd+CTboIijx3ErqM9b9OD7qjs+Bmdt9K B9E6zmZi/3WlZskiNPm7NUgSREr64AW65wbSGOoTy4l8Pc9W+w5RRSWRCdganrGUnBNm Iq1HyLpPcAxjBjiNH1qAjrI7aZtkc7illYjyszn5v2RJaly8MNoeqn4aZO6bHHrkPtlE aH0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=/y7zKdPOulHs9WbmT0j/YoZcZRChsnKIF6Qakow3M0E=; b=JNXHbKJy3X/VPQbHO1SxIoOdUg1dY3UDfRzLL3iU3Ov/ixdfXbLWR0e8JQNQCN3GMw ZnJvZHPPex42DS6PYSst9wihIza8PQU+ssfOlKieCVApU1FcsiOtp1JM5dyN/hS23eyI 0/QnWL8bAhEyNzoFbZ5J1E4hCR9df6FxESPSt7kwVhw0G/Rc0VCdcjrF7sA1TgwlyT6P E69UnOm+56v3eeVYuNBCFmAcgOpI3mktWwniHGMPdIUg5FwJr5eWDPOWxNKfPyQ5NEZI MCoE4dz6OfXc4olERYKgczrpAlFo0MM2sYmZoWi5UnFY296fhinIk6Mx5srVK1OIHJNh xTZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="ZSY/ZLBv"; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q12-20020a056402518c00b00435dde2e2d6si5629849edd.562.2022.07.08.07.42.55; Fri, 08 Jul 2022 07:43: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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="ZSY/ZLBv"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238279AbiGHOj5 (ORCPT + 99 others); Fri, 8 Jul 2022 10:39:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238064AbiGHOj4 (ORCPT ); Fri, 8 Jul 2022 10:39:56 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F80813F0D; Fri, 8 Jul 2022 07:39:55 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 189966285E; Fri, 8 Jul 2022 14:39:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ACFD4C341C6; Fri, 8 Jul 2022 14:39:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657291194; bh=n9Wx6YYU0Hw39VR6mkEgQaCtA6WpxtO3+AJlLEHoUFA=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=ZSY/ZLBvJ/J3h/RRCHua4mwZbteQKzhRzR3P5WkJBs5pXv4cELtRWn62w3jwr+GWG wAx/XR6l//C3n6/+A6+LBVv/D9xLWKh0i+caBBV4fcwtvfS5BHiH5vmsvb/2gkfmFx JkS6E/KOOEfDVM3g6Vo1Zrh3hj6s39Xq3o3ymn4/DTe+EljcU/wngqdfSzPfTVjW+a DRHETPi08dBezjX/0b1j+5tULfEDgPQJP4IFOKiwdNNA6ulRLvYH8OQn75iIbKgiP+ oRM66EcHFeHqdJqEaD15nssvuRip1jVFp11Lblg6mKoRbN6K9Y/BoQLWcBGwuh54rj KrLu3esqMfCog== Message-ID: Date: Fri, 8 Jul 2022 16:39:47 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH V4 01/20] rv: Add Runtime Verification (RV) interface Content-Language: en-US To: Tao Zhou , Steven Rostedt 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 , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-trace-devel@vger.kernel.org References: <60548902dbccaa7ba420e40e46835693e27f643f.1655368610.git.bristot@kernel.org> From: Daniel Bristot de Oliveira In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Hey Tao! On 7/6/22 19:49, Tao Zhou wrote: >> +static void *enabled_monitors_start(struct seq_file *m, loff_t *pos) >> +{ >> + struct rv_monitor_def *m_def; >> + loff_t l; >> + >> + mutex_lock(&rv_interface_lock); >> + m_def = list_entry(&rv_monitors_list, struct rv_monitor_def, list); > I realized this m_def is not real but vain. Is it possible the loop is > skiped and just return m_def that is not valid. that is empty... not a problem. I am not seeing (the possible) problem here. Could you simulate/reproduce the problem? Btw, this code is "inspired" (iow stolen) from trace_events.c. Am I missing something? steve? >> + for (l = 0; l <= *pos; ) { >> + m_def = enabled_monitors_next(m, m_def, &l); >> + if (!m_def) >> + break; >> + } >> + >> + return m_def; >> +} -- Daniel