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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 A4887C433E1 for ; Thu, 14 May 2020 19:02:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 821B0206A5 for ; Thu, 14 May 2020 19:02:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589482923; bh=h4EElps5DA9Uos16bxkRxKXAW9NmSLYfWK3tS5sJhzw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=KwBIloXKMWt9lv6MCOg0S1oM14DlByujpfBuNEwN3OBaUOevMhm5gGdlFLBB/dMXs OnUN/2uhTTSpIV57BaIEYktW0O06src42woRm1JR/Cwlr9h03DoGrJQUXRp5TCnt9C /k5G6dRN3JXtxcyKTbNk232FQZnnKKUg1XSz22Co= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728707AbgENTCC (ORCPT ); Thu, 14 May 2020 15:02:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:55794 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729333AbgENSzQ (ORCPT ); Thu, 14 May 2020 14:55:16 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (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 BA8D82076A; Thu, 14 May 2020 18:55:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589482516; bh=h4EElps5DA9Uos16bxkRxKXAW9NmSLYfWK3tS5sJhzw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xDkoKVbeCKMc72kXP9Bha1JLP7f+hT+wmacBvo15p4CvtZSvRPjrhUSsNncpSS2N6 K7Js71dzrfV+VHUwby3pEGIDUIy3YAF/lKN4FPZ0eU1XdGOHBTQDTLf8NRkWi5dV9d nvQh6yKKu4fqtJvxiZM6TWRZxJAgnIcjaAcR0GfQ= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jann Horn , Miroslav Benes , Josh Poimboeuf , Ingo Molnar , Andy Lutomirski , Dave Jones , Peter Zijlstra , Thomas Gleixner , Vince Weaver , Sasha Levin Subject: [PATCH AUTOSEL 4.14 13/39] x86/entry/64: Fix unwind hints in rewind_stack_do_exit() Date: Thu, 14 May 2020 14:54:30 -0400 Message-Id: <20200514185456.21060-13-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200514185456.21060-1-sashal@kernel.org> References: <20200514185456.21060-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Jann Horn [ Upstream commit f977df7b7ca45a4ac4b66d30a8931d0434c394b1 ] The LEAQ instruction in rewind_stack_do_exit() moves the stack pointer directly below the pt_regs at the top of the task stack before calling do_exit(). Tell the unwinder to expect pt_regs. Fixes: 8c1f75587a18 ("x86/entry/64: Add unwind hint annotations") Reviewed-by: Miroslav Benes Signed-off-by: Jann Horn Signed-off-by: Josh Poimboeuf Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Dave Jones Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Vince Weaver Link: https://lore.kernel.org/r/68c33e17ae5963854916a46f522624f8e1d264f2.1587808742.git.jpoimboe@redhat.com Signed-off-by: Sasha Levin --- arch/x86/entry/entry_64.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S index d4d72c84d9eb4..f24974bddfc96 100644 --- a/arch/x86/entry/entry_64.S +++ b/arch/x86/entry/entry_64.S @@ -1649,7 +1649,7 @@ ENTRY(rewind_stack_do_exit) movq PER_CPU_VAR(cpu_current_top_of_stack), %rax leaq -PTREGS_SIZE(%rax), %rsp - UNWIND_HINT_FUNC sp_offset=PTREGS_SIZE + UNWIND_HINT_REGS call do_exit END(rewind_stack_do_exit) -- 2.20.1