From patchwork Fri Aug 17 10:25:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Torsten Duwe X-Patchwork-Id: 10568595 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 0F428139B for ; Fri, 17 Aug 2018 10:25:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E7E2B2B3BB for ; Fri, 17 Aug 2018 10:25:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC1582B4A4; Fri, 17 Aug 2018 10:25:04 +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 BB6C32B3BB for ; Fri, 17 Aug 2018 10:25:03 +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=2klIODogfRf94RReVNO9e/bQojjhCupckSkRTZTEUpc=; b=KWe X3nspcCMrN9lawyfnn/F2cRTrBBor/wOI/BFglGoQVI31lKhDQ7JMqIWilFh/uLbb7tiv6zPDbJiP +8nRYZyGL+I6clTn5mzb2J4CKwDJ7sMay+5kBU/sf1jmvMkqeeDkoaq0xIlS+kISFRcu887VhGu/Q WadX+8ENpCIppz1pTuViCcHALxOSFhZXMXzWE5sobwH9l1Js7EMnvC8Pm/6KU+1P86mM7CZlFUZEe w+yP7YQ0LXUyGkBeDgitrtu/VOJs6gb+2cKbjtSg5p7JIy3V7eEqmVFCAE8itdfHcUgPT5ptn4hcr ZuL5HnEPRRnDEPp/1NWD4gXxrnx668w==; 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 1fqbwD-0007IQ-V7; Fri, 17 Aug 2018 10:25:01 +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 1fqbwB-0007H3-0a for linux-arm-kernel@lists.infradead.org; Fri, 17 Aug 2018 10:25:00 +0000 Received: by newverein.lst.de (Postfix, from userid 2005) id C628D68EF4; Fri, 17 Aug 2018 12:25:44 +0200 (CEST) To: Will Deacon , Catalin Marinas , Julien Thierry , Steven Rostedt , Josh Poimboeuf , Ingo Molnar , Ard Biesheuvel , Arnd Bergmann , AKASHI Takahiro Subject: [PATCH v2 0/3] arm64 live patching Message-Id: <20180817102544.C628D68EF4@newverein.lst.de> Date: Fri, 17 Aug 2018 12:25:44 +0200 (CEST) From: duwe@lst.de (Torsten Duwe) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180817_032459_202334_C6DF101E X-CRM114-Status: UNSURE ( 5.46 ) 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 Hi all! Here's v2; I hope I have incorporated all feedback properly. Julien: #S_X28 + 8 is in, but ftrace_modify_call() is referenced from generic code: kernel/trace/ftrace.c __ftrace_replace_code() And I'd *really* like some feedback from ARM/Linaro/... on the stack unwinder! [Changes from v1]: * Missing compiler support is now a Makefile error, instead of a warning. This will keep the compile log shorter and it will thus be easier to spot the problem. * A separate ftrace_regs_caller. Only that one will write out a complete pt_regs, for efficiency. * Replace the use of X19 with X28 to remember the old PC during live patch detection, as only that is saved&restored now for non-regs ftrace. * CONFIG_DYNAMIC_FTRACE_WITH_REGS and CC_USING_PATCHABLE_FUNCTION_ENTRY are currently synonymous on arm64, but differentiate better for the future when this is no longer the case. * Clean up "old"/"new" insn value setting vs. #ifdefs. * #define a INSN_MOV_X9_X30 with suggested aarch64_insn_gen call and use that instead of an immediate hex value. Torsten