From patchwork Thu Jul 2 21:26:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 11640445 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DD3D913B6 for ; Thu, 2 Jul 2020 21:28:12 +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 B72F42145D for ; Thu, 2 Jul 2020 21:28:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="1G4Zj+Gg"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="OfIChZy5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B72F42145D 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+patchwork-linux-arm=patchwork.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:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=oQt0j8ZWSXrF6llyyZOqacT3aDjVHIk/OSyi2l8/5Ek=; b=1G4Zj+Gg16C6mFrsMm3F4Jcn5M fU+PMM3BAVUIa6Bu+xqTKmtDjhoRdyGN0J9wBX5aU67xOtay8b9xtGpgyxjz/Ib6vs1vyqHsiT8EA c4aRGd4og4Otmlm7gp5U+RNx1DHygyiUsvXPnrEyjOvU2jjEXG6vRjzIBa5kgYgqKlYGMIZNSoJE+ 4FYM1ia23LaGVCm4MnOfoUps2qwyMNe/JqSgI3Cp6Mb2wfGOIhvcuZyA68HKPsPyCCQTKu+5FmRAs Vb29XVaLHoBz2CSSRddgijQepuEnxjy/WZ2kqNlv2I9i4PRYeOSm5/fCvxwNpXxGkSbSOMz1RV6ok 4m3lFsgQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jr6j0-0004eO-Bk; Thu, 02 Jul 2020 21:26:30 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jr6iy-0004dj-04 for linux-arm-kernel@lists.infradead.org; Thu, 02 Jul 2020 21:26:28 +0000 Received: from localhost.localdomain (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8990F208E4; Thu, 2 Jul 2020 21:26:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593725186; bh=poYDzIfWtcV3LNuZdk+ZQf24PxcIwvuaPLbWZD8L/Ns=; h=From:To:Cc:Subject:Date:From; b=OfIChZy5sbdDuIa0q0lU2ue8zfOOapJihnRCcYA+HwHDmFhccuJAAcPjjDYjVPYfr G8Smc/0eGXqPUmruaEVtDHmSUNoNKPoI9ZEYpZYaicyR6KamIclnBk+ELH1ea76hFB 3zl44bE3z9du2IWpv5eTB0Mc5rh+/GFxJHaBFlAo= From: Will Deacon To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 0/4] arm64: Fix single-step handling Date: Thu, 2 Jul 2020 22:26:14 +0100 Message-Id: <20200702212618.17800-1-will@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200702_172628_135102_75494DC0 X-CRM114-Status: GOOD ( 11.98 ) X-Spam-Score: -5.2 (-----) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-5.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [198.145.29.99 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender 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: Mark Rutland , kernel-team@android.com, Luis Machado , Will Deacon , Keno Fischer Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Hi all, This is version two of the patches I previously posted here: v1: https://lore.kernel.org/linux-arm-kernel/20200603151033.11512-1-will@kernel.org/ Thanks to Keno for a bunch of helpful feedback on that, which has led to the following major changes for v2: - Use pseudo-step traps for both entering a signal handler and exiting a system call. - Document our weird x7 behaviour with PTRACE_SYSCALL. It has to be said that I'm a bit nervous about these changes. I played around with GDB and things seemed ok, but I would really appreciate it if Luis could run the GDB testsuite with these changes applied. Cheers, Will Cc: Cc: Mark Rutland Cc: Luis Machado Cc: Keno Fischer --->8 Will Deacon (4): arm64: ptrace: Add a comment describing our syscall entry/exit trap ABI arm64: ptrace: Consistently use pseudo-singlestep exceptions arm64: Override SPSR.SS when single-stepping is enabled arm64: Use test_tsk_thread_flag() for checking TIF_SINGLESTEP arch/arm64/include/asm/debug-monitors.h | 2 ++ arch/arm64/include/asm/thread_info.h | 1 + arch/arm64/kernel/debug-monitors.c | 24 +++++++++---- arch/arm64/kernel/ptrace.c | 45 +++++++++++++++++++------ arch/arm64/kernel/signal.c | 11 ++---- arch/arm64/kernel/syscall.c | 2 +- 6 files changed, 59 insertions(+), 26 deletions(-)