Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp800892ybk; Wed, 13 May 2020 13:30:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZGTWP9k51difMylO7o+f8MY2pJ4Rm6yDqtP0EJ2a0+FANCU1VqqA50dLJI8GlLzb0uQgO X-Received: by 2002:a17:906:a3ca:: with SMTP id ca10mr797854ejb.298.1589401827162; Wed, 13 May 2020 13:30:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589401827; cv=none; d=google.com; s=arc-20160816; b=vCnq9V6Zw/mvn6v39oVU38RMyBYX8hkP4qH+kJBOIOsR6YKORHTnTTv3ZGY3Lrx6+0 Z/IMqtClz0fbVZmVeFSmIoMNmpx93HqBQwQcPoKkkWVv6CD+/7biM693squWKarWPJV8 OSpXzhk9407ay4Y2075H3mUpsj9KY/hkewjV2A2FEQpfPmC9YQaKTV0F8Vlblexgdgim MQNCldkZin2KY7VBT7x05SxQMrGitAoFy2Y/dftiihNJ4wHRnrNGEuKl6kT//N/cJyyo nKwZRUG9LhYxr65B7C65P+/UgVjxhtkiBgpvVprgMltkUzAinq6BgbuaQvwCT61JwtdW D19w== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Hf7JXrXl6E7/s4W6CP3wKZFNdzENi7EdJif1/5SnEd0=; b=pw7qqwQNR3BJrSQNA2uB9YiksJaa853iHFa3V4Joy2ZsVS2vHh+9vN7g9wAnn8rFLr K1PyRFUN5hDmjwh6DI4JvoEtMg7C8GbOfQ1FCSh7bdplY30Bs5N/0aM3wUL9aHo+S1oQ 6cFRuXry/IiRj0PvLxfGoKtk86EFNIgPa5WPbznv7T6HQ30vUS/HM+h0pKkT7NwjYLxk NZxKrEIHj9unyYriQd6zLre1k9PVP1Du5Uh6ipK4xJTxUxuBhtaTN655Dtx9/KjWGcl5 /jjAqa7Si0T/gytfouviXCtoH/MlxoZ+pnhpQYNOLYORZ9RC8xEUCI7dmWYOWphjZT8w icWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cRYjv4V0; 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 dt13si657860ejc.368.2020.05.13.13.30.04; Wed, 13 May 2020 13:30:27 -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; dkim=pass header.i=@kernel.org header.s=default header.b=cRYjv4V0; 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 S2387543AbgEMJuo (ORCPT + 99 others); Wed, 13 May 2020 05:50:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:50722 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387521AbgEMJul (ORCPT ); Wed, 13 May 2020 05:50:41 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6F45C2312A; Wed, 13 May 2020 09:50:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589363440; bh=yYXBp62M2ktB01uEgm4HAG6uzYwpAekJhxi25yXoN4w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cRYjv4V0pHaDhB4cGstEXwKA2jTCazZCMkzo8gOEorSaPyWki7z+ArbZLmt6tx6Wq +/ZrE+6rNvIZYTXDDoLEc3rPd7UyTjFIA9BdAhTcgwqBRDhSP/IrMyJsiKz9eTIkr8 7sXa9lvGhrlAN4EUNtEjIKsBmzPJtQGQKhpKkX0M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miroslav Benes , Jann Horn , Josh Poimboeuf , Ingo Molnar , Andy Lutomirski , Dave Jones , Peter Zijlstra , Thomas Gleixner , Vince Weaver Subject: [PATCH 5.4 74/90] x86/entry/64: Fix unwind hints in rewind_stack_do_exit() Date: Wed, 13 May 2020 11:45:10 +0200 Message-Id: <20200513094417.018065219@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200513094408.810028856@linuxfoundation.org> References: <20200513094408.810028856@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jann Horn commit f977df7b7ca45a4ac4b66d30a8931d0434c394b1 upstream. 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: Greg Kroah-Hartman --- arch/x86/entry/entry_64.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/x86/entry/entry_64.S +++ b/arch/x86/entry/entry_64.S @@ -1740,7 +1740,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)