Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1621818ybz; Sun, 26 Apr 2020 00:26:47 -0700 (PDT) X-Google-Smtp-Source: APiQypJZzoRBOp7p76j+xRv18SHZDO+78gmhR/06zyvsii4vp4j/NqlqTpa59ZvpNzO1O+Z8nXBL X-Received: by 2002:aa7:ce0f:: with SMTP id d15mr13473125edv.290.1587886007378; Sun, 26 Apr 2020 00:26:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587886007; cv=none; d=google.com; s=arc-20160816; b=V7J1CkyrHSRSVFtVhmStaTco/PjYTB/RCiWfn7VnXfrifJwXhM2ZBUrNa/B33RlzE9 7nb3bhz+3WK7k5x/+CttMkMGz0izEarx3S/2cdZ/dI64Zoyt971xJK9oJ/54xDOGI8fm y+4HoHquuxS+fuO7Rvpr5b1WoAd8oEaoGgpoJBshwvALo4aUjGA1UKBitAfVNk164dzY ztBEx9kCXCKHm1FdfeBZON0YCpdixfFu/Kt6nVWukGMPewxcjXAHs+/XcYAfdz7iRagr nZAYic0G3O1/xEYR/pZ36aQIJwFskTEenLJcmMwEEnvSC+pgNsHiTwZ8JDeidvcGU3Ms 95Og== 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=FaM0d97wPuf04xikWCmNZ4XqKQw9sfTXdEbbUv7Sh5M=; b=uQMuFVnIeamGLHUNbo2nS9wQPVPMvQgt/l7nNcZEZlntbkZom+wSgLjRVm9C6DAoRS lNjoRewBUEE9o/30bItZt6UBM14NE0xJoQZ3Z1wDcJQwrlaVXHBmXJxKCwSiJKlAn8T+ 9GvFUHFDS9z43EUYedrKsk85AS6u2GbQvVIxPBZAcvyfvu4sfsVD7Y8o+SA+k3CwZ7N7 3n9QIRSmhKu71aY3cA25htuT7mEtjzmSk9vXMZjFy0eh5n2jFJ8JeI7e3cqI3e+zguRe Qw8XjVVlEhVZSO7omL9lpVv18vxwrJljUGZYG7HcP7FCxVr+hd4EsIkdL4/p+V2pfxP8 V66A== 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 f26si6325735edj.20.2020.04.26.00.26.23; Sun, 26 Apr 2020 00:26:47 -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 S1726447AbgDZGsJ (ORCPT + 99 others); Sun, 26 Apr 2020 02:48:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726194AbgDZGsH (ORCPT ); Sun, 26 Apr 2020 02:48:07 -0400 Received: from Galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFCA7C061A0C; Sat, 25 Apr 2020 23:48:07 -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 1jSb4r-0008W3-Ll; Sun, 26 Apr 2020 08:47:45 +0200 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id 533701C0330; Sun, 26 Apr 2020 08:47:44 +0200 (CEST) Date: Sun, 26 Apr 2020 06:47:43 -0000 From: "tip-bot2 for Josh Poimboeuf" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/urgent] objtool: Fix stack offset tracking for indirect CFAs Cc: Vince Weaver , Dave Jones , Steven Rostedt , Vegard Nossum , Joe Mario , Miroslav Benes , Josh Poimboeuf , Ingo Molnar , Andy Lutomirski , Jann Horn , Peter Zijlstra , Thomas Gleixner , x86 , LKML In-Reply-To: <853d5d691b29e250333332f09b8e27410b2d9924.1587808742.git.jpoimboe@redhat.com> References: <853d5d691b29e250333332f09b8e27410b2d9924.1587808742.git.jpoimboe@redhat.com> MIME-Version: 1.0 Message-ID: <158788366394.28353.17810884969446381707.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: d8dd25a461e4eec7190cb9d66616aceacc5110ad Gitweb: https://git.kernel.org/tip/d8dd25a461e4eec7190cb9d66616aceacc5110ad Author: Josh Poimboeuf AuthorDate: Sat, 25 Apr 2020 05:03:00 -05:00 Committer: Ingo Molnar CommitterDate: Sat, 25 Apr 2020 12:22:27 +02:00 objtool: Fix stack offset tracking for indirect CFAs When the current frame address (CFA) is stored on the stack (i.e., cfa->base == CFI_SP_INDIRECT), objtool neglects to adjust the stack offset when there are subsequent pushes or pops. This results in bad ORC data at the end of the ENTER_IRQ_STACK macro, when it puts the previous stack pointer on the stack and does a subsequent push. This fixes the following unwinder warning: WARNING: can't dereference registers at 00000000f0a6bdba for ip interrupt_entry+0x9f/0xa0 Fixes: 627fce14809b ("objtool: Add ORC unwind table generation") Reported-by: Vince Weaver Reported-by: Dave Jones Reported-by: Steven Rostedt Reported-by: Vegard Nossum Reported-by: Joe Mario Reviewed-by: Miroslav Benes Signed-off-by: Josh Poimboeuf Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Jann Horn Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lore.kernel.org/r/853d5d691b29e250333332f09b8e27410b2d9924.1587808742.git.jpoimboe@redhat.com --- tools/objtool/check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 4b170fd..e718464 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -1449,7 +1449,7 @@ static int update_insn_state_regs(struct instruction *insn, struct insn_state *s struct cfi_reg *cfa = &state->cfa; struct stack_op *op = &insn->stack_op; - if (cfa->base != CFI_SP) + if (cfa->base != CFI_SP && cfa->base != CFI_SP_INDIRECT) return 0; /* push */