Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp593453imm; Fri, 17 Aug 2018 03:26:02 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyCN+aO+cEngp46l7x0n7INEJSMuvhmidwxvlI6kP94Snogpj+Espo0nvkcN8AsHYYEh8xh X-Received: by 2002:a17:902:b205:: with SMTP id t5-v6mr32464111plr.220.1534501562196; Fri, 17 Aug 2018 03:26:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534501562; cv=none; d=google.com; s=arc-20160816; b=VJIpr/6oAYa5b70qk5WrHRwUv9FKJUN7bPAr0fm1wZV4zAJw3CclvRRU3XSNx70/P8 ZBqdiPBKb0pjSpNXQJSgnjBMrC1ffi7T/TA0TR5/J6WKg4YVp8FqmXcr+BvxbgKZ1p4r 1jh/CcY9DIqk0REnsQdGNze5Cpk/51PstUw+2Wg7LuOyFiEJMpyiO5VDKYqGlqSbCGtC SdThuMMTTcpwFxj2GQYwknoFIeFjPlCMQEfODEh3CV+Y1fVTLNQdcpHWB6Hul670n+hP PmcdzVlMWSR0gSXzWkwoe4+ZF9QlWbUzR6RB5hvYQ7297IFm8nwwvVlKEZbefgTvJ+aL q2rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:from:date:message-id:subject:cc:to :arc-authentication-results; bh=R8zWn8YJvoKvkv+WZ2HX6+F2MFb9iS2Wi4PWIgnk+uE=; b=pDtf3u4zf1kpdagDmiDzw25T/lFrJ8jgcAuSuQXnFqr6MtKFn3UGjc5fspf+KkKen4 +GxLLKy7Y931BguzAnLgUPMM5qpz/B5jRjDrx8FhvCSM4t9IflxzRJZbnTSLoRVZy29t mwf3bNVjznFIVxVoFt0KyQHe6qDsAg76pjZVfzu37UHnBuQ8sn9csBu4Yo97Ig2wEPZl fi4CJVv7O5f13zuVvU8Z8XEPAv5ztD4Du37OJ4PTPpX247cwC9TZnT569c9Ne8dC6GdV v1lefRY5Vvluo0Hn/IxIxD592Q4LF0Esn8pFRUApC0XDRFXaNHhJ0lwTXLp+V8BgMTJ/ Pkvw== 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 o20-v6si1785829pgb.608.2018.08.17.03.25.47; Fri, 17 Aug 2018 03:26:02 -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 S1726587AbeHQN1f (ORCPT + 99 others); Fri, 17 Aug 2018 09:27:35 -0400 Received: from verein.lst.de ([213.95.11.211]:36049 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725845AbeHQN1f (ORCPT ); Fri, 17 Aug 2018 09:27:35 -0400 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 Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, live-patching@vger.kernel.org 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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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