From patchwork Fri Aug 16 12:24:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raphael Gault X-Patchwork-Id: 11097569 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 44E3514F7 for ; Fri, 16 Aug 2019 12:29:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3156E289C5 for ; Fri, 16 Aug 2019 12:29:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 256AE289CA; Fri, 16 Aug 2019 12:29:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BBA50289C5 for ; Fri, 16 Aug 2019 12:29:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=utPx6FvGNOlIgB/ru6a+7CADqRr2ojXravlDSena6d8=; b=qott0kikLjpeNbJfl/clD2tqKs 9uf/a7myod7ktVN535U49BNwzcKCSU6MpOifeNGChea0jgd48E71/qZkb/89ExO9GAGR/oMTlxfwg j89blve5QV6PCtGmWzvAlmQwYuQ8V59R5vEHOQvIaEJsM3XtU/WujPz9ItiNaYBbLptdHP/Mjy2hC ZTGC4/DlrqC6MxalrAwGr5IdjO5+JLO6sFqqUcNjE8ecSVxMkQVfsEFhpLPqdI62xophoVtpu2CFp dwbEuoQOven3ejY0r4aTmNtutH59mDI8sfLCXacxCX+CnJ+6Tby5i6mOhhJwOhB1uX9H3h1xy9ZIF 9zd/WV1g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hybMe-0001ly-GJ; Fri, 16 Aug 2019 12:29:52 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hybI0-0004Np-MF for linux-arm-kernel@lists.infradead.org; Fri, 16 Aug 2019 12:25:07 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 83655344; Fri, 16 Aug 2019 05:25:04 -0700 (PDT) Received: from e121650-lin.cambridge.arm.com (e121650-lin.cambridge.arm.com [10.1.196.120]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4A1D33F706; Fri, 16 Aug 2019 05:25:03 -0700 (PDT) From: Raphael Gault To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, jpoimboe@redhat.com Subject: [RFC v4 17/18] arm64: kernel: Annotate non-standard stack frame functions Date: Fri, 16 Aug 2019 13:24:02 +0100 Message-Id: <20190816122403.14994-18-raphael.gault@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190816122403.14994-1-raphael.gault@arm.com> References: <20190816122403.14994-1-raphael.gault@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190816_052504_794752_BCA393D6 X-CRM114-Status: UNSURE ( 7.83 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: raph.gault+kdev@gmail.com, peterz@infradead.org, catalin.marinas@arm.com, will.deacon@arm.com, Raphael Gault , julien.thierry.kdev@gmail.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Annotate assembler functions which are callable but do not setup a correct stack frame. Signed-off-by: Raphael Gault --- arch/arm64/kernel/hyp-stub.S | 3 +++ arch/arm64/kvm/hyp-init.S | 3 +++ 2 files changed, 6 insertions(+) diff --git a/arch/arm64/kernel/hyp-stub.S b/arch/arm64/kernel/hyp-stub.S index 73d46070b315..8917d42f38c7 100644 --- a/arch/arm64/kernel/hyp-stub.S +++ b/arch/arm64/kernel/hyp-stub.S @@ -6,6 +6,7 @@ * Author: Marc Zyngier */ +#include #include #include #include @@ -42,6 +43,7 @@ ENTRY(__hyp_stub_vectors) ventry el1_fiq_invalid // FIQ 32-bit EL1 ventry el1_error_invalid // Error 32-bit EL1 ENDPROC(__hyp_stub_vectors) +asm_stack_frame_non_standard __hyp_stub_vectors .align 11 @@ -69,6 +71,7 @@ el1_sync: 9: mov x0, xzr eret ENDPROC(el1_sync) +asm_stack_frame_non_standard el1_sync .macro invalid_vector label \label: diff --git a/arch/arm64/kvm/hyp-init.S b/arch/arm64/kvm/hyp-init.S index 160be2b4696d..63deea39313d 100644 --- a/arch/arm64/kvm/hyp-init.S +++ b/arch/arm64/kvm/hyp-init.S @@ -12,6 +12,7 @@ #include #include #include +#include .text .pushsection .hyp.idmap.text, "ax" @@ -118,6 +119,7 @@ CPU_BE( orr x4, x4, #SCTLR_ELx_EE) /* Hello, World! */ eret ENDPROC(__kvm_hyp_init) +asm_stack_frame_non_standard __kvm_hyp_init ENTRY(__kvm_handle_stub_hvc) cmp x0, #HVC_SOFT_RESTART @@ -159,6 +161,7 @@ reset: eret ENDPROC(__kvm_handle_stub_hvc) +asm_stack_frame_non_standard __kvm_handle_stub_hvc .ltorg