Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2670714ybl; Mon, 19 Aug 2019 05:54:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqxRRSlTlc1nije2mn2gtqxBgas4T98ys9b2/APS3fH5UCgtyEjGF2BcLzGImkUvBFdD2uZR X-Received: by 2002:a17:902:2ae8:: with SMTP id j95mr20611837plb.276.1566219271633; Mon, 19 Aug 2019 05:54:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566219271; cv=none; d=google.com; s=arc-20160816; b=xVYrkqP7oFUBDUVablCz7KYnqndZG2mZgX8vXR8+zJrhPSIM14jfXh+KyKvVBov0l6 UdOLOb1MhKu6TGIMJA63Ecc5mqMPD+Ww0c83r0DqabAwQVrGMqZlKPfLq0+7LqekemO2 Vo55BhuUEoSDQslNq3o6z+jOBTJydgWRfQmYMmuRbYU2QlQ/8qtTHVtvWSGf1rkzQ7jZ 111I1hY97YGmDsWeCmnX1RBGbe3jjMxnnuPWe3aRaT860ftAPpAJKqII6912RfVG2hXS aANi8FG9+xdryb7X0k0sJ0B11Z8lw8lGScs3uZvQGSxUSyVRClgBcsMIOP5H3xcOiDM2 rSvg== 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; bh=QrTPYVKugJwA/6w+Yxkl15LuSWp+3d2Dhltpg+N+G50=; b=BYHTsPawJGZxYAjLtRVVr1820zvvVoLa5TTbAw86s7lvBnLVqVvvFtNizwQD4dNoFu Y78iJda/3+7ym87B+rB3eDPUApOSYp+mzmBzkMlQmF4YQ/zKnLa0sNbv5UxdlKgyTZSN ceMHrUomg99+mHqqBCeen/4zuiEzvlfHMlUCGAexP1ko15SC6tiwshTRWz+jw2SEsuKz vUwPvn4AEaS1heYT37FssXUAaq9X+S1pZm8/pNUOYuDIATKGvgvfS/yWKyzQ+YECvvqf ntbU+zwZUsBIWUg48n9Qtljir6YkLdnNDyDfgcwbSZFlPj9ob9Or30U8MKb6Ioqqgvn0 WmoA== 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 w9si9784921plz.346.2019.08.19.05.54.16; Mon, 19 Aug 2019 05:54: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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727412AbfHSMx3 (ORCPT + 99 others); Mon, 19 Aug 2019 08:53:29 -0400 Received: from foss.arm.com ([217.140.110.172]:53728 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726987AbfHSMx3 (ORCPT ); Mon, 19 Aug 2019 08:53:29 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 60A9A28; Mon, 19 Aug 2019 05:53:28 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 791583F246; Mon, 19 Aug 2019 05:53:26 -0700 (PDT) Date: Mon, 19 Aug 2019 13:53:21 +0100 From: Mark Rutland To: Jisheng Zhang Cc: Catalin Marinas , Will Deacon , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Masami Hiramatsu , "David S. Miller" , Anil S Keshavamurthy , "Naveen N. Rao" , Steven Rostedt , "x86@kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 0/4] arm64: KPROBES_ON_FTRACE Message-ID: <20190819125321.GA9927@lakrids.cambridge.arm.com> References: <20190819192422.5ed79702@xhacker.debian> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190819192422.5ed79702@xhacker.debian> User-Agent: Mutt/1.11.1+11 (2f07cb52) (2018-12-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Mon, Aug 19, 2019 at 11:35:27AM +0000, Jisheng Zhang wrote: > Implement KPROBES_ON_FTRACE for arm64. It would be very helpful if the cover letter could explain what KPROBES_ON_FTRACE is, and why it is wanted. It's not clear to me whether this is enabling new functionality for kprobes via ftrace, or whether this is an optimization for kprobes using ftrace under the hood. Thanks, Mark. > > Applied after FTRACE_WITH_REGS: > http://lists.infradead.org/pipermail/linux-arm-kernel/2019-August/674404.html > > Jisheng Zhang (4): > kprobes: adjust kprobe addr for KPROBES_ON_FTRACE > kprobes/x86: use instruction_pointer and instruction_pointer_set > kprobes: move kprobe_ftrace_handler() from x86 and make it weak > arm64: implement KPROBES_ON_FTRACE > > arch/arm64/Kconfig | 1 + > arch/arm64/kernel/probes/Makefile | 1 + > arch/arm64/kernel/probes/ftrace.c | 16 +++++++++++ > arch/x86/kernel/kprobes/ftrace.c | 43 ---------------------------- > kernel/kprobes.c | 47 +++++++++++++++++++++++++++++++ > 5 files changed, 65 insertions(+), 43 deletions(-) > create mode 100644 arch/arm64/kernel/probes/ftrace.c > > -- > 2.23.0.rc1 >