Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp7507092ybp; Wed, 16 Oct 2019 09:39:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqxuN2MPz2cewjyNasVh2hGklTJXAKMVVcqc9L5P2kk86/2N8MfqNTnMTCOgZECK7+78Isvb X-Received: by 2002:a17:906:4d5a:: with SMTP id b26mr40774316ejv.157.1571243961940; Wed, 16 Oct 2019 09:39:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571243961; cv=none; d=google.com; s=arc-20160816; b=Xow4HphhIEZvYSMpyq8epyAZpTOeDwUyffrzeAJW7aGLz+IVgP0vMX0cs7RsIakMgH 2z2YuOfAGWkEb2k4m7R1RNum/bwEl9DdEAwWJRbUqHn6wc11SQhmas3olTyimoa3RAJQ R2E2xUHpzNIB9bZzz6CpWCPWEVX6OEaIyMA7DaVdb1s1goiv3suuMpOYViZiisXoscy5 MHGfMH9iYzjD2auXSjM44YIzBsODMQADNTGcZ+Q1b4vxJOF9jEyhXCDDQFs1KLmpkaP+ OYaboiEHvKueWQ32jZkOwGaAThaz6dXQWeqjZMgWstNQLMQxO6OHmQUGweUdgTpge4sZ n7vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=J2EUziz2F2ek9K93wyDJxXOaubB3ws3FWV7VnT7C3Gk=; b=VdAB0A+zXHV7yKjfQmPGKSKU+T7DQC55MLXW9jJL2X3OSpJoN+Sb+NEHqTJGgpymAC 6B3XhHb+5A9PdBXDiT1NR884mYkyuX9G8yiWYY67YBNWCdG0zRKVp5qUzFd+zXdv5xt+ Id6/hDUIrV2/IYF88CHDDwAX2htkaOqDB2KL83YkooV8/tIgIw/VWC+BaNd8ieuYamEv a+pI7TDSN8FFsjPu+ghBMFc89RxKi1Qo1zp3qoZQWiMo/RqN9A5S2RvGLUOKi5VRbwTl 6hYDF3j34af9QQNd+VvW/vtWEcYAbCOqc8EsRn+HNyTlueO1O7GkGc1g9yggz1V6hlNf eTTg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k4si5331492ejq.167.2019.10.16.09.38.56; Wed, 16 Oct 2019 09:39:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388493AbfJPO6U (ORCPT + 99 others); Wed, 16 Oct 2019 10:58:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:36996 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404400AbfJPO6R (ORCPT ); Wed, 16 Oct 2019 10:58:17 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 62DE121A49; Wed, 16 Oct 2019 14:58:16 +0000 (UTC) Date: Wed, 16 Oct 2019 10:58:14 -0400 From: Steven Rostedt To: Miroslav Benes Cc: mingo@redhat.com, jpoimboe@redhat.com, jikos@kernel.org, pmladek@suse.com, joe.lawrence@redhat.com, linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, shuah@kernel.org, kamalesh@linux.vnet.ibm.com, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v3 0/3] ftrace: Introduce PERMANENT ftrace_ops flag Message-ID: <20191016105814.2061a106@gandalf.local.home> In-Reply-To: <20191016113316.13415-1-mbenes@suse.cz> References: <20191016113316.13415-1-mbenes@suse.cz> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 16 Oct 2019 13:33:12 +0200 Miroslav Benes wrote: > Livepatch uses ftrace for redirection to new patched functions. It means > that if ftrace is disabled, all live patched functions are disabled as > well. Toggling global 'ftrace_enabled' sysctl thus affect it directly. > It is not a problem per se, because only administrator can set sysctl > values, but it still may be surprising. > > Introduce PERMANENT ftrace_ops flag to amend this. If the > FTRACE_OPS_FL_PERMANENT is set on any ftrace ops, the tracing cannot be > disabled by disabling ftrace_enabled. Equally, a callback with the flag > set cannot be registered if ftrace_enabled is disabled. > > v2->v3: > - ftrace_enabled explicitly set to true > - selftest from Joe Lawrence (I just split it to two patches) > - typo fix > > v1->v2: > - different logic, proposed by Joe Lawrence > > Joe Lawrence (2): > selftests/livepatch: Make dynamic debug setup and restore generic > selftests/livepatch: Test interaction with ftrace_enabled > > Miroslav Benes (1): > ftrace: Introduce PERMANENT ftrace_ops flag > Would you like me to take all three patches through my tree? -- Steve