Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp7510582ybp; Wed, 16 Oct 2019 09:42:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqwrgLYAAuaHqEYRKgLsBkGexzfexu6/foMJHuftfO5iIHkwjt+6VQtSV4CKFXuNmM4ijEQz X-Received: by 2002:aa7:d04a:: with SMTP id n10mr41029149edo.14.1571244162243; Wed, 16 Oct 2019 09:42:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571244162; cv=none; d=google.com; s=arc-20160816; b=NUeL+KSqaViFjXHIPZlGmbIRtqZektbftznY3uCeUf8ATQEZJ91vV61Hxicsre/Hmv KA15XvNp8rYQllxqTay+FAtdJmlfMvk51OWNQLG64NQvRGEBx9T+Ig7/sV6qXsqzxmRt wqAdfSj/g1R5q8gUKH+oaBxDxVSWzPzKY35uGp3xpslomrbM7oKY6pLY7kShCRrJPqvm 0yUg/1QPC51nsUpV4jEWMpBk+U9k0HQI7mESwrXWAOs6WutMn6p4bIbzCecBRckXvYtp lLKYWzTJFIBBqOteX+ZIywar/EtbTA9bpDMGjVqYWiyp9ZVYZcR92kgH37PGLqk0CYDg /kEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=wDLYQMPWFKw+Yo5hQHfi9CwUdi70Ketk09HV/9IbSJw=; b=VMJ5GaYl/ziUnmUY9j/AcDDmKzrF1Bnvui+PCoDJ68ty/uIwHjT5uNyaMyD7Moc6HW QR5teUo9slpGdKO7GDdzBm2OBSv8SrXVx95n5ZRyqlZ+5WI29U9yULG80IW2ZwDnVynr 6hSwqAZqBGbsLNW3BrMW6Y7FgYBYuvv9+hmVaEvo7dhJlBhkSkk2fjU+9YjzqMbf0umu QlgIYymMi7x4iT07PlM7nRxqfjeK2XZvp1XLV5wrVRAaK3GzckJW6ladZLwRj99Ad49E Bpnd22c/hMVoOnAgCUc8clbGiRdQQen5PRBClHv/lgSSakNE9kLeZaCal2qhha7Ydq0d 1sJw== 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 qn13si15361515ejb.114.2019.10.16.09.42.19; Wed, 16 Oct 2019 09:42:42 -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 S2391612AbfJPPBO (ORCPT + 99 others); Wed, 16 Oct 2019 11:01:14 -0400 Received: from mx2.suse.de ([195.135.220.15]:43250 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2388424AbfJPPBO (ORCPT ); Wed, 16 Oct 2019 11:01:14 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 6E36DB308; Wed, 16 Oct 2019 15:01:12 +0000 (UTC) Date: Wed, 16 Oct 2019 17:01:11 +0200 (CEST) From: Miroslav Benes To: Steven Rostedt 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 In-Reply-To: <20191016105814.2061a106@gandalf.local.home> Message-ID: References: <20191016113316.13415-1-mbenes@suse.cz> <20191016105814.2061a106@gandalf.local.home> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 16 Oct 2019, Steven Rostedt wrote: > 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? I think that would be the easiest, yes. Thanks Miroslav