tree:
git://git.infradead.org/users/hch/misc.git module_alloc-cleanup
head: d435793fc6f10b6d93bb759ed53efe0d41a64901
commit: 1b362649d96428e3619296041b77c966f3f12628 [1/5] x86: add a module_alloc_prot
helper
config: um-x86_64_defconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
git checkout 1b362649d96428e3619296041b77c966f3f12628
# save the attached .config to linux build tree
make W=1 ARCH=um SUBARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (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)
| ^~~~~~~~~~~~~~~~~
vim +/module_alloc_prot +68 arch/x86/um/../kernel/module.c
67
68 void *module_alloc_prot(unsigned long size, pgprot_t prot)
69 {
70 void *p;
71
72 if (PAGE_ALIGN(size) > MODULES_LEN)
73 return NULL;
74
75 p = __vmalloc_node_range(size, MODULE_ALIGN,
76 MODULES_VADDR + get_module_load_offset(),
77 MODULES_END, GFP_KERNEL,
78 prot, 0, NUMA_NO_NODE,
79 __builtin_return_address(0));
80 if (p && (kasan_module_alloc(p, size) < 0)) {
81 vfree(p);
82 return NULL;
83 }
84
85 return p;
86 }
87
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org