Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp6062906imd; Wed, 31 Oct 2018 06:21:31 -0700 (PDT) X-Google-Smtp-Source: AJdET5ccEjT3pp2WUR319W4Qh+NWN74ax98PqJIvZ+Qi6xAKZsYy2jPmUiRA8ht/fK1tnulYqcQt X-Received: by 2002:a17:902:34a:: with SMTP id 68-v6mr3522265pld.184.1540992091112; Wed, 31 Oct 2018 06:21:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540992091; cv=none; d=google.com; s=arc-20160816; b=qu5xGLIVPqGqhlXVobZXYHkI4sscnVgRDGF01MAngeSAYkL4rCFmUGUBdaPu1wwCbR T5CGRs1cyCfjfivMaoVSMA+zowMGY4VmqtNDD91Zp/RAZulIjgrIg5iOltLYR64qjaej mPdZ53z8myLmS3NLpOb0z1kr3EnSrOedfgZAF978zCbVP0xyDOkvEdsmc+FCUoJ7Fie0 tzx0lhQ8vC1iyDMKt6U5q/Jl+uBxAb1abFCKJ2SDg2IzRGd4aUCcjFNhVfJEqSbmCP8S OGandWH9Lyb9lG5pi3yxWEY53nr/tSRkDelajYbBgtaQxF4Cf/XL0ya1WwxPZQXmCT+V C13g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=SVuEARJAjt0DbviWjftv8WAeIGF+7VmCDWpwMnz9hGI=; b=GEFByS/KL8emxi51ZaoZphtX6FHCI14OQNB5qeDSAAbfbQY5iJ9L+BLXa0gIf8wZNg JCtP/aDnyvBr5W1Aimoi5yId2T0DuoBq1OYexTTL6m2TSqvsbIS+n8YT37D3wOsp6wT9 NHEVYxR2ZAQ7znuGkvf1NZND/MlHF0iVkX19GqNH5kDVBfiRRRXyLzToH8P0rQPuPpPk 3UEX9ejptu1va0qYIS3uDZ/Q0yTCqmvTrTbJKHRCWZAUX4G6iqmAGJUb7YZferWHxCNo 411CB4RW18sYWYUHHieuqEcP8ESgpfufQ4zhjC0ObDk8B6WQ5cJJZ/kjHw6m75sB1CmP sM3w== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h32-v6si27771165pgm.126.2018.10.31.06.21.15; Wed, 31 Oct 2018 06:21:31 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729333AbeJaWRL (ORCPT + 99 others); Wed, 31 Oct 2018 18:17:11 -0400 Received: from mx2.suse.de ([195.135.220.15]:53924 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728894AbeJaWRK (ORCPT ); Wed, 31 Oct 2018 18:17:10 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 97CF2AEB2; Wed, 31 Oct 2018 13:19:09 +0000 (UTC) Date: Wed, 31 Oct 2018 14:19:07 +0100 (CET) From: Jiri Kosina To: Mark Rutland cc: Torsten Duwe , Will Deacon , Catalin Marinas , Julien Thierry , Steven Rostedt , Josh Poimboeuf , Ingo Molnar , Ard Biesheuvel , Arnd Bergmann , AKASHI Takahiro , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, kristina.martsenko@arm.com Subject: Re: [PATCH v4 1/3] arm64: implement ftrace with regs In-Reply-To: <20181031121002.hmag2mwvlpzwobvf@lakrids.cambridge.arm.com> Message-ID: References: <20181026142008.D922868C94@newverein.lst.de> <20181026142148.6353A68C94@newverein.lst.de> <20181031121002.hmag2mwvlpzwobvf@lakrids.cambridge.arm.com> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 31 Oct 2018, Mark Rutland wrote: > I guess skipping the original function prologue would simplify the > implementation of the replacement function (and would mean that the regs > held the function arguments per the procedure call standard), but AFAICT > other architectures aren't relying on that, so it doesn't seem to be a > strict requirement. > > What am I missing? > > How does livepatching handle the pre-mcount function preambles on > architectures with existing support? Other architectures do rely on that. That's exactly for example why on x86 we use '-pg -mfentry', to make sure we hook the function *before* prologue. Thanks, -- Jiri Kosina SUSE Labs