Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1263243ybl; Fri, 23 Aug 2019 16:28:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqzb4FAKnmkogM2eyYbXPzeagqofv4TVTBKFP9/qqAaKutfZy+TKUmtWcE0SPYfM3lZFOYxF X-Received: by 2002:a17:90a:26ac:: with SMTP id m41mr7783374pje.59.1566602905411; Fri, 23 Aug 2019 16:28:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566602905; cv=none; d=google.com; s=arc-20160816; b=Uq/wkIPGa9fmL4ZMLk9nPvEq4kEYFW9ik2LxwhmGTSijBMyLgD6QJbBWjQIPhSF8Jk xRw7K1LElnXc76P3bMWAjUBLzhMcc53BODDkSiqJENoORrAw4wWhcaCHltnj8Y9E9H9W 44Xrew2oqXf3e9nhvvusdIXpa73i2qpsp9wR/E/HglBsWldl9sqPF7HXa/6+ZLtggwd6 a7uhIXvKTaTr7URbCdx0HXlGshoQgS8YYPLpiVyHCma5ZmQR7/XSJqQk9AYsDNQO+tqd plRd4AzWITvw6Id8yvyPcUyEaXdQ+OH5xwl4ec4G9lT7ybGE/U6sldrHDoEsnoBOn3nV f0GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=Q9RC8U1gulGFHt8SdjV6+402uv9YKW6hHGXyKgZBMUQ=; b=0W9XvPTVhzMGd8PCJ4DNnlqfiq8o0vLIoahEOSnrjLYbLLyLhjkCr4eKh3vZwREaYf a87dEzQJ57KmLjfe2suLmT7egkXyQOoxAlWfrwfu31z2LyYN2ikhribKvFvIRAoaAYht lCHuAwyhPKu6f6bQeSdNu5QWM3VRZzOjEU/DkvSelCEgRM1udjKNvKheWEyBaWpkQjsy J/44/H4PWHVgVRPI2mxcpZ6KTdYo2NLGuQO91VaiwzKYSJj81MAycMHP6NwPKgzzZo3a MnwkokrQM77Et+LgSO48IjKh3aHROlf+XW6Rxg+7BObRKy3cLxKIcgeIjjKkeIbhpRa7 bcmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lOhadIdB; 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=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 w26si3833581pfn.94.2019.08.23.16.28.10; Fri, 23 Aug 2019 16:28:25 -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=pass header.i=@kernel.org header.s=default header.b=lOhadIdB; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393775AbfHWOvf (ORCPT + 99 others); Fri, 23 Aug 2019 10:51:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:34322 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388352AbfHWOvf (ORCPT ); Fri, 23 Aug 2019 10:51:35 -0400 Received: from devnote2 (NE2965lan1.rev.em-net.ne.jp [210.141.244.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 97BFE2166E; Fri, 23 Aug 2019 14:51:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566571894; bh=aVchjuHWTXOaTDZuWT4rE8xKpWB6QsFxLg6BDqrPMBU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=lOhadIdBCMKhZZkWRsZKTsc0dnSKABUI8r7IDxP9auoTwL6cq9VHHquL4sgCddJ6+ i1Jq9+dVh+hxyozPx0IO9InPMe2+rO8hPvYEdx76EdJfBrs/UVH85CpxjJtTRN9YbF 4CjkRdbiWquBWBZNXw5KcjOc4pDLb86Dt8FmvwSE= Date: Fri, 23 Aug 2019 23:51:27 +0900 From: Masami Hiramatsu 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" , "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: <20190823235127.6b1ab6bdb3a280b64ca8585e@kernel.org> In-Reply-To: <20190821095527.729b2b0d@xhacker.debian> References: <20190820113928.1971900c@xhacker.debian> <20190820114109.4624d56b@xhacker.debian> <20190820165152.20275268@xhacker.debian> <20190821105247.f0236d2c04b2c0c4d4e1847e@kernel.org> <20190821095527.729b2b0d@xhacker.debian> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jisheng, On Wed, 21 Aug 2019 02:09:10 +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 */ > > > > As Peter pointed, on arm64, is that really 1 or 4 bytes? > > This part is heavily depends on the processor software-breakpoint > > implementation. > > Per my understanding, the "+1" here means "+ one kprobe_opcode_t". No, that is the size of INT3. It just emulates the software trap on x86. Thank you, -- Masami Hiramatsu