Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp4978655iog; Wed, 22 Jun 2022 09:26:02 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tqvuL5Aq3dKFu85p0aRN/JqcZaYDODfs4whAcMBM9rfvfABfUtm24Qn+PcuGJEG21pN0Vf X-Received: by 2002:a17:90b:3510:b0:1ec:c617:acd1 with SMTP id ls16-20020a17090b351000b001ecc617acd1mr4551436pjb.47.1655915161905; Wed, 22 Jun 2022 09:26:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655915161; cv=none; d=google.com; s=arc-20160816; b=oTCkEgfw4YHZWIiDJp8tp35Cz3DGx67otxFaxRo8fbbOIVF+OBVJwF5HWPyXhT1LlW kyUijkbiudvahz24TbxA+TU2uelYA49PS8qxvJJM3WyMnEHJ8zok/XbMr0+FBOKKPJla aqXeDuVKPk8Jiiw8yka9qjvACr8/F6rYWLVtA3EuCOlYM8CMtUbTEjuq8AKfWFsyAdoI fZ8ZoJwq7PkDsqvFf3sVoJKHXfg6/YdNmrO8LGajpqGDF6Ft20pW+/hnnlQPJJ+A1596 rVU5RzIw9i4zLgCNrlUs2J529wnEFGelf8Z0cBIlqyMkmB+3GdVt2ppGjcB/Ubw+BVad bs6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=wO2Fur+HfydzrA+GxkpF+MF/qo/taxBwv/BDwvsmYAk=; b=Qpd66+NRpVMSD80qla44XMQypKwi7N1esFUYr3I7BCM0De0VQKcGyg8pPAFiQZPAKQ I5nyoZ52iIlgqCAarl4Tf8X1m8hZfvdTuS8hDMRFW8EwL1YhFzozUAEbJcME97R4tVdz cHpJATkhsWY04GP7tOfInBcohfyjmQGEc/flxuMesSnsM8agSfZ/Y64QS950qewj65xk E5dYHPfhqEIRwez8p308q6+xR/tOlcfNqiDTGpwlwcJNk1Pxt4RSK9ypAb6edNz6866G c09O/w39YZIIAjTWgwlGdVgaRbmILX1uzgYzv0CNoEvavMLRGRmWSQtz2FduD6bKjmzW 1K8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q11-20020a170902f78b00b00163ddc3b77csi23363180pln.573.2022.06.22.09.25.49; Wed, 22 Jun 2022 09:26:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359818AbiFVPzq (ORCPT + 99 others); Wed, 22 Jun 2022 11:55:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358909AbiFVPxF (ORCPT ); Wed, 22 Jun 2022 11:53:05 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5484A32EEC; Wed, 22 Jun 2022 08:52:50 -0700 (PDT) Received: from dggpemm500023.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4LSnsW3LfnzhYdM; Wed, 22 Jun 2022 23:50:39 +0800 (CST) Received: from dggpemm500013.china.huawei.com (7.185.36.172) by dggpemm500023.china.huawei.com (7.185.36.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 22 Jun 2022 23:52:47 +0800 Received: from ubuntu1804.huawei.com (10.67.175.36) by dggpemm500013.china.huawei.com (7.185.36.172) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 22 Jun 2022 23:52:46 +0800 From: Chen Zhongjin To: , , , , , CC: , , , , , , , , , , , , , Subject: [PATCH v5 27/33] arm64: Set intra-function call annotations Date: Wed, 22 Jun 2022 23:49:14 +0800 Message-ID: <20220622154920.95075-28-chenzhongjin@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220622154920.95075-1-chenzhongjin@huawei.com> References: <20220622154920.95075-1-chenzhongjin@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.175.36] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpemm500013.china.huawei.com (7.185.36.172) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Stack validation requires BL instructions to an address, within the symbol containing the BL should be annotated as intra-function calls. Make __pmull_p8_core normally set frame because there's a intra-function call destinating middle of it and the caller have set the frame. When analyzing the insns there will be a cfi state mismatch between normal-call and intra-call. Signed-off-by: Julien Thierry Signed-off-by: Chen Zhongjin --- arch/arm64/crypto/crct10dif-ce-core.S | 5 +++++ arch/arm64/kernel/entry.S | 2 ++ 2 files changed, 7 insertions(+) diff --git a/arch/arm64/crypto/crct10dif-ce-core.S b/arch/arm64/crypto/crct10dif-ce-core.S index dce6dcebfca1..b3b8e56cb87d 100644 --- a/arch/arm64/crypto/crct10dif-ce-core.S +++ b/arch/arm64/crypto/crct10dif-ce-core.S @@ -63,6 +63,7 @@ // #include +#include #include .text @@ -132,6 +133,8 @@ .endm SYM_FUNC_START_LOCAL(__pmull_p8_core) + stp x29, x30, [sp, #-16]! + mov x29, sp .L__pmull_p8_core: ext t4.8b, ad.8b, ad.8b, #1 // A1 ext t5.8b, ad.8b, ad.8b, #2 // A2 @@ -193,6 +196,7 @@ SYM_FUNC_START_LOCAL(__pmull_p8_core) eor t4.16b, t4.16b, t5.16b eor t6.16b, t6.16b, t3.16b + ldp x29, x30, [sp], #16 ret SYM_FUNC_END(__pmull_p8_core) @@ -207,6 +211,7 @@ SYM_FUNC_END(__pmull_p8_core) pmull2 \rq\().8h, \ad\().16b, \bd\().16b // D = A*B .endif + ANNOTATE_INTRA_FUNCTION_CALL bl .L__pmull_p8_core\i eor \rq\().16b, \rq\().16b, t4.16b diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S index bbc440379304..d49bfbe81a0d 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -694,6 +695,7 @@ alternative_else_nop_endif * entry onto the return stack and using a RET instruction to * enter the full-fat kernel vectors. */ + ANNOTATE_INTRA_FUNCTION_CALL bl 2f UNWIND_HINT_EMPTY b . -- 2.17.1