From patchwork Mon Oct 1 14:16:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Torsten Duwe X-Patchwork-Id: 10622247 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 810B11515 for ; Mon, 1 Oct 2018 14:33:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6302128DB1 for ; Mon, 1 Oct 2018 14:33:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 56A9928E23; Mon, 1 Oct 2018 14:33:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 014DF28DB1 for ; Mon, 1 Oct 2018 14:33:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:From:Date: Message-Id:References:In-Reply-To:Subject:To:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=HZvNJ8X+ED6int1ddcbsS0nyIzUeghcrnJ1SQfQJhDY=; b=XsNyqxZgvhT8xuRboN9dZNlNY2 71rYykKw/iWnuD8z5SeRM6ycD6Kx2qVO9sVurbfGQ6ItTqZgqfB8Dnz+UjiEk8pJ+H/nQWOiazAmZ szKTFQZA1nKd5PKLAhpqwPgOd9Qk4jtKTbGhELI+KwcIAVkKCUmTXEHgvoUg/b+gc72V+kwFio0Yw bbT3pFrziJiduqbvu4knlvzFI73so4OoGQF05+skj0s8i5AhQirhgKiWmLBXI/xMOENpmeR54oRXn gNGNv0x2RuSivGAzjKF3sT4cXY6AzjENG4ZSrjZeONOiNfTJsCRuRqk9wZ5Yu6cvBj5YblSAnD/+u 5APzcD/g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g6zGY-0007JZ-G6; Mon, 01 Oct 2018 14:33:42 +0000 Received: from casper.infradead.org ([85.118.1.10]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g6zEH-0005uL-Qw for linux-arm-kernel@bombadil.infradead.org; Mon, 01 Oct 2018 14:31:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=From:Date:Message-Id:References: In-Reply-To:Subject:Cc:To:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=FmMBnTb+JXJDbTA6rQ0ZWsJqHwmjUAelt4A2mqEM9xQ=; b=RxPvc3Ow9k16noQK9AsBMmzv2 cOqY6fnIpB+LZ1BzSDUO7XzmN96ahiGY2KCX/ZYSLNsjNgYTIeHPyGVZeun18GdOKHj5EkN5darqE r/O8DG7cdAbfcZCdxB0uSD5BWKBNRWXAycC9XNMkUkC++gnLqVq8kj6tMrTPG90lUJKHz4/W746Jd 0949EXbDislAkNhzMgNHta+46W8r/T3+br4ZCqHlXWv/qsCVQiwZV5rK2vGmG/JvLoufUxayIRa68 WpYeoZopAAcS3XU3UluYKMiPknr3ZYTepdqL0sPa9wGXNsc0bGEj+I+J4as4WzpoAb587DabLwONZ beQTTaREw==; Received: from verein.lst.de ([213.95.11.211] helo=newverein.lst.de) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g6z0J-0004fn-7m for linux-arm-kernel@lists.infradead.org; Mon, 01 Oct 2018 14:16:56 +0000 Received: by newverein.lst.de (Postfix, from userid 2005) id 331EE68BC7; Mon, 1 Oct 2018 16:16:43 +0200 (CEST) To: Masami Hiramatsu , Will Deacon , Catalin Marinas , Julien Thierry , Steven Rostedt , Josh Poimboeuf , Ingo Molnar , Ard Biesheuvel , Arnd Bergmann , AKASHI Takahiro Subject: [PATCH v3 1/4] DYNAMIC_FTRACE configurable with and without REGS In-Reply-To: <20181001140910.086E768BC7@newverein.lst.de> References: <20181001140910.086E768BC7@newverein.lst.de> Message-Id: <20181001141643.331EE68BC7@newverein.lst.de> Date: Mon, 1 Oct 2018 16:16:43 +0200 (CEST) From: duwe@lst.de (Torsten Duwe) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181001_151655_344751_AFBB55FF X-CRM114-Status: GOOD ( 11.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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. 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"