Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp4053496ybl; Tue, 20 Aug 2019 06:23:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqxXymeUrtF14UMdZjm0BDxdP7Lw4DCLpgbe5P54Ss07lt0/eJFCQ6zkDRqdVQZVLBsJ++TR X-Received: by 2002:a17:90a:35a7:: with SMTP id r36mr26509456pjb.17.1566307380154; Tue, 20 Aug 2019 06:23:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566307380; cv=none; d=google.com; s=arc-20160816; b=XxV0iNRwcptLoE3A9TC87uy89M3DbQl+i+bQY2Z+3vVp+ji+Tb7TJp6qZcJoVoXkdr fAEpdFAnMDnDg2w0W0incQ/MUNZ7UTpE+DN2istlTn88un7UcHz4BEJ62GEXZowwrAmW Dy3faJ0s5Pnirtq8JjV1X8woLnu18VseDeyduHwdZJHjgmX2GyjQhYxg4kHQUbxWND0i NBUBTKkGOEsk+Zid15cGYjI79fcY5qQ9pmir8yykm1S6RPxu1EyKSxYw5EuskN2HkgcP TIkPBDo+zO7+EZTyemVFedIA1KGSUW2qNn+9pXLlhij4HvVCMW8F9A7RGwIXN9adaLaf rpsA== 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=jTJbNtWSYKy75ac9nrDMS4DD8w6zR87+w5MdrKdbeMw=; b=oyJUA5RJFBZbaMlN+bjhPg4mRwxgyQHjCiRL5AsUV1ORl4YD7I0Hi8qSlPedptKw9Z fIDnoCavWjP9KhSeyWcJVttvr9h0wZ10roJmjg825njEwmbiIO9ipVcPv2IK2DooDrml 9ZuQIMozSv4bPJ9e1KZkm1yKcrqoPaMTxVGtvlQ+87O9VSBtZQCzW7cv6TB5cp13tERb uycj1eVDb3er0x2x6VTsbt1fAg6lIsFyOUXl53ZjkNqcmOJ4dPCBfNVFhRLxcG/A7twn XwZTjEwhrNXOCniVaOrmTqtS9q4g3BmO76nGAo5UyideD7Nv72+I1om7Chbvl6AEEBNr tgqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Fvh58Q77; 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 b41si12285564pla.155.2019.08.20.06.22.44; Tue, 20 Aug 2019 06:23:00 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Fvh58Q77; 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 S1729945AbfHTNVa (ORCPT + 99 others); Tue, 20 Aug 2019 09:21:30 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:46748 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728248AbfHTNV3 (ORCPT ); Tue, 20 Aug 2019 09:21:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=jTJbNtWSYKy75ac9nrDMS4DD8w6zR87+w5MdrKdbeMw=; b=Fvh58Q77mLxjeT7XJUaQiRbN5 6oZAsZT6f8O4rm6zT1QFGryCbpB/D4cwG18gXEMCQuQXaIDx6O/Iu5HMLSYKwMDF0qD4NN6na0WRA 5YyWqnaUP4GTro8uLGiC2UlbyUCdgLRhz31RS+JKkSsM3UOeEkDPU+6gRROOrQ1zUIZHf3BDT09AN 6zY/D7B85pm/gf5DY9HR5w2wdq6xVofJNQ4ZvNp4hXFrQfpfJAS0uA/StQrI0oQtQzNGhgdnM9Znq RTA/xVbFLi1LJ80P8DaO3kECRm68p5w1kQpQZiAOPCpfSk85exV6/LiV0SMjp9Rb0FrEsI4GMET4A CRUK0A34w==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1i044X-00024h-5t; Tue, 20 Aug 2019 13:21:13 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id D62A43075FF; Tue, 20 Aug 2019 15:20:38 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 244AB20A99A00; Tue, 20 Aug 2019 15:21:10 +0200 (CEST) Date: Tue, 20 Aug 2019 15:21:10 +0200 From: Peter Zijlstra To: Jisheng Zhang Cc: Thomas Gleixner , Catalin Marinas , Jonathan Corbet , Will Deacon , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "x86@kernel.org" , "Naveen N. Rao" , Anil S Keshavamurthy , "David S. Miller" , Masami Hiramatsu , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH v2 1/3] kprobes/x86: use instruction_pointer and instruction_pointer_set Message-ID: <20190820132110.GP2332@hirez.programming.kicks-ass.net> References: <20190820113928.1971900c@xhacker.debian> <20190820114109.4624d56b@xhacker.debian> <20190820165152.20275268@xhacker.debian> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190820165152.20275268@xhacker.debian> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 20, 2019 at 09:02:59AM +0000, Jisheng Zhang wrote: > In v2, actually, the arm64 version's kprobe_ftrace_handler() is the same > as x86's, the only difference is comment, e.g > > /* Kprobe handler expects regs->ip = ip + 1 as breakpoint hit */ > > while in arm64 > > /* Kprobe handler expects regs->pc = ip + 1 as breakpoint hit */ What's weird; I thought ARM has fixed sized instructions and they are all 4 bytes? So how does a single byte offset make sense for ARM?