tree:
git://git.infradead.org/users/hch/block.git module_alloc-cleanup
head: a9569e6c743ba6dfe6797854db101867564c4eab
commit: cb99dabf06d82b66c104f82d371307bfcfab261a [1/5] x86: add a module_alloc_prot
helper
config: um-allmodconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
git checkout cb99dabf06d82b66c104f82d371307bfcfab261a
# save the attached .config to linux build tree
make W=1 ARCH=um
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
cc1: warning: arch/um/include/uapi: No such file or directory [-Wmissing-include-dirs]
In file included from include/linux/uaccess.h:11,
from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:9,
from include/linux/rcuwait.h:6,
from include/linux/percpu-rwsem.h:7,
from include/linux/fs.h:33,
from arch/x86/um/../kernel/module.c:12:
arch/um/include/asm/uaccess.h: In function '__access_ok':
arch/um/include/asm/uaccess.h:17:29: warning: comparison of unsigned expression >= 0 is
always true [-Wtype-limits]
17 | (((unsigned long) (addr) >= FIXADDR_USER_START) && |
^~
arch/um/include/asm/uaccess.h:45:3: note: in expansion of macro
'__access_ok_vsyscall'
45 | __access_ok_vsyscall(addr, size) ||
| ^~~~~~~~~~~~~~~~~~~~
In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/module.h:12,
from include/linux/moduleloader.h:6,
from arch/x86/um/../kernel/module.c:9:
include/asm-generic/fixmap.h: In function 'fix_to_virt':
include/asm-generic/fixmap.h:32:19: warning: comparison of unsigned expression >= 0 is
always true [-Wtype-limits]
32 | BUILD_BUG_ON(idx >= __end_of_fixed_addresses);
| ^~
include/linux/compiler.h:372:9: note: in definition of macro
'__compiletime_assert'
372 | if (!(condition)) | ^~~~~~~~~
include/linux/compiler.h:392:2: note: in expansion of macro '_compiletime_assert'
392 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
include/asm-generic/fixmap.h:32:2: note: in expansion of macro 'BUILD_BUG_ON'
32 | BUILD_BUG_ON(idx >= __end_of_fixed_addresses);
| ^~~~~~~~~~~~
arch/x86/um/../kernel/module.c: At top level:
arch/x86/um/../kernel/module.c:68:7: warning: no previous prototype for
'module_alloc_prot' [-Wmissing-prototypes]
68 | void *module_alloc_prot(unsigned long size, pgprot_t prot)
| ^~~~~~~~~~~~~~~~~
arch/x86/um/../kernel/module.c: In function 'module_alloc_prot':
> arch/x86/um/../kernel/module.c:70:43: error: '_PAGE_NX'
undeclared (first use in this function)
70 | unsigned int flags = (pgprot_val(prot)
& _PAGE_NX) ?
| ^~~~~~~~
arch/x86/um/../kernel/module.c:70:43: note: each undeclared identifier is reported only
once for each function it appears in
vim +/_PAGE_NX +70 arch/x86/um/../kernel/module.c
67
68 void *module_alloc_prot(unsigned long size, pgprot_t prot)
69 {
70 unsigned int flags = (pgprot_val(prot) & _PAGE_NX) ?
71 0 : VM_FLUSH_RESET_PERMS;
72 void *p;
73
74 if (PAGE_ALIGN(size) > MODULES_LEN)
75 return NULL;
76
77 p = __vmalloc_node_range(size, MODULE_ALIGN,
78 MODULES_VADDR + get_module_load_offset(),
79 MODULES_END, GFP_KERNEL,
80 prot, flags, NUMA_NO_NODE,
81 __builtin_return_address(0));
82 if (p && (kasan_module_alloc(p, size) < 0)) {
83 vfree(p);
84 return NULL;
85 }
86
87 return p;
88 }
89
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org