tree:
https://github.com/weiny2/linux-kernel.git tip-pks-v4.4-5.12-rc
head: 399765b19fddc5de52906b804070a156c7617798
commit: f6415574e4346a0c71c33ff2de85f851c94d1b27 [12/16] kmap: Add stray access protection
for device pages
config: powerpc64-randconfig-r002-20210309 (attached as .config)
compiler: clang version 13.0.0 (
https://github.com/llvm/llvm-project
cd9a69289c7825d54450cb6829fef2c8e0f1963a)
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
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
#
https://github.com/weiny2/linux-kernel/commit/f6415574e4346a0c71c33ff2de8...
git remote add weiny2
https://github.com/weiny2/linux-kernel.git
git fetch --no-tags weiny2 tip-pks-v4.4-5.12-rc
git checkout f6415574e4346a0c71c33ff2de85f851c94d1b27
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
In file included from arch/powerpc/kernel/asm-offsets.c:21:
In file included from include/linux/mman.h:9:
In file included from include/uapi/linux/mman.h:5:
In file included from arch/powerpc/include/asm/mman.h:7:
In file included from arch/powerpc/include/uapi/asm/mman.h:11:
> include/uapi/asm-generic/mman-common.h:80:9: warning:
'PKEY_ACCESS_MASK' macro redefined [-Wmacro-redefined]
#define
PKEY_ACCESS_MASK (PKEY_DISABLE_ACCESS |\
^
arch/powerpc/include/asm/pkeys.h:22:9: note: previous definition is here
#define PKEY_ACCESS_MASK (PKEY_DISABLE_ACCESS | \
^
1 warning generated.
--
In file included from arch/powerpc/kernel/syscalls.c:27:
In file included from include/linux/mman.h:9:
In file included from include/uapi/linux/mman.h:5:
In file included from arch/powerpc/include/asm/mman.h:7:
In file included from arch/powerpc/include/uapi/asm/mman.h:11:
> include/uapi/asm-generic/mman-common.h:80:9: error:
'PKEY_ACCESS_MASK' macro redefined [-Werror,-Wmacro-redefined]
#define
PKEY_ACCESS_MASK (PKEY_DISABLE_ACCESS |\
^
arch/powerpc/include/asm/pkeys.h:22:9: note: previous definition is here
#define PKEY_ACCESS_MASK (PKEY_DISABLE_ACCESS | \
^
1 error generated.
--
In file included from arch/powerpc/kernel/sys_ppc32.c:28:
In file included from include/linux/mman.h:9:
In file included from include/uapi/linux/mman.h:5:
In file included from arch/powerpc/include/asm/mman.h:7:
In file included from arch/powerpc/include/uapi/asm/mman.h:11:
> include/uapi/asm-generic/mman-common.h:80:9: error:
'PKEY_ACCESS_MASK' macro redefined [-Werror,-Wmacro-redefined]
#define
PKEY_ACCESS_MASK (PKEY_DISABLE_ACCESS |\
^
arch/powerpc/include/asm/pkeys.h:22:9: note: previous definition is here
#define PKEY_ACCESS_MASK (PKEY_DISABLE_ACCESS | \
^
arch/powerpc/kernel/sys_ppc32.c:51:15: error: no previous prototype for function
'compat_sys_mmap2' [-Werror,-Wmissing-prototypes]
unsigned long compat_sys_mmap2(unsigned long addr, size_t len,
^
arch/powerpc/kernel/sys_ppc32.c:51:1: note: declare 'static' if the function is
not intended to be used outside of this translation unit
unsigned long compat_sys_mmap2(unsigned long addr, size_t len,
^
static
arch/powerpc/kernel/sys_ppc32.c:71:16: error: no previous prototype for function
'compat_sys_pread64' [-Werror,-Wmissing-prototypes]
compat_ssize_t compat_sys_pread64(unsigned int fd, char __user *ubuf, compat_size_t
count,
^
arch/powerpc/kernel/sys_ppc32.c:71:1: note: declare 'static' if the function is
not intended to be used outside of this translation unit
compat_ssize_t compat_sys_pread64(unsigned int fd, char __user *ubuf, compat_size_t
count,
^
static
arch/powerpc/kernel/sys_ppc32.c:77:16: error: no previous prototype for function
'compat_sys_pwrite64' [-Werror,-Wmissing-prototypes]
compat_ssize_t compat_sys_pwrite64(unsigned int fd, const char __user *ubuf,
compat_size_t count,
^
arch/powerpc/kernel/sys_ppc32.c:77:1: note: declare 'static' if the function is
not intended to be used outside of this translation unit
compat_ssize_t compat_sys_pwrite64(unsigned int fd, const char __user *ubuf,
compat_size_t count,
^
static
arch/powerpc/kernel/sys_ppc32.c:83:16: error: no previous prototype for function
'compat_sys_readahead' [-Werror,-Wmissing-prototypes]
compat_ssize_t compat_sys_readahead(int fd, u32 r4, u32 offset1, u32 offset2, u32
count)
^
arch/powerpc/kernel/sys_ppc32.c:83:1: note: declare 'static' if the function is
not intended to be used outside of this translation unit
compat_ssize_t compat_sys_readahead(int fd, u32 r4, u32 offset1, u32 offset2, u32
count)
^
static
arch/powerpc/kernel/sys_ppc32.c:88:16: error: no previous prototype for function
'compat_sys_truncate64' [-Werror,-Wmissing-prototypes]
asmlinkage int compat_sys_truncate64(const char __user * path, u32 reg4,
^
arch/powerpc/kernel/sys_ppc32.c:88:12: note: declare 'static' if the function
is not intended to be used outside of this translation unit
asmlinkage int compat_sys_truncate64(const char __user * path, u32 reg4,
^
static
arch/powerpc/kernel/sys_ppc32.c:94:17: error: no previous prototype for function
'compat_sys_fallocate' [-Werror,-Wmissing-prototypes]
asmlinkage long compat_sys_fallocate(int fd, int mode, u32 offset1, u32 offset2,
^
arch/powerpc/kernel/sys_ppc32.c:94:12: note: declare 'static' if the function
is not intended to be used outside of this translation unit
asmlinkage long compat_sys_fallocate(int fd, int mode, u32 offset1, u32 offset2,
^
static
arch/powerpc/kernel/sys_ppc32.c:101:16: error: no previous prototype for function
'compat_sys_ftruncate64' [-Werror,-Wmissing-prototypes]
asmlinkage int compat_sys_ftruncate64(unsigned int fd, u32 reg4, unsigned long len1,
^
arch/powerpc/kernel/sys_ppc32.c:101:12: note: declare 'static' if the function
is not intended to be used outside of this translation unit
asmlinkage int compat_sys_ftruncate64(unsigned int fd, u32 reg4, unsigned long len1,
^
static
arch/powerpc/kernel/sys_ppc32.c:107:6: error: no previous prototype for function
'ppc32_fadvise64' [-Werror,-Wmissing-prototypes]
long ppc32_fadvise64(int fd, u32 unused, u32 offset1, u32 offset2,
^
arch/powerpc/kernel/sys_ppc32.c:107:1: note: declare 'static' if the function
is not intended to be used outside of this translation unit
long ppc32_fadvise64(int fd, u32 unused, u32 offset1, u32 offset2,
^
static
arch/powerpc/kernel/sys_ppc32.c:114:17: error: no previous prototype for function
'compat_sys_sync_file_range2' [-Werror,-Wmissing-prototypes]
asmlinkage long compat_sys_sync_file_range2(int fd, unsigned int flags,
^
arch/powerpc/kernel/sys_ppc32.c:114:12: note: declare 'static' if the function
is not intended to be used outside of this translation unit
asmlinkage long compat_sys_sync_file_range2(int fd, unsigned int flags,
^
static
10 errors generated.
--
In file included from kernel/fork.c:41:
In file included from include/linux/mman.h:9:
In file included from include/uapi/linux/mman.h:5:
In file included from arch/powerpc/include/asm/mman.h:7:
In file included from arch/powerpc/include/uapi/asm/mman.h:11:
> include/uapi/asm-generic/mman-common.h:80:9: warning:
'PKEY_ACCESS_MASK' macro redefined [-Wmacro-redefined]
#define
PKEY_ACCESS_MASK (PKEY_DISABLE_ACCESS |\
^
arch/powerpc/include/asm/pkeys.h:22:9: note: previous definition is here
#define PKEY_ACCESS_MASK (PKEY_DISABLE_ACCESS | \
^
kernel/fork.c:161:13: warning: no previous prototype for function
'arch_release_task_struct' [-Wmissing-prototypes]
void __weak arch_release_task_struct(struct task_struct *tsk)
^
kernel/fork.c:161:1: note: declare 'static' if the function is not intended to
be used outside of this translation unit
void __weak arch_release_task_struct(struct task_struct *tsk)
^
static
kernel/fork.c:746:20: warning: no previous prototype for function
'arch_task_cache_init' [-Wmissing-prototypes]
void __init __weak arch_task_cache_init(void) { }
^
kernel/fork.c:746:1: note: declare 'static' if the function is not intended to
be used outside of this translation unit
void __init __weak arch_task_cache_init(void) { }
^
static
3 warnings generated.
--
In file included from kernel/events/core.c:43:
In file included from include/linux/mman.h:9:
In file included from include/uapi/linux/mman.h:5:
In file included from arch/powerpc/include/asm/mman.h:7:
In file included from arch/powerpc/include/uapi/asm/mman.h:11:
> include/uapi/asm-generic/mman-common.h:80:9: warning:
'PKEY_ACCESS_MASK' macro redefined [-Wmacro-redefined]
#define
PKEY_ACCESS_MASK (PKEY_DISABLE_ACCESS |\
^
arch/powerpc/include/asm/pkeys.h:22:9: note: previous definition is here
#define PKEY_ACCESS_MASK (PKEY_DISABLE_ACCESS | \
^
kernel/events/core.c:6524:6: warning: no previous prototype for function
'perf_pmu_snapshot_aux' [-Wmissing-prototypes]
long perf_pmu_snapshot_aux(struct perf_buffer *rb,
^
kernel/events/core.c:6524:1: note: declare 'static' if the function is not
intended to be used outside of this translation unit
long perf_pmu_snapshot_aux(struct perf_buffer *rb,
^
static
2 warnings generated.
--
In file included from arch/powerpc/kernel/asm-offsets.c:21:
In file included from include/linux/mman.h:9:
In file included from include/uapi/linux/mman.h:5:
In file included from arch/powerpc/include/asm/mman.h:7:
In file included from arch/powerpc/include/uapi/asm/mman.h:11:
> include/uapi/asm-generic/mman-common.h:80:9: warning:
'PKEY_ACCESS_MASK' macro redefined [-Wmacro-redefined]
#define
PKEY_ACCESS_MASK (PKEY_DISABLE_ACCESS |\
^
arch/powerpc/include/asm/pkeys.h:22:9: note: previous definition is here
#define PKEY_ACCESS_MASK (PKEY_DISABLE_ACCESS | \
^
1 warning generated.
vim +/PKEY_ACCESS_MASK +80 include/uapi/asm-generic/mman-common.h
5f6164f3092832 include/asm-generic/mman.h Michael S. Tsirkin 2006-02-15 77
e8c24d3a23a469 include/uapi/asm-generic/mman-common.h Dave Hansen 2016-07-29 78
#define PKEY_DISABLE_ACCESS 0x1
e8c24d3a23a469 include/uapi/asm-generic/mman-common.h Dave Hansen 2016-07-29 79
#define PKEY_DISABLE_WRITE 0x2
e8c24d3a23a469 include/uapi/asm-generic/mman-common.h Dave Hansen 2016-07-29 @80
#define PKEY_ACCESS_MASK (PKEY_DISABLE_ACCESS |\
e8c24d3a23a469 include/uapi/asm-generic/mman-common.h Dave Hansen 2016-07-29 81
PKEY_DISABLE_WRITE)
e8c24d3a23a469 include/uapi/asm-generic/mman-common.h Dave Hansen 2016-07-29 82
:::::: The code at line 80 was first introduced by commit
:::::: e8c24d3a23a469f1f40d4de24d872ca7023ced0a x86/pkeys: Allocation/free syscalls
:::::: TO: Dave Hansen <dave.hansen(a)linux.intel.com>
:::::: CC: Thomas Gleixner <tglx(a)linutronix.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org