Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp958685pxb; Thu, 28 Jan 2021 04:54:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJwJhRqQw3pgRrjzofTz3cdRpffWfEk7K4NLmknaoklE3w7UGUrOjrM7TdQGGP82ZWWQPxf2 X-Received: by 2002:a17:906:653:: with SMTP id t19mr10979378ejb.44.1611838462964; Thu, 28 Jan 2021 04:54:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611838462; cv=none; d=google.com; s=arc-20160816; b=ZOAzGo9chaqruO/Yt4uOX92Db9Uwdw9jubULq9gTRQrKCHWf+zPoMxhSRAX3g5cpri caF32HI9nmG+99ZY96Kn/vsIeJLS9Jk84WrMk7IHJuvnESaFFVd5AnsZZH7IV9tqOe04 XJGHSJ15o8nXYawAJy8Vdet1SzZhYfyqWjEnffoLUPQbWyWMA16FRZYs7olQ4avnRjyV Z2NXi6uO4+x7/FRPjKz67ncrc9qCj+iNBcqT5B6VrjhyBUJ6gklReacsnlLyDSxv1XY6 BqUWjNk92LZrrTvdkP0SAcMfsMvsKEoFKhKClGCQfRaekpTwZOt5uU0GNbhQJo+0YUxk 1VLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=TUr7IFoF5kI6Mx+O9CiyNn3W+CBk8v5MGz/vV94KWNs=; b=LwuRzFfiB/jMLPYFnTThOWuQBowUoZUUKoZTjjg9F9AzQwhWT6MEBQ8Llyi0kEAOzS CB3SgVWTFJTss1ueNKGWiBG/Snwf6OnpIibOR0Z7aHdGIS9o1OFr9XR2KctNuaVjnW6q apM0czr33mP5qSlW3Z9TfZsTdhyswEhIStoYxK6VuUqOuVex8xGcPTM17Y+0XNVib1Ly Wzye4HliNGPzVOPgMp3eL0twd4qJh2N75k1lk4PE/rzQ+4lssoSlYWWFrfS/EcFio5Ne Bgslmfr7VVJeGbbJkTWCD3/YJ5kj4VTrCOWZI2EFcjE0x+yaz4MxTQ/Il6pBAARx76+X rgiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Iu0enkOU; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c3si2475093ejb.238.2021.01.28.04.53.57; Thu, 28 Jan 2021 04:54:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Iu0enkOU; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231637AbhA1Mu7 (ORCPT + 99 others); Thu, 28 Jan 2021 07:50:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229852AbhA1Muv (ORCPT ); Thu, 28 Jan 2021 07:50:51 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0F27C061573; Thu, 28 Jan 2021 04:50:00 -0800 (PST) Date: Thu, 28 Jan 2021 12:49:58 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1611838199; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TUr7IFoF5kI6Mx+O9CiyNn3W+CBk8v5MGz/vV94KWNs=; b=Iu0enkOUyXAIWNR3qX3OtX4VCXw4lZ2otCYR1leDR9R7LQz2NLZ5oxNpjEaf7lZh1o/l6k rd4YmYlasrfSE82+Lbr093h9XaaOlrfDkPWhUrVGSOO3KTq+UhN3vTqlTZcOJEufGh9+j9 w13qDlOcKWrc2Iy7K56RxQwJ8Dxfzcgvd5JsLovoN4vgRzDtDc1SI4GpqM4Nc0mz/uMURV LgX606mZR3bLPR3w+LJkOBBgPBZrKhcNxoq31mIsUeAHGQh1bvTi/QPCVn4i3Ic109Tbet tBr4IDUXzyMFXgpUhNm0ZK9XdKMNo3arIS29jDz9n4CFGaLUWDb0uH0mKXmCHg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1611838199; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TUr7IFoF5kI6Mx+O9CiyNn3W+CBk8v5MGz/vV94KWNs=; b=v+b0K5LroAh3Lewl/tzY3TCUTew1YtyEA9TJReg/Yug1M0yP0xnD35cddGxd6KfO+rK3Zd l9FodY29SXzt8vAQ== From: "tip-bot2 for Yuxuan Shui" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: core/urgent] entry: Unbreak single step reporting behaviour Cc: Yuxuan Shui , Thomas Gleixner , Gabriel Krisman Bertazi , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <877do3gaq9.fsf@m5Zedd9JOGzJrf0> References: <877do3gaq9.fsf@m5Zedd9JOGzJrf0> MIME-Version: 1.0 Message-ID: <161183819817.23325.234499020067024025.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the core/urgent branch of tip: Commit-ID: 41c1a06d1d1544bed9692ba72a5692454eee1945 Gitweb: https://git.kernel.org/tip/41c1a06d1d1544bed9692ba72a5692454eee1945 Author: Yuxuan Shui AuthorDate: Sat, 23 Jan 2021 03:21:32 -08:00 Committer: Thomas Gleixner CommitterDate: Thu, 28 Jan 2021 13:46:55 +01:00 entry: Unbreak single step reporting behaviour The move of TIF_SYSCALL_EMU to SYSCALL_WORK_SYSCALL_EMU broke single step reporting. The original code reported the single step when TIF_SINGLESTEP was set and TIF_SYSCALL_EMU was not set. The SYSCALL_WORK conversion got the logic wrong and now the reporting only happens when both bits are set. Restore the original behaviour. [ tglx: Massaged changelog and dropped the pointless double negation ] Fixes: 64eb35f701f0 ("ptrace: Migrate TIF_SYSCALL_EMU to use SYSCALL_WORK flag") Signed-off-by: Yuxuan Shui Signed-off-by: Thomas Gleixner Reviewed-by: Gabriel Krisman Bertazi Link: https://lore.kernel.org/r/877do3gaq9.fsf@m5Zedd9JOGzJrf0 --- kernel/entry/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/entry/common.c b/kernel/entry/common.c index 3783416..6dd82be 100644 --- a/kernel/entry/common.c +++ b/kernel/entry/common.c @@ -222,7 +222,7 @@ static inline bool report_single_step(unsigned long work) */ static inline bool report_single_step(unsigned long work) { - if (!(work & SYSCALL_WORK_SYSCALL_EMU)) + if (work & SYSCALL_WORK_SYSCALL_EMU) return false; return !!(current_thread_info()->flags & _TIF_SINGLESTEP);