From patchwork Fri Feb 8 15:08:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Torsten Duwe X-Patchwork-Id: 10803255 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 40F3F13A4 for ; Fri, 8 Feb 2019 15:08:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3064D2E0D2 for ; Fri, 8 Feb 2019 15:08:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2458D2E6DC; Fri, 8 Feb 2019 15:08:39 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 997932E0D2 for ; Fri, 8 Feb 2019 15:08:38 +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:Subject:To:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=Rw0bjC7ohnFm+Po79sysfAeHz3oZEA7LGVFkrVKWBFA=; b=icF Mqfg/dSSA6xqJBj+90IqJs5mBnKnOAZ7/JeUYkOzHfMRBleywbNJXoV0MH6UjPHGvOdtZwZuz6kU9 jbflhmcTwttVYUojbMsgNv1X9U6DALZ8Q+f1gGpCp0ndbaAysa2sAb5vVghj6apI84x5MC4d1o0Km yu0xxmINIOUUKXwVdTTnp+v0UBkX3XJyTD6wTYRIsNoKhJdX90l8sT4z++IdsApumrcHGW/cqwSrI OYZdAsLlr0xXI5buqfpP6IrHcEjZn1v2NocjBt9mIMHLatoo2CBgCTG88uyT4qM558r3h837n2FJr czMnIsPr3iPGF0OHuf6k23PbQRt81eg==; 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 1gs7lc-0008ND-IV; Fri, 08 Feb 2019 15:08:36 +0000 Received: from verein.lst.de ([213.95.11.211] helo=newverein.lst.de) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gs7lZ-0008M9-NF for linux-arm-kernel@lists.infradead.org; Fri, 08 Feb 2019 15:08:35 +0000 Received: by newverein.lst.de (Postfix, from userid 2005) id 44EBC68DD2; Fri, 8 Feb 2019 16:08:26 +0100 (CET) To: Mark Rutland , Will Deacon , Catalin Marinas , Julien Thierry , Steven Rostedt , Josh Poimboeuf , Ingo Molnar , Ard Biesheuvel , Arnd Bergmann , AKASHI Takahiro , Amit Daniel Kachhap Subject: [PATCH v8 0/5] arm64: ftrace with regs Message-Id: <20190208150826.44EBC68DD2@newverein.lst.de> Date: Fri, 8 Feb 2019 16:08:26 +0100 (CET) From: duwe@lst.de (Torsten Duwe) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190208_070833_900129_CCBC6C99 X-CRM114-Status: UNSURE ( 7.68 ) X-CRM114-Notice: Please train this message. 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 Patch series v8, as discussed. The whole series applies cleanly on 5.0-rc5 Tested-by: Julien Thierry --- arch/arm64/Kconfig | 4 + arch/arm64/Makefile | 10 ++ arch/arm64/include/asm/ftrace.h | 16 ++++ arch/arm64/include/asm/module.h | 3 arch/arm64/kernel/Makefile | 12 +-- arch/arm64/kernel/entry-ftrace.S | 125 ++++++++++++++++++++++++++++++++-- arch/arm64/kernel/ftrace.c | 117 ++++++++++++++++++++++++------- arch/arm64/kernel/module-plts.c | 3 arch/arm64/kernel/module.c | 2 arch/arm64/lib/Makefile | 4 - drivers/firmware/efi/libstub/Makefile | 12 +-- include/asm-generic/vmlinux.lds.h | 2 include/linux/compiler_types.h | 4 + kernel/module.c | 14 +++ mm/kasan/Makefile | 8 +- 15 files changed, 281 insertions(+), 55 deletions(-) --- changes since v7: * -pg -> $(CC_FLAGS_FTRACE) cleanup now split according to subtree maintainership. * REC_IP_BRANCH_OFFSET is gone, the functionality went into ftrace_call_adjust(), where it belongs. * MOV_X9_X30 macro is gone (why did we argue about its name anyway?); it is only used once now in the initial ftrace_make_nop new helper function ftrace_setup_lr_saver(), suggested by Julien. * call site processing was missing for modules. Fixed. changes since v6: * change the stack layout once more; I hope I have it the "standard" way now. And yes, it looks simpler and cleaner; thanks, Mark, for nagging. * split out the independent Kconfig and Makefile changes * fixed style issues * s/fp/x29/g * MCOUNT_ADDR is now merely a 64-bit magic, as this is totally sufficient. * QUICK_LR_SAVE renamed back to MOV_X9_X30. * place MOV_X9_X30 insns on bootup, and only flip b <-> nop at runtime * graph tracer "ifdeffery" reshuffle Torsten