From patchwork Tue Apr 9 13:52:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raphael Gault X-Patchwork-Id: 10891335 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 828151390 for ; Tue, 9 Apr 2019 13:54:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6907328647 for ; Tue, 9 Apr 2019 13:54:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B88C284C0; Tue, 9 Apr 2019 13:54:09 +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 0F221284C0 for ; Tue, 9 Apr 2019 13:54:09 +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=TkGVzbUDK1qFtirzXBGB55rCVfdsYNl4q+1gkQUu4GY=; b=fkNF/rbdOzDn2fnRFUNFv2WPPL W3KfbXyGmKpSA4OadA1xX8wbAnBay/mocd8Msrhn3sRaZVxy0tZdP4KIyB4Btzh4ln/whDTC8RqEA SNkJXwbbhyVRW5G6cD3N40sg2dCXOXipcyBNrKCvrLO2Q9nhY/Nn/ysc/Spuis1KeeFzphIqa69Ns lQEOa/H66qb4DNcA8xIfO+coYi9Zk71bLDpODOufpHgvMlECocNi23bDRg14OWLZ+510TPEXQdnkx IILSMeVC1+3BSyIT0yMiox3Xm29pi+oBRUnoNcngO6colvRj59kPFV7qvPizkeMa3VejOI3vXyMmH KitMI2ew==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hDrCR-0003tb-Ak; Tue, 09 Apr 2019 13:54:07 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hDrC4-0003Rr-Ux for linux-arm-kernel@lists.infradead.org; Tue, 09 Apr 2019 13:53:48 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B7CE6A78; Tue, 9 Apr 2019 06:53:44 -0700 (PDT) Received: from e121650-lin.cambridge.arm.com (e121650-lin.cambridge.arm.com [10.1.196.108]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3B75F3F68F; Tue, 9 Apr 2019 06:53:43 -0700 (PDT) From: Raphael Gault To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [RFC 4/6] arm64: assembler: Add macro to annotate asm function having non standard stack-frame. Date: Tue, 9 Apr 2019 14:52:41 +0100 Message-Id: <20190409135243.12424-5-raphael.gault@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190409135243.12424-1-raphael.gault@arm.com> References: <20190409135243.12424-1-raphael.gault@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190409_065345_210249_EADEFABF X-CRM114-Status: UNSURE ( 9.09 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: julien.thierry@arm.com, peterz@infradead.org, catalin.marinas@arm.com, will.deacon@arm.com, Raphael Gault , jpoimboe@redhat.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 Signed-off-by: Raphael Gault --- arch/arm64/include/asm/assembler.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/arch/arm64/include/asm/assembler.h b/arch/arm64/include/asm/assembler.h index 4feb6119c3c9..636a07a7eb76 100644 --- a/arch/arm64/include/asm/assembler.h +++ b/arch/arm64/include/asm/assembler.h @@ -748,4 +748,22 @@ USER(\label, ic ivau, \tmp2) // invalidate I line PoU .Lyield_out_\@ : .endm + +#ifdef CONFIG_STACK_VALIDATION + /* + * This macro is the arm64 assembler equivalent of the + * macro STACK_FRAME_NON_STANDARD define at + * ~/include/linux/frame.h + */ + .macro asm_stack_frame_non_standard func + .pushsection ".discard.func_stack_frame_non_standard" + .8byte \func + .popsection + .endm +#else + .macro asm_stack_frame_non_standard func + .endm +#endif + + #endif /* __ASM_ASSEMBLER_H */