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=-6.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS 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 5420EC10DCE for ; Thu, 12 Mar 2020 17:31:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 259B720716 for ; Thu, 12 Mar 2020 17:31:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="MdecNyyk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726594AbgCLRbU (ORCPT ); Thu, 12 Mar 2020 13:31:20 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:31651 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726480AbgCLRbG (ORCPT ); Thu, 12 Mar 2020 13:31:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584034265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cHwi/T1PZhd+QNsIfDhoMoDtHWXMTLg63u03HSEmnXE=; b=MdecNyykv5rRXIlk44VL3omFY8wzgwdaLwu09BCks5a5v9o4uEWu6r+igCqFxwh5bU28Ec XOndGbPGGu5o/b99eI+uphoAVpUHhAvN/ssunMnqrtWSWSYm2h2JvfKZe7HAcrYljOYcA0 sWHZHsi/nPqAR9aBmoCPUa02P0fhHRE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-50--3PE8ag4PgGU7V53WPjJLA-1; Thu, 12 Mar 2020 13:31:02 -0400 X-MC-Unique: -3PE8ag4PgGU7V53WPjJLA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A7D8993013; Thu, 12 Mar 2020 17:31:00 +0000 (UTC) Received: from treble.redhat.com (ovpn-122-137.rdu2.redhat.com [10.10.122.137]) by smtp.corp.redhat.com (Postfix) with ESMTP id 792D360BEC; Thu, 12 Mar 2020 17:30:59 +0000 (UTC) From: Josh Poimboeuf To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Vince Weaver , Dave Jones , Jann Horn , Miroslav Benes , Andy Lutomirski , Steven Rostedt , Thomas Gleixner Subject: [PATCH 06/14] x86/entry/64: Fix unwind hints in rewind_stack_do_exit() Date: Thu, 12 Mar 2020 12:30:25 -0500 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jann Horn 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") Signed-off-by: Jann Horn Signed-off-by: Josh Poimboeuf --- 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 5d6dac54e487..c1eaeab0e0d4 100644 --- a/arch/x86/entry/entry_64.S +++ b/arch/x86/entry/entry_64.S @@ -1739,7 +1739,7 @@ SYM_CODE_START(rewind_stack_do_exit) =20 movq PER_CPU_VAR(cpu_current_top_of_stack), %rax leaq -PTREGS_SIZE(%rax), %rsp - UNWIND_HINT_FUNC sp_offset=3DPTREGS_SIZE + UNWIND_HINT_REGS =20 call do_exit SYM_CODE_END(rewind_stack_do_exit) --=20 2.21.1