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=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,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 2CC75C4363A for ; Wed, 28 Oct 2020 09:49:22 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 89E5A246A2 for ; Wed, 28 Oct 2020 09:49:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="OhonRQUO"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="VGxT9M8a" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 89E5A246A2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: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=9CXlg71ygrr6XtJ3PSfan+GbYZfxWY8zJqpBLUD8+48=; b=OhonRQUOvSdrfzYG94jxo2Dqe 38BU5579eYUqvX6YSWQwpjoL8SprcDAiW+um+F12ajH/ULeSPjyDYYtYifELB2p6YBtQs47tLdUqH PaktDJxFMV8ZX0OT7jWQeBVw+y6DPrey8NdhpQiKecyZ4o3Eqmp1GB6uWYWKtSGWnG7RSkSA+XtIj IE3GO9ytpUt+MV7eFKjnjSXT9CRybWkWiiZa9yZyuwlMSra6et3WzGMIz2o3xQpIgTCvqGOK/p66L 34iP+ZBtvqWuP9MALEnwyQ8OW4d7bquWygHa+eM0HjJfNLtES69TigWzU8HYrB8HjJfzOHkdDpPiO 6LGFsumMg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXi4Z-00061w-2m; Wed, 28 Oct 2020 09:48:51 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXi4W-000619-ON for linux-arm-kernel@lists.infradead.org; Wed, 28 Oct 2020 09:48:49 +0000 Received: by mail-wm1-x341.google.com with SMTP id 13so3922541wmf.0 for ; Wed, 28 Oct 2020 02:48:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=sPcNqO2RVBjvVXokya3koccxJUvSeTMR1LlmiHIaGZs=; b=VGxT9M8aP6R+a0WLI664pfrudHyFERGJuKIDS3wntCu/2Kk7ewxQSK0OT7aq2hGm5C oKJwx6vzKGaTnQaNDNY6chDoy/wnHmnHjdbkSJmIiDmAqFNEzVbyNTqI2ah3ZSKzpiXL 03PrHui+RdP5pxImQydqUmxLd5dl2X1WKQxw/gVY+ahJZn8O/4haPlCWBo/KHFI6oWx4 LyBAMy+CttbujIHJeCvgbXjt+LNehUAUY4HqSRvcn7CDGnCU7jgz/O2ElaPzwQNX0Nmi V9Fw2VDOE/eCo6c3MXne7IBVJWOMxSjNPkp4Myy1cIbPRZnogKm3N4VpnAH86ACqliwm EOkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=sPcNqO2RVBjvVXokya3koccxJUvSeTMR1LlmiHIaGZs=; b=KFljMj+Geatdr0zF9Hpd+fOjbhMfgajxHPM/2/+9uS/7K7HFd8ovaQK9c7zcQ5JuS+ gkxHcQFFYliqcwWAFfoSRVnsb9nQgNulUBwsxcgasel2i6RPafutfI1TcRnM6a6kekvE KxPHZqvp/QFiH5vtEmUpLBmslVQ5PeWvP+ODFIJeLDAu7qOTPi6iGOUB/d+QLlnkfHL3 ofisschJFVNyB6r1HzON1Rr5tWrPFftlHFm/3h7zv7mGxUhMI99UA/T9R2sGI95X0gJP /oaONjprVdDOWRksRC9kwN4q0ls7bAdHDPWvX/bF+IBYdnbtVSRpg3QmEVF6YtSF+S6x RL9Q== X-Gm-Message-State: AOAM533v1nACdvy8MA266diLf7qP5gCdcVIkVev0nlRSGQVP3D6qZXJ3 SgyVHiRvk+o1SglCiR64bQkkzg== X-Google-Smtp-Source: ABdhPJwAdDz8HC9HJ/ZZ9JZOvAlx2ah5+0xeFyJ0QIvkZBU+7VcZNbNGdkx5f5awN16/584fq/FJUA== X-Received: by 2002:a7b:c341:: with SMTP id l1mr7389398wmj.80.1603878527674; Wed, 28 Oct 2020 02:48:47 -0700 (PDT) Received: from myrica ([2001:1715:4e26:a7e0:116c:c27a:3e7f:5eaf]) by smtp.gmail.com with ESMTPSA id e25sm4617178wrc.76.2020.10.28.02.48.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 02:48:47 -0700 (PDT) Date: Wed, 28 Oct 2020 10:48:27 +0100 From: Jean-Philippe Brucker To: Masami Hiramatsu Subject: Re: [PATCH] arm64: Fix early single-stepping Message-ID: <20201028094827.GC2328726@myrica> References: <20201026172907.1468294-1-jean-philippe@linaro.org> <20201027191318.aba935f7ccf00af9acd89388@kernel.org> <20201027194258.43b157ac0bbccd918fc8756a@kernel.org> <20201027115909.GB1514990@myrica> <20201027123317.GA26351@willie-the-truck> <20201027224922.7b032857d53bbfdc4484f768@kernel.org> <20201028082820.GA2328726@myrica> <20201028083643.GA27678@willie-the-truck> <20201028180731.13d770167b521dc28c189bbb@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201028180731.13d770167b521dc28c189bbb@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201028_054848_836278_9727EE7A X-CRM114-Status: GOOD ( 17.53 ) 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: catalin.marinas@arm.com, Will Deacon , dianders@chromium.org, 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+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Oct 28, 2020 at 06:07:31PM +0900, Masami Hiramatsu wrote: > > > Yes, I think so. Same order problem as the OS lock, they need to be reset > > > before enable_debug_monitors(). On CPU0 that would be before > > > early_initcall and for secondaries the hotplug notifier needs to be > > > installed earlier as well. I'll send a v2. > > > > Cheers. An alternative (which I think would be better in the long run > > anyway) would be to avoid using hardware step in kprobes and instead rely > > on a BRK instruction to trap after running the trampoline. > > But how we trap the instruction which can change pc? (like br?) > Are all those instruction emulated now? According to aarch64_insn_is_steppable() anything that changes the PC is emulated. I'm also checking whether there is a change of behavior with synchronous exceptions taken while single-stepping (page faults). Thanks, Jean _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel