Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp144626imm; Mon, 1 Oct 2018 07:52:50 -0700 (PDT) X-Google-Smtp-Source: ACcGV62bVn8uxMnh2FRvLaetlZE1zXVrVRuLVIY7Axv/BXC6vcJSk9DTcKuSKqgoQ5lR2S7OoXVl X-Received: by 2002:a17:902:5993:: with SMTP id p19-v6mr12343949pli.260.1538405570665; Mon, 01 Oct 2018 07:52:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538405570; cv=none; d=google.com; s=arc-20160816; b=gq5/RCEAlx5aEg8g/0n6JW6rsRLEUrOsQO3CWza3JV64OqCPIHOtdtgxJWs9kbq86r BKmbgZZG46FYQ1YRc18m0segIRJcJ6ePEWnKkIrKOzziQR0WmpF03tmGmm6SZuH9NQ+H YbdL6Opx18UqYTQz9YzkHZLibRpf5ESpV+K71F9MgCR3hqE5hZd1AUZGlrECweBvU4Lc hKq4ou/Euhdunjl1VU6V6Ea7swOu0kmqemxMCKsmLSYAxkG5oam9Ga9tchhSJzhCYOS9 bfcKGLSCQUXtLkzIgpiQuSAAXNMHRfvkuq0eF45rQqXEt7LvRc6l4tdwCTZj79cyGMmm usgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature; bh=nuQMH4QyUZbI9PbzAUc4fniTl9pvLrgey7B00sVGezI=; b=id0gZUMi9O//SveUVuSpUsItf3YGA5TI16YmGyaR7z98Ow7Ix7TKM8r+iARZMvY2Z8 INcFG95xU/qwGC3H06pJn4gMGw4EhGgtlTU1gtydxOt9SbpnvGoZoeNv1cxGvOZWoJtC OgvXahugSyH/XDdO2w0HfynPi/BjBpLkoPdk0KNBDBfjLXLTAaq5AnVcGnuaxftL0F4k NcpWCRnltk1iEdVBh2z4qzCuWwX6VXbf9TAITNFP6cPZpMxs7S5IIO/bWsp/LLfKFn+6 D2e3u4JK5wy7BrrH9g/JOSIjZAO0nC0PdAPgf3F8SIsG4NWKrOZUqqZpwXdiIBVBUhq9 q8Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S9dtBJ43; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g35-v6si12546471pgm.514.2018.10.01.07.52.35; Mon, 01 Oct 2018 07:52:50 -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; dkim=pass header.i=@linaro.org header.s=google header.b=S9dtBJ43; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729480AbeJAVak (ORCPT + 99 others); Mon, 1 Oct 2018 17:30:40 -0400 Received: from mail-it1-f196.google.com ([209.85.166.196]:36064 "EHLO mail-it1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729439AbeJAVak (ORCPT ); Mon, 1 Oct 2018 17:30:40 -0400 Received: by mail-it1-f196.google.com with SMTP id c85-v6so11819697itd.1 for ; Mon, 01 Oct 2018 07:52:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=nuQMH4QyUZbI9PbzAUc4fniTl9pvLrgey7B00sVGezI=; b=S9dtBJ43cBMbBIDbp0SI5ULlMJ8M3zqP6cyJ01GxhFAKzTQ1aNztI6FJAaVFBCAey2 W0YI+zItupfpfk48mhc7ZsZd18Z+Da7si2+MQo0V//Vz90Aa0ymj7vV/ZSC47omE0qDQ 7vhnr43UK5MzK/5jFmFDgSoN1OYlUYK3J5ImY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=nuQMH4QyUZbI9PbzAUc4fniTl9pvLrgey7B00sVGezI=; b=H03eOTha6JEpBSE3Hvyqd9DZ9AHpIneVghcsG5XgLCMi5X6oeFXmAu/2XfAu09CqY5 rqgFdnchsX6ynOtdryo7C3lHoryJ+3d8J547tPb/gnH+rtehEadVlzzswYCc2X5Cukfu d8BjbqLibbDv9txyoTswfz0+cs3NhXMNQ8ZT7QkyqLugl18yAVj4Q+fHYH1MRDqJlr3Q 7B+xkQDi2WeXSA7astyEMiGHWLrWs9j+MyllNHxn3px8gtTYkbgh/nZ+H/qGDpTAOhDL R+QbcJooIFiJcwLobHhW9CzPrD+vjf4YIKd9QnpNxQQUdmqu2mSbjDQiSbgG27gsWEY2 jZ4Q== X-Gm-Message-State: ABuFfog+LDmfF49xBzG7f2IdaKkiCCbt4bLqwD7xdBvc4CzzzvxlR2gh Akjg/dyw/BJbEvFvxaRrrQPJAMBWbVzCZJWjoAcDUw== X-Received: by 2002:a24:e48e:: with SMTP id o136-v6mr10130760ith.58.1538405548344; Mon, 01 Oct 2018 07:52:28 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:5910:0:0:0:0:0 with HTTP; Mon, 1 Oct 2018 07:52:27 -0700 (PDT) In-Reply-To: <20181001141643.331EE68BC7@newverein.lst.de> References: <20181001140910.086E768BC7@newverein.lst.de> <20181001141643.331EE68BC7@newverein.lst.de> From: Ard Biesheuvel Date: Mon, 1 Oct 2018 16:52:27 +0200 Message-ID: Subject: Re: [PATCH v3 1/4] DYNAMIC_FTRACE configurable with and without REGS To: Torsten Duwe Cc: Masami Hiramatsu , Will Deacon , Catalin Marinas , Julien Thierry , Steven Rostedt , Josh Poimboeuf , Ingo Molnar , Arnd Bergmann , AKASHI Takahiro , linux-arm-kernel , Linux Kernel Mailing List , live-patching@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Torsten, On 1 October 2018 at 16:16, Torsten Duwe wrote: > In commit 06aeaaeabf69da4, many ftrace-related config options are > consolidated. By accident, I guess, the choice about DYNAMIC_FTRACE > and DYNAMIC_FTRACE_WITH_REGS is no longer available explicitly but > determined by the sole availability on the architecture. > > This makes it hard to introduce DYNAMIC_FTRACE_WITH_REGS if it depends > on new compiler features or other new properties of the toolchain > without breaking existing configurations. > > This patch turns the def_bool into an actual choice. Should the toolchain > not meet the requirements for _WITH_REGS it can be turned off. > I guess we now have Kbuild/Kconfig support for this, no? I mean, we can now show/hide options depending on the capabilities of the toolchain. I am not saying it would be a better approach, though - I'd rather have a warning than have things silently disabled, but other people may think differently. > Signed-off-by: Torsten Duwe > > > --- a/kernel/trace/Kconfig > +++ b/kernel/trace/Kconfig > @@ -508,9 +508,15 @@ config DYNAMIC_FTRACE > otherwise has native performance as long as no tracing is active. > > config DYNAMIC_FTRACE_WITH_REGS > - def_bool y > + bool "Include register content tracking in dynamic ftrace facility" > + default y > depends on DYNAMIC_FTRACE > depends on HAVE_DYNAMIC_FTRACE_WITH_REGS > + help > + This architecture supports the inspection of register contents, > + as passed between functions, at the dynamic ftrace points. > + This is also a prerequisite for Kernel Live Patching (KLP). > + When in doubt, say Y. > > config FUNCTION_PROFILER > bool "Kernel function profiler"