Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp249326ybl; Tue, 20 Aug 2019 19:20:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqzfSt/dviFGfOpXUZJp5o95yhvoir8eYuElWb5xitpT5t86HQYrc6NzYYkv2bDd6ZIBLaix X-Received: by 2002:a62:8344:: with SMTP id h65mr33333168pfe.85.1566354031499; Tue, 20 Aug 2019 19:20:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566354031; cv=none; d=google.com; s=arc-20160816; b=K22xjP6EZN48pjrcCduRYBjmOb363wq0etJPjCy/dGWANYVds2e4tmbSMVckQfjt0m 2bOMLOJ+ikm+aZm+9M0yn/u85IduZM0gtglaH6Mp2sApIY7fAc2I+3UfeIwRFxDomYWS oEGA8eUzdbtxE07GzQJBOfH21NCEYI4FrgT2vOdSh0L137ZgHOtMgZ5NpyrNmY3eXmYl 4FUtZ+aijStJdmD37Zc3RYkLOpHiq89qL4TCH/Gyy3WFN0wjVarQPNJPYEFdKtFtaCZZ wrk4TkFR2QDMkQhNqXkiN5n+UCelwwbMkz06yidgI8iBEgxkSUV4+hBmaykJNYJVHF8D K9pQ== 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=M03rR/0UJtI7R27KbicRToZDjR57KS4icFlVhe5S4Mo=; b=FnOe9IkJoQnEyNUzGTgRI6XV+WbcdWW8dwx/QtlxPsadZxiKbKOMNEw32RmSKdvam0 Cep2DOxjosQvZwsJXhMx/69Vc4ahYeqLHm08Y3Qwh+hYdSXkbMtxq/HE9IgqsLbEhhGl srR7JDKXUZEV3IqGhy49uw/q7w8iET5FIkKHWvrr01PFl4Wc4vfsL1ulB7vHXA5M7C36 hLUFfyUovJJsgwQHVB0QFjC+p1Hfm+0PR6b94847KdflqSrvYzqcH0+hCVL5s/MwOHPR gen9k01e6oLOwQTm1tVU3G+v+n23Qxesv9bRxaZ9cpaqGLzhRYn8u/d/j7lS/J4ZiJQS zDqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=k4TG6qwi; 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 z9si13419621pgk.46.2019.08.20.19.20.16; Tue, 20 Aug 2019 19:20: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; dkim=pass header.i=@kernel.org header.s=default header.b=k4TG6qwi; 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 S1727080AbfHUBwz (ORCPT + 99 others); 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