Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1621804ybz; Sun, 26 Apr 2020 00:26:46 -0700 (PDT) X-Google-Smtp-Source: APiQypJXT3L2UCd7C/F1+mZSFD52GUwc5YQFhLqSOwhm9gLy3rQAKOILlntOHgw+y1wYNCVsFUtm X-Received: by 2002:a50:a883:: with SMTP id k3mr14171461edc.198.1587886006601; Sun, 26 Apr 2020 00:26:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587886006; cv=none; d=google.com; s=arc-20160816; b=xoOt+nlyUj761idK1VAq7gU+409/M2nqLGyEpGVNSStuKS9OpUYhXB0MV/u33PEJUa pz/8+m6FLeUl1WDsYZqXPbnrkokblJNcKtHxxxk5g3HqgbZDqUxa8p79X13+I3YwPzip LSlKa0JXd/lEYKF4pdTHggiY2fpothVXuqvXOxqPV34JELaGbK51vk6vQXSDcp6lXPIQ UHU0YGeakaak2ilLmNWu1dy2pBR1ButpG/AibZXRjT1/TYdwQf1LaC5GLRk30mXGDBHo IQBKetN0zkJEOUZYxWjxCZA4liPsDWYZNeddl0WmOwXLthlWVd4U3KYsQ4xqGpPiFPTT qtYA== 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 :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=KzeFYn4kpYE2nNWST6JyPWLeUptIESteKHaUm9LhWtM=; b=KCi+UGv1JFJdbSVGwkqyO56jB6coYvWqTgdLsdRAHPnQrgUIVai0vU8Ez99TmSvi9J sasLN9YCT+I1UuldKAU9p3FfQ78Kh6GeEHtEqKmwpPurdEPbuNVtIjnYiJYSWX2aaIy/ H6cHNw2+eGU3WEesAR8AreS77HWqCEeCwWnrwEhw/9Upoa35NaznMP1Xi22lS+iXCn5+ VUV2J1X8MQCcyAnJDRyy4A/6C7PZBA8C1xTKgQOdG6u6u5daWBEzucdyZD3sqo4BkoAl BfkQkND5jCGqBGfqFI23hF7bAAqS+a2YhR8EFyeQ5h49kgz+Fb/1OZzy+HJS8ogEs+NT tjIw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z9si6108809edi.150.2020.04.26.00.26.23; Sun, 26 Apr 2020 00:26:46 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726435AbgDZGsE (ORCPT + 99 others); Sun, 26 Apr 2020 02:48:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726194AbgDZGsC (ORCPT ); Sun, 26 Apr 2020 02:48:02 -0400 Received: from Galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E99BBC061A0C; Sat, 25 Apr 2020 23:48:01 -0700 (PDT) Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jSb4n-0008R0-7t; Sun, 26 Apr 2020 08:47:41 +0200 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id D9FF11C0178; Sun, 26 Apr 2020 08:47:40 +0200 (CEST) Date: Sun, 26 Apr 2020 06:47:40 -0000 From: "tip-bot2 for Miroslav Benes" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/urgent] x86/unwind/orc: Don't skip the first frame for inactive tasks Cc: Miroslav Benes , Josh Poimboeuf , Ingo Molnar , Andy Lutomirski , Dave Jones , Jann Horn , Peter Zijlstra , Thomas Gleixner , Vince Weaver , x86 , LKML In-Reply-To: <7f08db872ab59e807016910acdbe82f744de7065.1587808742.git.jpoimboe@redhat.com> References: <7f08db872ab59e807016910acdbe82f744de7065.1587808742.git.jpoimboe@redhat.com> MIME-Version: 1.0 Message-ID: <158788366047.28353.10640952841762796164.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/urgent branch of tip: Commit-ID: f1d9a2abff66aa8156fbc1493abed468db63ea48 Gitweb: https://git.kernel.org/tip/f1d9a2abff66aa8156fbc1493abed468db63ea48 Author: Miroslav Benes AuthorDate: Sat, 25 Apr 2020 05:03:07 -05:00 Committer: Ingo Molnar CommitterDate: Sat, 25 Apr 2020 12:22:29 +02:00 x86/unwind/orc: Don't skip the first frame for inactive tasks When unwinding an inactive task, the ORC unwinder skips the first frame by default. If both the 'regs' and 'first_frame' parameters of unwind_start() are NULL, 'state->sp' and 'first_frame' are later initialized to the same value for an inactive task. Given there is a "less than or equal to" comparison used at the end of __unwind_start() for skipping stack frames, the first frame is skipped. Drop the equal part of the comparison and make the behavior equivalent to the frame pointer unwinder. Fixes: ee9f8fce9964 ("x86/unwind: Add the ORC unwinder") Reviewed-by: Miroslav Benes Signed-off-by: Miroslav Benes Signed-off-by: Josh Poimboeuf Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Dave Jones Cc: Jann Horn Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Vince Weaver Link: https://lore.kernel.org/r/7f08db872ab59e807016910acdbe82f744de7065.1587808742.git.jpoimboe@redhat.com --- arch/x86/kernel/unwind_orc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/unwind_orc.c b/arch/x86/kernel/unwind_orc.c index 45166fd..e9f5a20 100644 --- a/arch/x86/kernel/unwind_orc.c +++ b/arch/x86/kernel/unwind_orc.c @@ -657,7 +657,7 @@ void __unwind_start(struct unwind_state *state, struct task_struct *task, /* Otherwise, skip ahead to the user-specified starting frame: */ while (!unwind_done(state) && (!on_stack(&state->stack_info, first_frame, sizeof(long)) || - state->sp <= (unsigned long)first_frame)) + state->sp < (unsigned long)first_frame)) unwind_next_frame(state); return;