From mboxrd@z Thu Jan 1 00:00:00 1970 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 E7C36C433F5 for ; Wed, 5 Jan 2022 10:23:55 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=t9zpX2qRQ0/CVz/0bmJbugCuHlNJade61+fjJhcrm2M=; b=q9gcF7Lg3evDWP 7wF1gDY9mKb7tar/s58eN2nZug3Tjum0mXYoNL/+qAf7dBVTRJX84EJzHdsjmOB/pI/Vc4oR7PeHj eOl1+vgFXJhcM0G8AJaLvzGpL/DuLoUzqQ+BEXhJ7tQv4r3TRoYH+jTsMa30po1z5aT1bHNMpWV9I nRWucj1Jq5ZoqZPYSFQWNPPoo90I7GOdzJNMe+Y2dxVwMgVGdsOFxiL78Qnty9/Sy2f7UoA89zcFc Xmk0ZUo3GaiEzUqUmY2XwmbY6W/qge+EHRAn8izATcaPVBR5frIlR42H0uH9SxPOlknivSLru60O7 FSRFveiroNYPdzwf6p8g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n53RL-00EWcs-Kt; Wed, 05 Jan 2022 10:22:43 +0000 Received: from mga18.intel.com ([134.134.136.126]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n53RI-00EWcE-Cr for linux-arm-kernel@lists.infradead.org; Wed, 05 Jan 2022 10:22:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1641378160; x=1672914160; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=f2iFG3BqkYAnvmhxv+xouGNe19Jk1X/H4/C92rX/Skw=; b=nqirKKIsZk7lHM0LhXlOwaDVODQUCBZMpOCNaGOn+v+zE9dlZJrpE9E6 EN5k9jCSFk1qxDfq5RWCiIJSIGx9/DL3VDT2cAx8ej+sPRtSus29TpNfs 8L/vZ8MFO89WSM0vTDrPdpZf3iVUgqoPGUG2e3Qz+NLmANTXVlIV+H6d+ vZUCiiB9wnzE8o4yzlB9kPf8FXDjVR8mePp+ht7Max0vqU2/ej6qh14pH GPp7FPACIOwUX9ugTKVnPAeUMPHheoH5KuB1azzro5lXhPV+tx20F/z6N TnTncDR7tOsOXL59IUZJEIXMFeT4hudjTrFvNEadKJW7m9kYRDjksPFgk A==; X-IronPort-AV: E=McAfee;i="6200,9189,10217"; a="229231164" X-IronPort-AV: E=Sophos;i="5.88,263,1635231600"; d="scan'208";a="229231164" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jan 2022 02:22:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,263,1635231600"; d="scan'208";a="760754798" Received: from lkp-server01.sh.intel.com (HELO e357b3ef1427) ([10.239.97.150]) by fmsmga006.fm.intel.com with ESMTP; 05 Jan 2022 02:22:36 -0800 Received: from kbuild by e357b3ef1427 with local (Exim 4.92) (envelope-from ) id 1n53RD-000GVK-Rf; Wed, 05 Jan 2022 10:22:35 +0000 Date: Wed, 5 Jan 2022 18:22:29 +0800 From: kernel test robot To: AliOS system security , catalin.marinas@arm.com, will@kernel.org Cc: kbuild-all@lists.01.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, AliOS system security Subject: Re: [PATCH] arm64: fix build error when use rodata_enabled Message-ID: <202201051817.4KPMZJag-lkp@intel.com> References: <1641352075-25200-1-git-send-email-alios_sys_security@linux.alibaba.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1641352075-25200-1-git-send-email-alios_sys_security@linux.alibaba.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220105_022240_507709_4A12C612 X-CRM114-Status: GOOD ( 17.41 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi AliOS, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on arm64/for-next/core] [also build test WARNING on v5.16-rc8 next-20220105] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/AliOS-system-security/arm64-fix-build-error-when-use-rodata_enabled/20220105-110838 base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core config: arm64-randconfig-s032-20220105 (https://download.01.org/0day-ci/archive/20220105/202201051817.4KPMZJag-lkp@intel.com/config) compiler: aarch64-linux-gcc (GCC) 11.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # apt-get install sparse # sparse version: v0.6.4-dirty # https://github.com/0day-ci/linux/commit/6af4245e93d33d4f4a79a560a707539be994f73e git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review AliOS-system-security/arm64-fix-build-error-when-use-rodata_enabled/20220105-110838 git checkout 6af4245e93d33d4f4a79a560a707539be994f73e # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm64 SHELL=/bin/bash arch/arm64/mm/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): arch/arm64/mm/mmu.c: In function 'map_entry_trampoline': >> arch/arm64/mm/mmu.c:627:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] 627 | phys_addr_t pa_start = __pa_symbol(__entry_tramp_text_start); | ^~~~~~~~~~~ vim +627 arch/arm64/mm/mmu.c 28b066da69b937 Ard Biesheuvel 2017-03-09 618 51a0048beb4496 Will Deacon 2017-11-14 619 #ifdef CONFIG_UNMAP_KERNEL_AT_EL0 51a0048beb4496 Will Deacon 2017-11-14 620 static int __init map_entry_trampoline(void) 51a0048beb4496 Will Deacon 2017-11-14 621 { 6af4245e93d33d AliOS system security 2022-01-05 622 pgprot_t prot = PAGE_KERNEL_EXEC; 6af4245e93d33d AliOS system security 2022-01-05 623 #if defined(CONFIG_STRICT_KERNEL_RWX) || defined(CONFIG_STRICT_MODULE_RWX) 6af4245e93d33d AliOS system security 2022-01-05 624 if (rodata_enabled) 6af4245e93d33d AliOS system security 2022-01-05 625 prot = PAGE_KERNEL_ROX; 6af4245e93d33d AliOS system security 2022-01-05 626 #endif 51a0048beb4496 Will Deacon 2017-11-14 @627 phys_addr_t pa_start = __pa_symbol(__entry_tramp_text_start); 51a0048beb4496 Will Deacon 2017-11-14 628 51a0048beb4496 Will Deacon 2017-11-14 629 /* The trampoline is always mapped and can therefore be global */ 51a0048beb4496 Will Deacon 2017-11-14 630 pgprot_val(prot) &= ~PTE_NG; 51a0048beb4496 Will Deacon 2017-11-14 631 51a0048beb4496 Will Deacon 2017-11-14 632 /* Map only the text into the trampoline page table */ 51a0048beb4496 Will Deacon 2017-11-14 633 memset(tramp_pg_dir, 0, PGD_SIZE); 51a0048beb4496 Will Deacon 2017-11-14 634 __create_pgd_mapping(tramp_pg_dir, pa_start, TRAMP_VALIAS, PAGE_SIZE, 475ba3fc194b64 Will Deacon 2019-04-08 635 prot, __pgd_pgtable_alloc, 0); 51a0048beb4496 Will Deacon 2017-11-14 636 6c27c4082f4f70 Will Deacon 2017-12-06 637 /* Map both the text and data into the kernel page table */ 51a0048beb4496 Will Deacon 2017-11-14 638 __set_fixmap(FIX_ENTRY_TRAMP_TEXT, pa_start, prot); 6c27c4082f4f70 Will Deacon 2017-12-06 639 if (IS_ENABLED(CONFIG_RANDOMIZE_BASE)) { 6c27c4082f4f70 Will Deacon 2017-12-06 640 extern char __entry_tramp_data_start[]; 6c27c4082f4f70 Will Deacon 2017-12-06 641 6c27c4082f4f70 Will Deacon 2017-12-06 642 __set_fixmap(FIX_ENTRY_TRAMP_DATA, 6c27c4082f4f70 Will Deacon 2017-12-06 643 __pa_symbol(__entry_tramp_data_start), 6c27c4082f4f70 Will Deacon 2017-12-06 644 PAGE_KERNEL_RO); 6c27c4082f4f70 Will Deacon 2017-12-06 645 } 6c27c4082f4f70 Will Deacon 2017-12-06 646 51a0048beb4496 Will Deacon 2017-11-14 647 return 0; 51a0048beb4496 Will Deacon 2017-11-14 648 } 51a0048beb4496 Will Deacon 2017-11-14 649 core_initcall(map_entry_trampoline); 51a0048beb4496 Will Deacon 2017-11-14 650 #endif 51a0048beb4496 Will Deacon 2017-11-14 651 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel