Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3419853imm; Tue, 29 May 2018 07:01:12 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJV2Y5g63sFKsMlCzFoZJang/c9cnzGY30xElS/WjBqSlyLYiePm67iFMVtq48rMu0ArAPv X-Received: by 2002:a17:902:b598:: with SMTP id a24-v6mr13965680pls.183.1527602472763; Tue, 29 May 2018 07:01:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527602472; cv=none; d=google.com; s=arc-20160816; b=t3c5N0dOG2hVROeNu1Ag2CTJuZNKpsiQOh0HsBiWxmWedLf7p2Vg2ZaPUvqXa4f88e RwoV8VpqW1Xt+45WBR5X9jlbSUWYpdeSavKk+Fb67YUz54yKQQ+eADRdZmG8+jFOQOdR 68TzxHZZLuvznlSeX+bZuygafBBte6jQPLuvxvGCxA891vfcaNrNMfLRJlRWE77HBAiY ym//f+r7pt48s3THavCrMeFrLhZgIPqQYR8/kW+smJ0jPFHmEOgrG7T9are36/HTVilC /1X9iisCbfDI+O/SqZp4z3OWjRokGSNmakYLaJ6YaoJX704ilhkjbIE0zK0Z4NipXWAk K9fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=JFb8NkiC6GPzMHOQyyUQDJZ70c26/7n0tqaZWPJBLoY=; b=tc+hLPvig9xm8u/zqHO11MMlqaCXRfEY2TOlLwA210TvnlEJnX1zOhFVKdaU+Volx8 wy9TfuOa2Nl5EW01TkdZRWRcCAWCiLGCMkiPlt5p6l8l1f6PLwAiTbOGJrVEuWD82/wP RFtsiSgPd5qiUwxIojPmkZjlK5PNsdhZ601EgyBS0+4iobmcTigfLHkX2x05C/ZFCOCu 9ODMOE18FD2oHDVVV16dlcBW6FV5kHMusv3m4GsehURVrjKX0IOtDXaCbWaCO7EcKYw/ 70DoAGlARICeMZEu5ZKgaWXhZlEroGouqfZJZ9NL+zDIp7cTRpDpQgjQ83ruD5hjULyf FpQQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m11-v6si2059735pgr.104.2018.05.29.07.00.57; Tue, 29 May 2018 07:01:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934880AbeE2N7z (ORCPT + 99 others); Tue, 29 May 2018 09:59:55 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:40643 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S934533AbeE2N7u (ORCPT ); Tue, 29 May 2018 09:59:50 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id ACBC3687E601C; Tue, 29 May 2018 21:59:46 +0800 (CST) Received: from linux-work.huawei.com (10.67.189.174) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.382.0; Tue, 29 May 2018 21:59:41 +0800 From: nixiaoming To: , , , , , , , , , , , , , , , , , , , CC: , , , , Subject: [PATCH 1/3] arm64:add missing CONFIG_STRICT_KERNEL_RWX for mark_rodata_ro Date: Tue, 29 May 2018 21:36:15 +0800 Message-ID: <20180529133615.26889-1-nixiaoming@huawei.com> X-Mailer: git-send-email 2.10.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.189.174] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org mark_rodata_ro is only called by the function mark_readonly when CONFIG_STRICT_KERNEL_RWX=y, if CONFIG_STRICT_KERNEL_RWX is not set a compile warning may be triggered: unused function Signed-off-by: nixiaoming --- arch/arm64/mm/mmu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c index 2dbb2c9..849f326 100644 --- a/arch/arm64/mm/mmu.c +++ b/arch/arm64/mm/mmu.c @@ -491,6 +491,7 @@ static void __init map_mem(pgd_t *pgdp) #endif } +#ifdef CONFIG_STRICT_KERNEL_RWX void mark_rodata_ro(void) { unsigned long section_size; @@ -505,6 +506,7 @@ void mark_rodata_ro(void) debug_checkwx(); } +#endif static void __init map_kernel_segment(pgd_t *pgdp, void *va_start, void *va_end, pgprot_t prot, struct vm_struct *vma, -- 2.10.1