* [akpm-mm:mm-unstable 321/323] include/linux/pgtable.h:1713:10: error: redefinition of 'vm_get_page_prot'
@ 2022-07-02 18:16 kernel test robot
2022-07-02 20:59 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2022-07-02 18:16 UTC (permalink / raw)
To: Anshuman Khandual
Cc: kbuild-all, linux-kernel, Andrew Morton, Linux Memory Management List
tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
head: 706370e5c2ea7bb4544eee6e1172c4d68117a526
commit: 5b0de55b24615b5f5f600e2a61c297a0432a5e82 [321/323] sh/mm: enable ARCH_HAS_VM_GET_PAGE_PROT
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20220703/202207030224.tqi3q1Wh-lkp@intel.com/config)
compiler: sh4-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://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/commit/?id=5b0de55b24615b5f5f600e2a61c297a0432a5e82
git remote add akpm-mm https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git
git fetch --no-tags akpm-mm mm-unstable
git checkout 5b0de55b24615b5f5f600e2a61c297a0432a5e82
# 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=sh SHELL=/bin/bash
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 >>):
In file included from arch/sh/include/asm/io.h:21,
from include/linux/io.h:13,
from arch/sh/mm/mmap.c:10:
>> include/linux/pgtable.h:1713:10: error: redefinition of 'vm_get_page_prot'
1713 | pgprot_t vm_get_page_prot(unsigned long vm_flags) \
| ^~~~~~~~~~~~~~~~
arch/sh/mm/mmap.c:184:1: note: in expansion of macro 'DECLARE_VM_GET_PAGE_PROT'
184 | DECLARE_VM_GET_PAGE_PROT
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/sh/mm/mmap.c:11:
include/linux/mm.h:2864:24: note: previous definition of 'vm_get_page_prot' with type 'pgprot_t(long unsigned int)'
2864 | static inline pgprot_t vm_get_page_prot(unsigned long vm_flags)
| ^~~~~~~~~~~~~~~~
vim +/vm_get_page_prot +1713 include/linux/pgtable.h
c0f8aa4fa815da Daniel Axtens 2021-06-28 1691
d3af9262355115 Anshuman Khandual 2022-06-30 1692 /* description of effects of mapping type and prot in current implementation.
d3af9262355115 Anshuman Khandual 2022-06-30 1693 * this is due to the limited x86 page protection hardware. The expected
d3af9262355115 Anshuman Khandual 2022-06-30 1694 * behavior is in parens:
d3af9262355115 Anshuman Khandual 2022-06-30 1695 *
d3af9262355115 Anshuman Khandual 2022-06-30 1696 * map_type prot
d3af9262355115 Anshuman Khandual 2022-06-30 1697 * PROT_NONE PROT_READ PROT_WRITE PROT_EXEC
d3af9262355115 Anshuman Khandual 2022-06-30 1698 * MAP_SHARED r: (no) no r: (yes) yes r: (no) yes r: (no) yes
d3af9262355115 Anshuman Khandual 2022-06-30 1699 * w: (no) no w: (no) no w: (yes) yes w: (no) no
d3af9262355115 Anshuman Khandual 2022-06-30 1700 * x: (no) no x: (no) yes x: (no) yes x: (yes) yes
d3af9262355115 Anshuman Khandual 2022-06-30 1701 *
d3af9262355115 Anshuman Khandual 2022-06-30 1702 * MAP_PRIVATE r: (no) no r: (yes) yes r: (no) yes r: (no) yes
d3af9262355115 Anshuman Khandual 2022-06-30 1703 * w: (no) no w: (no) no w: (copy) copy w: (no) no
d3af9262355115 Anshuman Khandual 2022-06-30 1704 * x: (no) no x: (no) yes x: (no) yes x: (yes) yes
d3af9262355115 Anshuman Khandual 2022-06-30 1705 *
d3af9262355115 Anshuman Khandual 2022-06-30 1706 * On arm64, PROT_EXEC has the following behaviour for both MAP_SHARED and
d3af9262355115 Anshuman Khandual 2022-06-30 1707 * MAP_PRIVATE (with Enhanced PAN supported):
d3af9262355115 Anshuman Khandual 2022-06-30 1708 * r: (no) no
d3af9262355115 Anshuman Khandual 2022-06-30 1709 * w: (no) no
d3af9262355115 Anshuman Khandual 2022-06-30 1710 * x: (yes) yes
d3af9262355115 Anshuman Khandual 2022-06-30 1711 */
d3af9262355115 Anshuman Khandual 2022-06-30 1712 #define DECLARE_VM_GET_PAGE_PROT \
d3af9262355115 Anshuman Khandual 2022-06-30 @1713 pgprot_t vm_get_page_prot(unsigned long vm_flags) \
d3af9262355115 Anshuman Khandual 2022-06-30 1714 { \
d3af9262355115 Anshuman Khandual 2022-06-30 1715 return protection_map[vm_flags & \
d3af9262355115 Anshuman Khandual 2022-06-30 1716 (VM_READ | VM_WRITE | VM_EXEC | VM_SHARED)]; \
d3af9262355115 Anshuman Khandual 2022-06-30 1717 } \
d3af9262355115 Anshuman Khandual 2022-06-30 1718 EXPORT_SYMBOL(vm_get_page_prot);
d3af9262355115 Anshuman Khandual 2022-06-30 1719
:::::: The code at line 1713 was first introduced by commit
:::::: d3af92623551153853497bf6434b9b4843ab78e1 mm/mmap: define DECLARE_VM_GET_PAGE_PROT
:::::: TO: Anshuman Khandual <anshuman.khandual@arm.com>
:::::: CC: akpm <akpm@linux-foundation.org>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [akpm-mm:mm-unstable 321/323] include/linux/pgtable.h:1713:10: error: redefinition of 'vm_get_page_prot'
2022-07-02 18:16 [akpm-mm:mm-unstable 321/323] include/linux/pgtable.h:1713:10: error: redefinition of 'vm_get_page_prot' kernel test robot
@ 2022-07-02 20:59 ` Andrew Morton
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2022-07-02 20:59 UTC (permalink / raw)
To: kernel test robot
Cc: Anshuman Khandual, kbuild-all, linux-kernel,
Linux Memory Management List
On Sun, 3 Jul 2022 02:16:09 +0800 kernel test robot <lkp@intel.com> wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
> head: 706370e5c2ea7bb4544eee6e1172c4d68117a526
> commit: 5b0de55b24615b5f5f600e2a61c297a0432a5e82 [321/323] sh/mm: enable ARCH_HAS_VM_GET_PAGE_PROT
> config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20220703/202207030224.tqi3q1Wh-lkp@intel.com/config)
> compiler: sh4-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://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/commit/?id=5b0de55b24615b5f5f600e2a61c297a0432a5e82
> git remote add akpm-mm https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git
> git fetch --no-tags akpm-mm mm-unstable
> git checkout 5b0de55b24615b5f5f600e2a61c297a0432a5e82
> # 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=sh SHELL=/bin/bash
>
> 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 >>):
>
> In file included from arch/sh/include/asm/io.h:21,
> from include/linux/io.h:13,
> from arch/sh/mm/mmap.c:10:
> >> include/linux/pgtable.h:1713:10: error: redefinition of 'vm_get_page_prot'
> 1713 | pgprot_t vm_get_page_prot(unsigned long vm_flags) \
> | ^~~~~~~~~~~~~~~~
> arch/sh/mm/mmap.c:184:1: note: in expansion of macro 'DECLARE_VM_GET_PAGE_PROT'
> 184 | DECLARE_VM_GET_PAGE_PROT
> | ^~~~~~~~~~~~~~~~~~~~~~~~
> In file included from arch/sh/mm/mmap.c:11:
> include/linux/mm.h:2864:24: note: previous definition of 'vm_get_page_prot' with type 'pgprot_t(long unsigned int)'
> 2864 | static inline pgprot_t vm_get_page_prot(unsigned long vm_flags)
> | ^~~~~~~~~~~~~~~~
>
um, OK, CONFIG_MMU=n. I'll let Anshuman ponder this one.
btw, that macro should be called DEFINE_VM_GET_PAGE_PROT - it provides
a definition, not a declaration.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [akpm-mm:mm-unstable 321/323] include/linux/pgtable.h:1713:10: error: redefinition of 'vm_get_page_prot'
@ 2022-07-02 20:59 ` Andrew Morton
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2022-07-02 20:59 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2380 bytes --]
On Sun, 3 Jul 2022 02:16:09 +0800 kernel test robot <lkp@intel.com> wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
> head: 706370e5c2ea7bb4544eee6e1172c4d68117a526
> commit: 5b0de55b24615b5f5f600e2a61c297a0432a5e82 [321/323] sh/mm: enable ARCH_HAS_VM_GET_PAGE_PROT
> config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20220703/202207030224.tqi3q1Wh-lkp(a)intel.com/config)
> compiler: sh4-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://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/commit/?id=5b0de55b24615b5f5f600e2a61c297a0432a5e82
> git remote add akpm-mm https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git
> git fetch --no-tags akpm-mm mm-unstable
> git checkout 5b0de55b24615b5f5f600e2a61c297a0432a5e82
> # 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=sh SHELL=/bin/bash
>
> 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 >>):
>
> In file included from arch/sh/include/asm/io.h:21,
> from include/linux/io.h:13,
> from arch/sh/mm/mmap.c:10:
> >> include/linux/pgtable.h:1713:10: error: redefinition of 'vm_get_page_prot'
> 1713 | pgprot_t vm_get_page_prot(unsigned long vm_flags) \
> | ^~~~~~~~~~~~~~~~
> arch/sh/mm/mmap.c:184:1: note: in expansion of macro 'DECLARE_VM_GET_PAGE_PROT'
> 184 | DECLARE_VM_GET_PAGE_PROT
> | ^~~~~~~~~~~~~~~~~~~~~~~~
> In file included from arch/sh/mm/mmap.c:11:
> include/linux/mm.h:2864:24: note: previous definition of 'vm_get_page_prot' with type 'pgprot_t(long unsigned int)'
> 2864 | static inline pgprot_t vm_get_page_prot(unsigned long vm_flags)
> | ^~~~~~~~~~~~~~~~
>
um, OK, CONFIG_MMU=n. I'll let Anshuman ponder this one.
btw, that macro should be called DEFINE_VM_GET_PAGE_PROT - it provides
a definition, not a declaration.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-07-02 20:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-02 18:16 [akpm-mm:mm-unstable 321/323] include/linux/pgtable.h:1713:10: error: redefinition of 'vm_get_page_prot' kernel test robot
2022-07-02 20:59 ` Andrew Morton
2022-07-02 20:59 ` Andrew Morton
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.