Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5231664rwb; Mon, 21 Nov 2022 19:09:04 -0800 (PST) X-Google-Smtp-Source: AA0mqf7ir5BB8U1FLsJmWAb9vLaqz7l8W1tl0RJ5qqOjyO0YbEBuOfQ6rq5H/G8ly3SlG4ABeIUJ X-Received: by 2002:a17:906:f8a:b0:7ad:9f03:aa1f with SMTP id q10-20020a1709060f8a00b007ad9f03aa1fmr18161813ejj.632.1669086544335; Mon, 21 Nov 2022 19:09:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669086544; cv=none; d=google.com; s=arc-20160816; b=W8mFLFvQ44wNth0HQms1ioUOZt3l6QACwnWZe5c98VtWJzvzW1BBlpdt7IHImaw0FZ jJfOEDJDrfUKyjZBdIlD1sIryjq6/L+lujMzYd4ZcdZBA/qR5WNzqiWLsZGvrW3TC7d2 qGSMg7LHwnWmnWBHe/YbsGTif6r8Bmua+ee1QIb3XipUzPjE6vKbWf8nVMAzX3Gzi28W LOHyzOc8m4nw1AxGN7H6boastQDj1IcRjNdcvrClBnN5+ijjS3TVixFtABEgLQ9lfy3t R0z/DgyDJF2Y2HOmzA/zbp539f4jl0ZcBh9Yc9bw8IKipM644a9cccijg5fLlAlv1edn 7/6g== 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=ADsX53+L/gARuywiQTkcM3oawh8BPTLsLOjf+IuQLog=; b=H0xBu27X0L7nMLDBIOvytMOIQhbyS7ZRBGk0h2gDCELOomOgwLKNQSgo8DPTF5kH51 AJDLkn1wA8Lz88M6JFF3YhnBmgTa6jcjX+1vsHDzozSQLSxwWxnisuJy87OL0AGtr5TE mRj+nliiuO1qR8uH6BAt9ewYVIJ6qkbB/eoa1OrXxJEshmxUTDWGBpdNcoYtkkN6O+ji 21RhSrSa5eXDGgMNSJ3922FEoc4s31BDveAM9q5EdPgkWUZWNBqzC/02DSRQHAELe5ET tpVxIYx3i0IqnVxZStsIwB8N/SgyVOWDaXF967Tnyz00YTRb7ciC4VlXfZ+QnUVuWrIC Pejg== 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 hp36-20020a1709073e2400b00782a33f2850si12475309ejc.736.2022.11.21.19.08.42; Mon, 21 Nov 2022 19:09:04 -0800 (PST) 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 S229915AbiKVCeL convert rfc822-to-8bit (ORCPT + 91 others); Mon, 21 Nov 2022 21:34:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230482AbiKVCeI (ORCPT ); Mon, 21 Nov 2022 21:34:08 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96AC1BF5BF for ; Mon, 21 Nov 2022 18:34:07 -0800 (PST) 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 2907BB81603 for ; Tue, 22 Nov 2022 02:34:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 76A06C433C1; Tue, 22 Nov 2022 02:34:04 +0000 (UTC) Date: Mon, 21 Nov 2022 21:34:02 -0500 From: Steven Rostedt To: Song Shuai Cc: mingo@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ftrace: avoid replacing the list func with itself Message-ID: <20221121213402.154adf09@rorschach.local.home> In-Reply-To: References: <20221026132039.2236233-1-suagrfillet@gmail.com> 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=UTF-8 Content-Transfer-Encoding: 8BIT 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, 22 Nov 2022 02:28:25 +0000 Song Shuai wrote: > Song Shuai 于2022年10月26日周三 13:20写道: > > > > The list func (ftrace_ops_list_func) will be patched first > > before the transition between old and new calls are set, > > which fixed the race described in this commit `59338f75`. > > > > While ftrace_trace_function changes from the list func to a > > ftrace_ops func, like unregistering the klp_ops to leave the only > > global_ops in ftrace_ops_list, the ftrace_[regs]_call will be > > replaced with the list func although it already exists. So there > > should be a condition to avoid this. > > > > This patch backups saved_ftrace_func by saved_ftrace_func_old > > which will be compared with the list func before trying to patch it. > > > Ping... Thanks for the ping. I had thought I had replied to this, but I don't see it in my sent folder. I may have been distracted, and lost the message. I'll take a look at it tomorrow. -- Steve