Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4939119imw; Tue, 19 Jul 2022 16:48:12 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uY4Y0hre09k6DjErFhSZNpK/Ns7+fJOixGetPMr83MYLZUG1uSsQaOygVOPScrFL7hZ/p5 X-Received: by 2002:a17:902:a613:b0:168:a216:f3ff with SMTP id u19-20020a170902a61300b00168a216f3ffmr36126832plq.21.1658274492368; Tue, 19 Jul 2022 16:48:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658274492; cv=none; d=google.com; s=arc-20160816; b=XcmcKGBiZco6tNzvIyl9EPBzYPn7CauiR7AcE7pzJfUqmFeCXSbFwFcmCLesZYR8Q5 DWB+0257UFU+xBcSON6u+m32M7CLzW11qTMwReh4NvZfXhHqAqZbG34SWZlULb/3SBPG xCDpWL4A6mgb8DRjocfGIAlh6zQrfg2DRwKtHCOyDCsCk7wYIkSvsIxrHGSMytj6mWlW wqX0iaR8FAqtb7d2K2rNH8WvDWyGyAVtAuHQVhhclw3wTFQDU/vcK2P7MsqwzpQemaHB sI9J17UxvT86/hyL/L1/tLQZOvGjWRiRTWAhY/UVu8uM/mbd5gI7vS93vas6zxH7Ywdi bDwQ== 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=A+Ye99GhSWc72EHnI101MzbR/BcvP+vckaD9sKiA6KA=; b=OCKccRSNX0Qdknq5BdLpot4vKPXj2+Fl1n65I0paWUUUP80j9DVW7fCeEpnRRzLkR3 JhYcoAUrJVpc3Q1phpNZy8npH1QjJPk4sPy8YrEpqKY2u1isz1HJB/QTos6nhCL+Prz1 fovRVaXpvKdhPKZeLZRDmX5sTqdrf/MeKO71TWkDpnaX6wO+rgi58AHF8oLmJ85JEWxL 90tl0gA9emUXezeOqJKQW6UIZrpUOkw1PQ6XdktEsN3NXtpClSDv47QG7f2bbaJjKBzE lnmcEJM1DQN3HP7+beZ5WYyftXgpC4M8Ft75A7zpEnM187x9UdSvYrM9OcNGsX0lQDXn 6AFQ== 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 n2-20020a170902d2c200b001586fbb2b6dsi23107066plc.566.2022.07.19.16.47.58; Tue, 19 Jul 2022 16:48:12 -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 S238246AbiGSX1V (ORCPT + 99 others); Tue, 19 Jul 2022 19:27:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238173AbiGSX1U (ORCPT ); Tue, 19 Jul 2022 19:27:20 -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 368B261D9B; Tue, 19 Jul 2022 16:27:19 -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 C653861337; Tue, 19 Jul 2022 23:27:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 365DAC341C6; Tue, 19 Jul 2022 23:27:17 +0000 (UTC) Date: Tue, 19 Jul 2022 19:27:15 -0400 From: Steven Rostedt To: Song Liu Cc: Song Liu , bpf , lkml , "live-patching@vger.kernel.org" , "daniel@iogearbox.net" , Kernel Team , "jolsa@kernel.org" Subject: Re: [PATCH v4 bpf-next 2/4] ftrace: allow IPMODIFY and DIRECT ops on the same function Message-ID: <20220719192715.2b93ef70@gandalf.local.home> In-Reply-To: References: <20220718055449.3960512-1-song@kernel.org> <20220718055449.3960512-3-song@kernel.org> <20220719142856.7d87ea6d@gandalf.local.home> 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 23:24:35 +0000 Song Liu wrote: > Actually, we cannot blindly lock direct_mutex here, as > register_ftrace_direct() already locks it before calling > register_ftrace_function(). We still need the if (IPMODIFY) > check. Let's not play games with this then. Create a register_ftrace_function_nolock() and use that for register_ftrace_direct(). Otherwise it's going to be a nightmare to keep track of. -- Steve