Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3503575imu; Mon, 14 Jan 2019 04:17:11 -0800 (PST) X-Google-Smtp-Source: ALg8bN5bHCo98MB8xfyhECAQ/7Y/yRuMF/b/7g+G/AdTdhfN4jUSG8zSX2gErjw/xzVRRq0mbFuX X-Received: by 2002:a63:4b25:: with SMTP id y37mr20942334pga.181.1547468230956; Mon, 14 Jan 2019 04:17:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547468230; cv=none; d=google.com; s=arc-20160816; b=aiDvFtGdsEZix4LKWinPzVZAvAITAJG2dffHf56qfw8SJNolEb63fCD6lnaBbRt/sk U1AjiY6i4tRL6g95r801hIUj8DZu+4xXfAsy4iLb0AhBPyRb+gCYC5DYS2fpcaSvJ5U6 nZQogEsxEIrRSG8U2qRsDxZjhYUT0RlZaYxRdyyjANC97t/Hc3Gs2DpFEuVrDJvSusRB fWV/XeKlH2Mvl10bJclcgHBPRtEps1fVHVxLcPJ//raVLEvyV3WnrVSDxhEHSNbs0eUu M4dB34e5iTrnUu4iaFbGsCbHiyKqVIuIqdGM+Gt0yujpwOvvrJbjgUJtmasjHEVPr0a7 sFjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=9rDzKOuL0UG5qQGT2nWf2dhs7fmgU+oCSfvYTEpYImY=; b=1DmNhW5mP+mIbDS1l+WAqr3pMyDrpiFnH9QCFUDRMp2P1R0cE/hJLXzGuTy9k9gHYH vAGfoqYiGfrLYVmdMVGyp41igJwRxF6Zp4la7cKen94A25gxVNricjKkzn7g1e4N+t87 /Iy7M8O4WF/9z5ekGzYi4LWQ8w84RWCzzpfnvsIAsv9gPzaTAuFZlmSHVJuUkNCAWoSw KOKM94tp/gMQSznKydn70xV+a4Q1XAe7OI9Io62To/MXm6Z4Sja+6vhMZNlFkph6fpoj Fe/vDJxv3zHG0NdOEREHSDRJpQWg6CJ696lsiJkVHetx8A6UrYh8Oq8Wow2lH3eBp5U5 Rz5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pBbrDnCx; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x15si229569pgq.378.2019.01.14.04.16.55; Mon, 14 Jan 2019 04:17:10 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=pBbrDnCx; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726595AbfANMOF (ORCPT + 99 others); Mon, 14 Jan 2019 07:14:05 -0500 Received: from mail-pl1-f193.google.com ([209.85.214.193]:47033 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726437AbfANMOF (ORCPT ); Mon, 14 Jan 2019 07:14:05 -0500 Received: by mail-pl1-f193.google.com with SMTP id t13so10061531ply.13; Mon, 14 Jan 2019 04:14:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=9rDzKOuL0UG5qQGT2nWf2dhs7fmgU+oCSfvYTEpYImY=; b=pBbrDnCxBKp/SJuRdXcl+9i0ufQYwz6AalCV8iIiIqNGD9npyX1NOlTqDUopV+bQV4 6l1jv48D9uH3tNBQppzuMH+ofIwu1BD1nU5QSLw5vXRSceGHxFHha+71fCVdrx8QYiqF KkuqYldcZXNAY26wnm8q5cGodugN9QB596lD/56t1rjFSgEFX0E94U1xaa/SdacqAdoE PfyUvJ+tt2VfDO47MG2vS0drJkHSNZz6n51fqxWHu5qDRN+t24BKt95+KAfYivAkuzPx FYnaERSa8Pc0J9fmF1ozTACMvqVQKoSwjJIJgTqGP20bPfDFSWi8bmTZKKyM/GzOQrY/ Gfzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=9rDzKOuL0UG5qQGT2nWf2dhs7fmgU+oCSfvYTEpYImY=; b=qS7ajZe1H5zMR4FQb7QTk+2JQEXX56OOX+5CIypGnNkbM/tryxh69+fKEcXBrN/oat u4gIbMK/Y/EJGvSoRRRR40t14cIoq7febs2MZeSA+S8GRXcEj6ogyskdvEJYJnkVE7fm EOzURmEyKSApl9075M0eSuVbrPUR9yyahW87b/odJoQO2/bdcCbB3o7o6MrGpxmf4UzC D34hzf1p5qMII1aoiMQZ7V2pdG4UJz+yIfQK8G3JMawNWENwW7d0XnJ9rIL7hjzjAeAS 7AXUvc3S11yGasqjDhGBLJ17UqivRnnzQLc2EpkBHV8lLsK6PLGEo3X/mnMz/47YvEUr K5aw== X-Gm-Message-State: AJcUukezPlMq91ik3IhqXGRizTq8xxjozRbaMnI7qhRIv9+6SMJ23/S6 JzAem3P+Zpp8bPo/usJGqMc= X-Received: by 2002:a17:902:d01:: with SMTP id 1mr25465192plu.127.1547468043821; Mon, 14 Jan 2019 04:14:03 -0800 (PST) Received: from localhost (14-202-194-140.static.tpgi.com.au. [14.202.194.140]) by smtp.gmail.com with ESMTPSA id e24sm325936pfi.153.2019.01.14.04.14.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Jan 2019 04:14:02 -0800 (PST) Date: Mon, 14 Jan 2019 23:13:59 +1100 From: Balbir Singh To: Mark Rutland Cc: Torsten Duwe , Will Deacon , Catalin Marinas , Julien Thierry , Steven Rostedt , Josh Poimboeuf , Ingo Molnar , Ard Biesheuvel , Arnd Bergmann , AKASHI Takahiro , Amit Daniel Kachhap , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, live-patching@vger.kernel.org Subject: Re: [PATCH v6] arm64: implement ftrace with regs Message-ID: <20190114121359.GB26056@350D> References: <20190104141053.360F768D93@newverein.lst.de> <20190104175017.GA7157@lakrids.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190104175017.GA7157@lakrids.cambridge.arm.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 04, 2019 at 05:50:18PM +0000, Mark Rutland wrote: > Hi Torsten, > > On Fri, Jan 04, 2019 at 03:10:53PM +0100, Torsten Duwe wrote: > > Use -fpatchable-function-entry (gcc8) to add 2 NOPs at the beginning > > of each function. Replace the first NOP thus generated with a quick LR > > saver (move it to scratch reg x9), so the 2nd replacement insn, the call > > to ftrace, does not clobber the value. Ftrace will then generate the > > standard stack frames. > > Do we know what the overhead would be, if this was a link time change for the first instruction? Also, I was under the impression that some arch's do ftrace_call_replace under stop_machine(), is that a possibility here? Balbir Singh