From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 16786C3A589 for ; Wed, 21 Aug 2019 01:52:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D7BAC2332A for ; Wed, 21 Aug 2019 01:52:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566352375; bh=Fk4BuAJQ/UfY9FS0/yq7nmtZd1hFBjcyaLZT6Qsj3rQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=kyL64bHvrg+07g5hrwFKGKTLmEytaWqaG0+RpLj+Z8Jnd81hSp5nAdAQIce6HrD4O yVh1R9tl6eNV+eDR9wLtrx+VL+VWoInKOXCyQ7fKhCwQ64M3Zcran7kFYbaeD1bgVm Y4xS3MTL7AhpO7+9VfeCkEwm8k/PFPRaj8OLaRpE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727086AbfHUBwz (ORCPT ); Tue, 20 Aug 2019 21:52:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:46022 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726608AbfHUBwz (ORCPT ); Tue, 20 Aug 2019 21:52:55 -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 BFADC22DD3; Wed, 21 Aug 2019 01:52:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566352374; bh=Fk4BuAJQ/UfY9FS0/yq7nmtZd1hFBjcyaLZT6Qsj3rQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=k4TG6qwivdIYF+iiueoI0OgTmUJAFVF88b4Py7H64RPYZqf4RhvPKeCawLZ2wpM1r mMb3j5D0cEZm0+cLYXJ8ZcxeoV2G6H3MiJ5foTHnoGmWyIRNDTdujFYW/2KQsb9v0+ O5CPI4WDm44Zd1wOt/HIKUhDpSEy/rbt0NfRv/cs= Date: Wed, 21 Aug 2019 10:52:47 +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" , 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: <20190821105247.f0236d2c04b2c0c4d4e1847e@kernel.org> In-Reply-To: <20190820165152.20275268@xhacker.debian> References: <20190820113928.1971900c@xhacker.debian> <20190820114109.4624d56b@xhacker.debian> <20190820165152.20275268@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 Tue, 20 Aug 2019 09:02:59 +0000 Jisheng Zhang wrote: > Hi Thomas, > > On Tue, 20 Aug 2019 10:53:58 +0200 (CEST) Thomas Gleixner wrote: > > > > > > > On Tue, 20 Aug 2019, Jisheng Zhang wrote: > > > > > This is to make the x86 kprobe_ftrace_handler() more common so that > > > the code could be reused in future. > > > > While I agree with the change in general, I can't find anything which > > reuses that code. So the change log is pretty useless and I have no idea > > how this is related to the rest of the series. > > In v1, this code is moved from x86 to common kprobes.c [1] > But I agree with Masami, consolidation could be done when arm64 kprobes > on ftrace is stable. We'll revisit to consolidate the code after we got 3rd or 4th clones. > > 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. > > > W/ above, any suggestion about the suitable change log? I think you just need to keep the first half of the description. Since this patch itself is not related to the series, could you update the description and resend it as a single cleanup patch out of the series? Thank you! > > Thanks > > [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2019-August/674417.html -- Masami Hiramatsu From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2A56C3A589 for ; Wed, 21 Aug 2019 01:53:00 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B50C72332A for ; Wed, 21 Aug 2019 01:52:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="B8aHHKqX"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="k4TG6qwi" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B50C72332A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Mime-Version:References:In-Reply-To: Message-Id:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mgR7AUhMtADhXtIEIyzIULg667FfA8HnmhprQnNDVNo=; b=B8aHHKqXAaQvA6 LnVnxy7GCoKmhq848WA5kGxiFKptweh5K6eWq0ZfctMDaOasdrSuhA8hbjbcM0wGt9psnkIL3AOFk LkvpNRairS+zWkk94HClN6Uc/Ak/JKVtUIjKXRAXYwu+stBmC5e4C0CZhexg8Ib7WeQ+1OaByJWRd 90S7mGX+sAZ0p1j/a0tOGWQbcBVR0dAyIAaO/yHc5Os3e2oYuJIdiMhLOFFzhVoHnBY06Kkd1yn8O MU95hPqcDrMNDOZWx+UB97MuNKcudQcAfFdWjcBb22VCMmycLMZe14Qc/5r3pEMPtGH/F2FHgL08Y EOs6n+ng4rnoizKptMJw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i0Fo3-0005lf-3O; Wed, 21 Aug 2019 01:52:59 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i0Fo0-0005kh-Aa for linux-arm-kernel@lists.infradead.org; Wed, 21 Aug 2019 01:52:57 +0000 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 BFADC22DD3; Wed, 21 Aug 2019 01:52:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566352374; bh=Fk4BuAJQ/UfY9FS0/yq7nmtZd1hFBjcyaLZT6Qsj3rQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=k4TG6qwivdIYF+iiueoI0OgTmUJAFVF88b4Py7H64RPYZqf4RhvPKeCawLZ2wpM1r mMb3j5D0cEZm0+cLYXJ8ZcxeoV2G6H3MiJ5foTHnoGmWyIRNDTdujFYW/2KQsb9v0+ O5CPI4WDm44Zd1wOt/HIKUhDpSEy/rbt0NfRv/cs= Date: Wed, 21 Aug 2019 10:52:47 +0900 From: Masami Hiramatsu To: Jisheng Zhang Subject: Re: [PATCH v2 1/3] kprobes/x86: use instruction_pointer and instruction_pointer_set Message-Id: <20190821105247.f0236d2c04b2c0c4d4e1847e@kernel.org> In-Reply-To: <20190820165152.20275268@xhacker.debian> References: <20190820113928.1971900c@xhacker.debian> <20190820114109.4624d56b@xhacker.debian> <20190820165152.20275268@xhacker.debian> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190820_185256_390888_7F737599 X-CRM114-Status: GOOD ( 19.43 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jonathan Corbet , Catalin Marinas , "x86@kernel.org" , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Anil S Keshavamurthy , Ingo Molnar , Borislav Petkov , Masami Hiramatsu , "H. Peter Anvin" , "Naveen N. Rao" , Thomas Gleixner , Will Deacon , "David S. Miller" , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Jisheng, On Tue, 20 Aug 2019 09:02:59 +0000 Jisheng Zhang wrote: > Hi Thomas, > > On Tue, 20 Aug 2019 10:53:58 +0200 (CEST) Thomas Gleixner wrote: > > > > > > > On Tue, 20 Aug 2019, Jisheng Zhang wrote: > > > > > This is to make the x86 kprobe_ftrace_handler() more common so that > > > the code could be reused in future. > > > > While I agree with the change in general, I can't find anything which > > reuses that code. So the change log is pretty useless and I have no idea > > how this is related to the rest of the series. > > In v1, this code is moved from x86 to common kprobes.c [1] > But I agree with Masami, consolidation could be done when arm64 kprobes > on ftrace is stable. We'll revisit to consolidate the code after we got 3rd or 4th clones. > > 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. > > > W/ above, any suggestion about the suitable change log? I think you just need to keep the first half of the description. Since this patch itself is not related to the series, could you update the description and resend it as a single cleanup patch out of the series? Thank you! > > Thanks > > [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2019-August/674417.html -- Masami Hiramatsu _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel