From patchwork Thu Feb 2 07:40:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhavan T. Venkataraman" X-Patchwork-Id: 13125490 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D64F2C05027 for ; Thu, 2 Feb 2023 08:04:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=e0QT0AyAJmTpyzzfn0T3zYKg0oh3XP+NLGguvMyCoxw=; b=e7+kBXZdA0ziF7 1uAbI0o6QURSn/qs23bSuM7PB9C5WfxD9kPQaUJ9CgL4q2sGNGJqsNSBqsYZpK1Ckwdd50UR34OE0 mZ55pCO5mhvXpOQou2a7vqAkXsdROaX6yKolDHj5uF1PfG/gU8gHD7Vsdxr0PJ2tHwY0Mv+1HfdAl UbqmsC77wOfaWTfVjal8IS9/uSJbzHk/eWTTy4g9uOCTV4FNf0bQN1Hq2x2U+E9sV6bgmEhfiYTDz IXgzmNSNkBHXk3KSK+vgp1Qu4EVOHnmR3n1yR2hYNK4mBedzw0O08D9SObge/PmoWbj2mUH/GQe22 PFJsiG1Hl5lqE6T+zS7Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNUZV-00ErVU-Ne; Thu, 02 Feb 2023 08:03:53 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNUYr-00Er9T-BZ for linux-arm-kernel@bombadil.infradead.org; Thu, 02 Feb 2023 08:03:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc: Content-Type:Content-ID:Content-Description; bh=TU6iA6jKusJnO70H+H53EmwcF0iJW0CBgTtKff3JI6k=; b=XpStCQ9+13kd16QO7jX0Q+0/y4 db53iTaE8lYvxThemLINaKBx1BgR1r1RL44Z2PQUvMEx7EWjKiSjKsvoM48JGeni5uqe5xXkdDYN3 xsu9qQhnxJUsvvnBpOloLQF3wXHNBsv1b1rvAtfJNAl9ySwn9EUke3QFLowSkNfJQyrKOgLik4dOG 6LqqrBWqK8ohfem8W/689s159Lr0+480cVDZFL/uGZr2scF8quUtvQPgZgL/3foXOQl8egKlJqMIf 8qdaPRFo/wTkW7cwf+rUWV3S4aaLZAOLY1xXn+hCO8KMhIYUiuhronS/69kIZ+ltNLvCzzsRtxLZH lMlni6ww==; Received: from linux.microsoft.com ([13.77.154.182]) by desiato.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pNUER-0054zB-0Q for linux-arm-kernel@lists.infradead.org; Thu, 02 Feb 2023 07:42:10 +0000 Received: from x64host.home (unknown [47.187.213.40]) by linux.microsoft.com (Postfix) with ESMTPSA id 9DD1420B2EE2; Wed, 1 Feb 2023 23:42:40 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 9DD1420B2EE2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1675323761; bh=TU6iA6jKusJnO70H+H53EmwcF0iJW0CBgTtKff3JI6k=; h=From:To:Subject:Date:In-Reply-To:References:From; b=QC4nujwZtIv/QBJ9ymn/CgxJwUDnI+3uphc5T+Gu1JhzZ8DsZDrdFS6ekuXTYImNI 3hhJvzVlkgZtNG3y+q0Z+Er2prT0XsuyEtZPzyM7Y095qVEUMRdK9OZBd92AZdLUn7 ozFI8y1kgFhsn1M6zu0K6KGUmH7ot/1xROXsuhlg= From: madvenka@linux.microsoft.com To: jpoimboe@redhat.com, peterz@infradead.org, chenzhongjin@huawei.com, mark.rutland@arm.com, broonie@kernel.org, nobuta.keiya@fujitsu.com, sjitindarsingh@gmail.com, catalin.marinas@arm.com, will@kernel.org, jamorris@linux.microsoft.com, linux-arm-kernel@lists.infradead.org, live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, madvenka@linux.microsoft.com Subject: [RFC PATCH v3 16/22] arm64: Add unwind hints to exception handlers Date: Thu, 2 Feb 2023 01:40:30 -0600 Message-Id: <20230202074036.507249-17-madvenka@linux.microsoft.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230202074036.507249-1-madvenka@linux.microsoft.com> References: <0337266cf19f4c98388e3f6d09f590d9de258dc7> <20230202074036.507249-1-madvenka@linux.microsoft.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230202_074208_557472_BBA841E3 X-CRM114-Status: UNSURE ( 9.08 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: "Madhavan T. Venkataraman" Add unwind hints to Interrupt and Exception handlers. Signed-off-by: Madhavan T. Venkataraman --- arch/arm64/kernel/entry.S | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S index e28137d64b76..d73bed56f0e6 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -28,6 +28,7 @@ #include #include #include +#include .macro clear_gp_regs .irp n,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29 @@ -560,6 +561,7 @@ SYM_CODE_START_LOCAL(el\el\ht\()_\regsize\()_\label) .if \el == 0 b ret_to_user .else + UNWIND_HINT_REGS PT_REGS_SIZE b ret_to_kernel .endif SYM_CODE_END(el\el\ht\()_\regsize\()_\label) @@ -887,6 +889,7 @@ SYM_FUNC_START(call_on_irq_stack) /* Move to the new stack and call the function there */ mov sp, x16 blr x1 + UNWIND_HINT_IRQ 16 /* * Restore the SP from the FP, and restore the FP and LR from the frame