From: Anshuman Khandual <anshuman.khandual@arm.com> To: kernel test robot <lkp@intel.com>, linux-mm@kvack.org Cc: kbuild-all@lists.01.org, Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org Subject: Re: [PATCH V2 2/2] mm/mmap: Drop generic protection_map[] array Date: Tue, 14 Jun 2022 07:50:34 +0530 [thread overview] Message-ID: <27f29bb6-f82a-eefe-4774-0d2d1872482a@arm.com> (raw) In-Reply-To: <202206131716.tDWk9rLs-lkp@intel.com> On 6/13/22 15:01, kernel test robot wrote: > Hi Anshuman, > > Thank you for the patch! Yet something to improve: > > [auto build test ERROR on akpm-mm/mm-everything] > > url: https://github.com/intel-lab-lkp/linux/commits/Anshuman-Khandual/mm-mmap-Drop-__SXXX-__PXXX-macros-from-across-platforms/20220613-133456 > base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything > config: riscv-randconfig-r042-20220613 (https://download.01.org/0day-ci/archive/20220613/202206131716.tDWk9rLs-lkp@intel.com/config) > compiler: riscv64-linux-gcc (GCC) 11.3.0 > reproduce (this is a W=1 build): > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # https://github.com/intel-lab-lkp/linux/commit/696f81b49f7b6316f652d795da4c0008efef4487 > git remote add linux-review https://github.com/intel-lab-lkp/linux > git fetch --no-tags linux-review Anshuman-Khandual/mm-mmap-Drop-__SXXX-__PXXX-macros-from-across-platforms/20220613-133456 > git checkout 696f81b49f7b6316f652d795da4c0008efef4487 > # save the config file > mkdir build_dir && cp config build_dir/.config > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash arch/riscv/mm/ > > If you fix the issue, kindly add following tag where applicable > Reported-by: kernel test robot <lkp@intel.com> > > All errors (new ones prefixed by >>): > >>> arch/riscv/mm/init.c:1224:59: error: 'PAGE_NONE' undeclared here (not in a function); did you mean 'SIGEV_NONE'? > 1224 | [VM_NONE] = PAGE_NONE, > | ^~~~~~~~~ > | SIGEV_NONE >>> arch/riscv/mm/init.c:1225:59: error: 'PAGE_READ' undeclared here (not in a function); did you mean 'MAY_READ'? > 1225 | [VM_READ] = PAGE_READ, > | ^~~~~~~~~ > | MAY_READ >>> arch/riscv/mm/init.c:1226:59: error: 'PAGE_COPY' undeclared here (not in a function) > 1226 | [VM_WRITE] = PAGE_COPY, > | ^~~~~~~~~ >>> arch/riscv/mm/init.c:1228:59: error: 'PAGE_EXEC' undeclared here (not in a function); did you mean 'TASK_EXEC'? > 1228 | [VM_EXEC] = PAGE_EXEC, > | ^~~~~~~~~ > | TASK_EXEC >>> arch/riscv/mm/init.c:1229:59: error: 'PAGE_READ_EXEC' undeclared here (not in a function); did you mean 'PAGE_KERNEL_EXEC'? > 1229 | [VM_EXEC | VM_READ] = PAGE_READ_EXEC, > | ^~~~~~~~~~~~~~ > | PAGE_KERNEL_EXEC >>> arch/riscv/mm/init.c:1230:59: error: 'PAGE_COPY_EXEC' undeclared here (not in a function); did you mean 'PAGE_KERNEL_EXEC'? > 1230 | [VM_EXEC | VM_WRITE] = PAGE_COPY_EXEC, > | ^~~~~~~~~~~~~~ > | PAGE_KERNEL_EXEC >>> arch/riscv/mm/init.c:1231:59: error: 'PAGE_COPY_READ_EXEC' undeclared here (not in a function) > 1231 | [VM_EXEC | VM_WRITE | VM_READ] = PAGE_COPY_READ_EXEC, > | ^~~~~~~~~~~~~~~~~~~ >>> arch/riscv/mm/init.c:1238:59: error: 'PAGE_SHARED_EXEC' undeclared here (not in a function); did you mean 'PAGE_SHARED'? > 1238 | [VM_SHARED | VM_EXEC | VM_WRITE] = PAGE_SHARED_EXEC, > | ^~~~~~~~~~~~~~~~ > | PAGE_SHARED > > > vim +1224 arch/riscv/mm/init.c > > 1222 > 1223 pgprot_t protection_map[16] __ro_after_init = { >> 1224 [VM_NONE] = PAGE_NONE, >> 1225 [VM_READ] = PAGE_READ, >> 1226 [VM_WRITE] = PAGE_COPY, > 1227 [VM_WRITE | VM_READ] = PAGE_COPY, >> 1228 [VM_EXEC] = PAGE_EXEC, >> 1229 [VM_EXEC | VM_READ] = PAGE_READ_EXEC, >> 1230 [VM_EXEC | VM_WRITE] = PAGE_COPY_EXEC, >> 1231 [VM_EXEC | VM_WRITE | VM_READ] = PAGE_COPY_READ_EXEC, > 1232 [VM_SHARED] = PAGE_NONE, > 1233 [VM_SHARED | VM_READ] = PAGE_READ, > 1234 [VM_SHARED | VM_WRITE] = PAGE_SHARED, > 1235 [VM_SHARED | VM_WRITE | VM_READ] = PAGE_SHARED, > 1236 [VM_SHARED | VM_EXEC] = PAGE_EXEC, > 1237 [VM_SHARED | VM_EXEC | VM_READ] = PAGE_READ_EXEC, >> 1238 [VM_SHARED | VM_EXEC | VM_WRITE] = PAGE_SHARED_EXEC, > PAGE_XXXX[_YYYY] symbols on riscv are wrapped around with CONFIG_MMU, just moving protection_map[] to appropriate place with CONFIG_MMU assert solves this build problem. diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c index 5e4ed43f0d79..84ee476ba4a4 100644 --- a/arch/riscv/mm/init.c +++ b/arch/riscv/mm/init.c @@ -288,6 +288,25 @@ static pmd_t __maybe_unused early_dtb_pmd[PTRS_PER_PMD] __initdata __aligned(PAG #define early_pg_dir ((pgd_t *)XIP_FIXUP(early_pg_dir)) #endif /* CONFIG_XIP_KERNEL */ +pgprot_t protection_map[16] __ro_after_init = { + [VM_NONE] = PAGE_NONE, + [VM_READ] = PAGE_READ, + [VM_WRITE] = PAGE_COPY, + [VM_WRITE | VM_READ] = PAGE_COPY, + [VM_EXEC] = PAGE_EXEC, + [VM_EXEC | VM_READ] = PAGE_READ_EXEC, + [VM_EXEC | VM_WRITE] = PAGE_COPY_EXEC, + [VM_EXEC | VM_WRITE | VM_READ] = PAGE_COPY_READ_EXEC, + [VM_SHARED] = PAGE_NONE, + [VM_SHARED | VM_READ] = PAGE_READ, + [VM_SHARED | VM_WRITE] = PAGE_SHARED, + [VM_SHARED | VM_WRITE | VM_READ] = PAGE_SHARED, + [VM_SHARED | VM_EXEC] = PAGE_EXEC, + [VM_SHARED | VM_EXEC | VM_READ] = PAGE_READ_EXEC, + [VM_SHARED | VM_EXEC | VM_WRITE] = PAGE_SHARED_EXEC, + [VM_SHARED | VM_EXEC | VM_WRITE | VM_READ] = PAGE_SHARED_EXEC +}; + void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t prot) { unsigned long addr = __fix_to_virt(idx); @@ -1219,22 +1238,3 @@ int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node, return vmemmap_populate_basepages(start, end, node, NULL); } #endif - -pgprot_t protection_map[16] __ro_after_init = { - [VM_NONE] = PAGE_NONE, - [VM_READ] = PAGE_READ, - [VM_WRITE] = PAGE_COPY, - [VM_WRITE | VM_READ] = PAGE_COPY, - [VM_EXEC] = PAGE_EXEC, - [VM_EXEC | VM_READ] = PAGE_READ_EXEC, - [VM_EXEC | VM_WRITE] = PAGE_COPY_EXEC, - [VM_EXEC | VM_WRITE | VM_READ] = PAGE_COPY_READ_EXEC, - [VM_SHARED] = PAGE_NONE, - [VM_SHARED | VM_READ] = PAGE_READ, - [VM_SHARED | VM_WRITE] = PAGE_SHARED, - [VM_SHARED | VM_WRITE | VM_READ] = PAGE_SHARED, - [VM_SHARED | VM_EXEC] = PAGE_EXEC, - [VM_SHARED | VM_EXEC | VM_READ] = PAGE_READ_EXEC, - [VM_SHARED | VM_EXEC | VM_WRITE] = PAGE_SHARED_EXEC, - [VM_SHARED | VM_EXEC | VM_WRITE | VM_READ] = PAGE_SHARED_EXEC -};
WARNING: multiple messages have this Message-ID (diff)
From: Anshuman Khandual <anshuman.khandual@arm.com> To: kbuild-all@lists.01.org Subject: Re: [PATCH V2 2/2] mm/mmap: Drop generic protection_map[] array Date: Tue, 14 Jun 2022 07:50:34 +0530 [thread overview] Message-ID: <27f29bb6-f82a-eefe-4774-0d2d1872482a@arm.com> (raw) In-Reply-To: <202206131716.tDWk9rLs-lkp@intel.com> [-- Attachment #1: Type: text/plain, Size: 8516 bytes --] On 6/13/22 15:01, kernel test robot wrote: > Hi Anshuman, > > Thank you for the patch! Yet something to improve: > > [auto build test ERROR on akpm-mm/mm-everything] > > url: https://github.com/intel-lab-lkp/linux/commits/Anshuman-Khandual/mm-mmap-Drop-__SXXX-__PXXX-macros-from-across-platforms/20220613-133456 > base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything > config: riscv-randconfig-r042-20220613 (https://download.01.org/0day-ci/archive/20220613/202206131716.tDWk9rLs-lkp(a)intel.com/config) > compiler: riscv64-linux-gcc (GCC) 11.3.0 > reproduce (this is a W=1 build): > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # https://github.com/intel-lab-lkp/linux/commit/696f81b49f7b6316f652d795da4c0008efef4487 > git remote add linux-review https://github.com/intel-lab-lkp/linux > git fetch --no-tags linux-review Anshuman-Khandual/mm-mmap-Drop-__SXXX-__PXXX-macros-from-across-platforms/20220613-133456 > git checkout 696f81b49f7b6316f652d795da4c0008efef4487 > # save the config file > mkdir build_dir && cp config build_dir/.config > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash arch/riscv/mm/ > > If you fix the issue, kindly add following tag where applicable > Reported-by: kernel test robot <lkp@intel.com> > > All errors (new ones prefixed by >>): > >>> arch/riscv/mm/init.c:1224:59: error: 'PAGE_NONE' undeclared here (not in a function); did you mean 'SIGEV_NONE'? > 1224 | [VM_NONE] = PAGE_NONE, > | ^~~~~~~~~ > | SIGEV_NONE >>> arch/riscv/mm/init.c:1225:59: error: 'PAGE_READ' undeclared here (not in a function); did you mean 'MAY_READ'? > 1225 | [VM_READ] = PAGE_READ, > | ^~~~~~~~~ > | MAY_READ >>> arch/riscv/mm/init.c:1226:59: error: 'PAGE_COPY' undeclared here (not in a function) > 1226 | [VM_WRITE] = PAGE_COPY, > | ^~~~~~~~~ >>> arch/riscv/mm/init.c:1228:59: error: 'PAGE_EXEC' undeclared here (not in a function); did you mean 'TASK_EXEC'? > 1228 | [VM_EXEC] = PAGE_EXEC, > | ^~~~~~~~~ > | TASK_EXEC >>> arch/riscv/mm/init.c:1229:59: error: 'PAGE_READ_EXEC' undeclared here (not in a function); did you mean 'PAGE_KERNEL_EXEC'? > 1229 | [VM_EXEC | VM_READ] = PAGE_READ_EXEC, > | ^~~~~~~~~~~~~~ > | PAGE_KERNEL_EXEC >>> arch/riscv/mm/init.c:1230:59: error: 'PAGE_COPY_EXEC' undeclared here (not in a function); did you mean 'PAGE_KERNEL_EXEC'? > 1230 | [VM_EXEC | VM_WRITE] = PAGE_COPY_EXEC, > | ^~~~~~~~~~~~~~ > | PAGE_KERNEL_EXEC >>> arch/riscv/mm/init.c:1231:59: error: 'PAGE_COPY_READ_EXEC' undeclared here (not in a function) > 1231 | [VM_EXEC | VM_WRITE | VM_READ] = PAGE_COPY_READ_EXEC, > | ^~~~~~~~~~~~~~~~~~~ >>> arch/riscv/mm/init.c:1238:59: error: 'PAGE_SHARED_EXEC' undeclared here (not in a function); did you mean 'PAGE_SHARED'? > 1238 | [VM_SHARED | VM_EXEC | VM_WRITE] = PAGE_SHARED_EXEC, > | ^~~~~~~~~~~~~~~~ > | PAGE_SHARED > > > vim +1224 arch/riscv/mm/init.c > > 1222 > 1223 pgprot_t protection_map[16] __ro_after_init = { >> 1224 [VM_NONE] = PAGE_NONE, >> 1225 [VM_READ] = PAGE_READ, >> 1226 [VM_WRITE] = PAGE_COPY, > 1227 [VM_WRITE | VM_READ] = PAGE_COPY, >> 1228 [VM_EXEC] = PAGE_EXEC, >> 1229 [VM_EXEC | VM_READ] = PAGE_READ_EXEC, >> 1230 [VM_EXEC | VM_WRITE] = PAGE_COPY_EXEC, >> 1231 [VM_EXEC | VM_WRITE | VM_READ] = PAGE_COPY_READ_EXEC, > 1232 [VM_SHARED] = PAGE_NONE, > 1233 [VM_SHARED | VM_READ] = PAGE_READ, > 1234 [VM_SHARED | VM_WRITE] = PAGE_SHARED, > 1235 [VM_SHARED | VM_WRITE | VM_READ] = PAGE_SHARED, > 1236 [VM_SHARED | VM_EXEC] = PAGE_EXEC, > 1237 [VM_SHARED | VM_EXEC | VM_READ] = PAGE_READ_EXEC, >> 1238 [VM_SHARED | VM_EXEC | VM_WRITE] = PAGE_SHARED_EXEC, > PAGE_XXXX[_YYYY] symbols on riscv are wrapped around with CONFIG_MMU, just moving protection_map[] to appropriate place with CONFIG_MMU assert solves this build problem. diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c index 5e4ed43f0d79..84ee476ba4a4 100644 --- a/arch/riscv/mm/init.c +++ b/arch/riscv/mm/init.c @@ -288,6 +288,25 @@ static pmd_t __maybe_unused early_dtb_pmd[PTRS_PER_PMD] __initdata __aligned(PAG #define early_pg_dir ((pgd_t *)XIP_FIXUP(early_pg_dir)) #endif /* CONFIG_XIP_KERNEL */ +pgprot_t protection_map[16] __ro_after_init = { + [VM_NONE] = PAGE_NONE, + [VM_READ] = PAGE_READ, + [VM_WRITE] = PAGE_COPY, + [VM_WRITE | VM_READ] = PAGE_COPY, + [VM_EXEC] = PAGE_EXEC, + [VM_EXEC | VM_READ] = PAGE_READ_EXEC, + [VM_EXEC | VM_WRITE] = PAGE_COPY_EXEC, + [VM_EXEC | VM_WRITE | VM_READ] = PAGE_COPY_READ_EXEC, + [VM_SHARED] = PAGE_NONE, + [VM_SHARED | VM_READ] = PAGE_READ, + [VM_SHARED | VM_WRITE] = PAGE_SHARED, + [VM_SHARED | VM_WRITE | VM_READ] = PAGE_SHARED, + [VM_SHARED | VM_EXEC] = PAGE_EXEC, + [VM_SHARED | VM_EXEC | VM_READ] = PAGE_READ_EXEC, + [VM_SHARED | VM_EXEC | VM_WRITE] = PAGE_SHARED_EXEC, + [VM_SHARED | VM_EXEC | VM_WRITE | VM_READ] = PAGE_SHARED_EXEC +}; + void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t prot) { unsigned long addr = __fix_to_virt(idx); @@ -1219,22 +1238,3 @@ int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node, return vmemmap_populate_basepages(start, end, node, NULL); } #endif - -pgprot_t protection_map[16] __ro_after_init = { - [VM_NONE] = PAGE_NONE, - [VM_READ] = PAGE_READ, - [VM_WRITE] = PAGE_COPY, - [VM_WRITE | VM_READ] = PAGE_COPY, - [VM_EXEC] = PAGE_EXEC, - [VM_EXEC | VM_READ] = PAGE_READ_EXEC, - [VM_EXEC | VM_WRITE] = PAGE_COPY_EXEC, - [VM_EXEC | VM_WRITE | VM_READ] = PAGE_COPY_READ_EXEC, - [VM_SHARED] = PAGE_NONE, - [VM_SHARED | VM_READ] = PAGE_READ, - [VM_SHARED | VM_WRITE] = PAGE_SHARED, - [VM_SHARED | VM_WRITE | VM_READ] = PAGE_SHARED, - [VM_SHARED | VM_EXEC] = PAGE_EXEC, - [VM_SHARED | VM_EXEC | VM_READ] = PAGE_READ_EXEC, - [VM_SHARED | VM_EXEC | VM_WRITE] = PAGE_SHARED_EXEC, - [VM_SHARED | VM_EXEC | VM_WRITE | VM_READ] = PAGE_SHARED_EXEC -};
next prev parent reply other threads:[~2022-06-14 2:43 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-06-13 5:33 [PATCH V2 0/2] mm/mmap: Drop __SXXX/__PXXX macros from across platforms Anshuman Khandual 2022-06-13 5:33 ` [PATCH V2 1/2] mm/mmap: Restrict generic protection_map[] array visibility Anshuman Khandual 2022-06-13 5:33 ` [PATCH V2 2/2] mm/mmap: Drop generic protection_map[] array Anshuman Khandual 2022-06-13 9:31 ` kernel test robot 2022-06-14 2:20 ` Anshuman Khandual [this message] 2022-06-14 2:20 ` Anshuman Khandual 2022-06-13 11:13 ` kernel test robot 2022-06-14 3:05 ` Anshuman Khandual 2022-06-14 3:05 ` Anshuman Khandual 2022-06-15 13:15 ` [PATCH V2 0/2] mm/mmap: Drop __SXXX/__PXXX macros from across platforms Christoph Hellwig
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=27f29bb6-f82a-eefe-4774-0d2d1872482a@arm.com \ --to=anshuman.khandual@arm.com \ --cc=akpm@linux-foundation.org \ --cc=kbuild-all@lists.01.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mm@kvack.org \ --cc=lkp@intel.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.