Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp730739ybz; Sat, 25 Apr 2020 03:05:29 -0700 (PDT) X-Google-Smtp-Source: APiQypJiWijqV8SsewzY426tZjESB4VAMRWMHbqhoDgmoQTQTmhKhhlTNZwPgXVRoJhTqJmynm/F X-Received: by 2002:aa7:dc4b:: with SMTP id g11mr2068590edu.223.1587809128849; Sat, 25 Apr 2020 03:05:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587809128; cv=none; d=google.com; s=arc-20160816; b=qHjbEMYUalPzszlbEGZWxx8uZ9D4ndd4q2x/sIUckPRK0PTk+1q5fefQ/yspUpPAt6 fzc/HKD9Kex+C53cKd9/j3GtvDojRCTflrldoN3TW2nHXBu52NnV7VNLil3G8sjJB4J5 KrxBE5//uzzXIxZx3Z4SawilHktlXN6C3o2sLsbplBra+NZt+Gk8LVKgjDwAduYnBw79 3a7dOpgy395gPKRUB3Opc2fc7LTWWkwCSy+FCkCY8g5iGnFSQKuY4i95zhkPI/hQ211I Kb0EbH2Y2EoRYbIN/4xB0JWD9xVbSEFEJ+ulDkG8FTMMoqiljR+jl4tdqFzvrjqYNT6d 5EZA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=LlhDMWII8SsE3aQs5qJ4MI4Q8CJwVI/eRFmefyOp2VQ=; b=aTK+UFi9Yb5CgMUxnxzzUzcPq/kbrdkfAamadpPOWAIkBr89mQ08SNS77XB5PVJdiF SEKbO7b7IIWbHKua73xCm9uZKszcXZXJ698ovJc0C550o/bp/EEW7s8cnWmihJN7z6A1 DLhE+TN7Ry/rmc7IM2R/HB19VLRYvzN+8P8MUhSqmJSTAtvYQzDaveFSmMyNUnPr5INx mFlVrqvGNjjfRRUSk9ZUDSOkuEtimbYbtJ1MbGAUO13UZhQKOb9FTMrnlcGXzdSgfX1s VqIEQQJ3v7oqiGNDAmBO/Vq7nOGtl52+5YME0vByw81wkZ7c3iRUuyMSyN/d5di8YfHA 4HIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=euDoeWWI; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j24si4696992ejb.58.2020.04.25.03.05.05; Sat, 25 Apr 2020 03:05:28 -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=@redhat.com header.s=mimecast20190719 header.b=euDoeWWI; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726165AbgDYKDi (ORCPT + 99 others); Sat, 25 Apr 2020 06:03:38 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:26800 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726112AbgDYKDb (ORCPT ); Sat, 25 Apr 2020 06:03:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587809010; 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=LlhDMWII8SsE3aQs5qJ4MI4Q8CJwVI/eRFmefyOp2VQ=; b=euDoeWWI256rC5/gMuZ0gmHTQp3GoPpMiAzS4TpjYmVw/eLKuSjGG1NZqkjP+syb10ksSE AwG2zcNXxzXODTHrS6P0cMNJJajlEzgdFU84nOuPcUEt9ykmvM8tWE2XkW9JC3KBpt0V+9 pq+ATn3K0INSmADkFWjGb094NmSNhl0= 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-495-goB7E3gzPW-vkGoXw0swLQ-1; Sat, 25 Apr 2020 06:03:28 -0400 X-MC-Unique: goB7E3gzPW-vkGoXw0swLQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C554B10052E4; Sat, 25 Apr 2020 10:03:26 +0000 (UTC) Received: from treble.redhat.com (ovpn-114-29.rdu2.redhat.com [10.10.114.29]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9BE0160624; Sat, 25 Apr 2020 10:03:25 +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 , Thomas Gleixner Subject: [PATCH v2 05/11] x86/entry/64: Fix unwind hints in rewind_stack_do_exit() Date: Sat, 25 Apr 2020 05:03:04 -0500 Message-Id: <68c33e17ae5963854916a46f522624f8e1d264f2.1587808742.git.jpoimboe@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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 Reviewed-by: Miroslav Benes --- 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 34a588950fe1..9fe0d5cad8e4 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