tree:
https://github.com/zen-kernel/zen-kernel 5.10/futex2
head: 65d8ec592b14a8c75ce2a04bfef5a188cd279d00
commit: 4f6d01d9753e7ff0e6ca0ab6082f8b75256cdb57 [1/13] futex2: Implement wait and wake
functions
config: m68k-randconfig-r034-20210217 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.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/zen-kernel/zen-kernel/commit/4f6d01d9753e7ff0e6ca0ab60...
git remote add zen-kernel-zen-kernel
https://github.com/zen-kernel/zen-kernel
git fetch --no-tags zen-kernel-zen-kernel 5.10/futex2
git checkout 4f6d01d9753e7ff0e6ca0ab6082f8b75256cdb57
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
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 >>):
In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/preempt.h:11,
from arch/m68k/include/asm/irqflags.h:6,
from include/linux/irqflags.h:16,
from arch/m68k/include/asm/atomic.h:6,
from include/linux/atomic.h:7,
from include/linux/debug_locks.h:5,
from include/linux/freezer.h:7,
from kernel/futex2.c:16:
kernel/futex2.c: In function 'futex_get_bucket':
> kernel/futex2.c:163:26: warning: passing argument 1 of
'access_ok' makes pointer from integer without a cast [-Wint-conversion]
163 | if (unlikely(!access_ok(address, sizeof(u32))))
| ^~~~~~~
| |
| uintptr_t {aka long unsigned int}
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
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 include/linux/huge_mm.h:8,
from include/linux/mm.h:687,
from include/linux/memblock.h:13,
from kernel/futex2.c:18:
arch/m68k/include/asm/uaccess.h:16:48: note: expected 'const void *' but
argument is of type 'uintptr_t' {aka 'long unsigned int'}
16 | static inline int access_ok(const void __user *addr,
| ~~~~~~~~~~~~~~~~~~~^~~~
vim +/access_ok +163 kernel/futex2.c
145
146 /**
147 * futex_get_bucket - Check if the user address is valid, prepare internal
148 * data and calculate the hash
149 * @uaddr: futex user address
150 * @key: data that uniquely identifies a futex
151 *
152 * Return: address of bucket on success, error code otherwise
153 */
154 static struct futex_bucket *futex_get_bucket(void __user *uaddr,
155 struct futex_key *key)
156 {
157 uintptr_t address = (uintptr_t)uaddr;
158 u32 hash_key;
159
160 /* Checking if uaddr is valid and accessible */
161 if (unlikely(!IS_ALIGNED(address, sizeof(u32))))
162 return ERR_PTR(-EINVAL);
163 if (unlikely(!access_ok(address, sizeof(u32))))
164 return ERR_PTR(-EFAULT);
165
166 key->offset = address % PAGE_SIZE;
167 address -= key->offset;
168 key->pointer = (u64)address;
169 key->index = (unsigned long)current->mm;
170
171 /* Generate hash key for this futex using uaddr and current->mm */
172 hash_key = jhash2((u32 *)key, sizeof(*key) / sizeof(u32), 0);
173
174 /* Since HASH_SIZE is 2^n, subtracting 1 makes a perfect bit mask */
175 return &futex_table[hash_key & (futex2_hashsize - 1)];
176 }
177
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org