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=-20.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham 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 05AC1C433DB for ; Thu, 28 Jan 2021 12:51:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A224C64DE3 for ; Thu, 28 Jan 2021 12:51:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231684AbhA1MvE (ORCPT ); Thu, 28 Jan 2021 07:51:04 -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);