[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202110280950.AAxOjzJx-lkp@intel.com>
Date: Thu, 28 Oct 2021 09:13:58 +0800
From: kernel test robot <lkp@...el.com>
To: Laurent Vivier <laurent@...ier.eu>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Christian Brauner <christian.brauner@...ntu.com>
Subject: [brauner:fs.binfmt 2/2] fs/binfmt_misc.c:86:22: error: assignment to
'struct binfmt_misc *' from 'int' makes pointer from integer without a cast
tree: https://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git fs.binfmt
head: d484ec2850c2cd85d06837319ef57d6cec24305a
commit: d484ec2850c2cd85d06837319ef57d6cec24305a [2/2] binfmt_misc: allow sandboxed mounts
config: s390-allmodconfig (attached as .config)
compiler: s390-linux-gcc (GCC) 11.2.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/brauner/linux.git/commit/?id=d484ec2850c2cd85d06837319ef57d6cec24305a
git remote add brauner https://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git
git fetch --no-tags brauner fs.binfmt
git checkout d484ec2850c2cd85d06837319ef57d6cec24305a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
fs/binfmt_misc.c:86:24: note: in expansion of macro 'smp_load_acquire'
86 | misc = smp_load_acquire(&user_ns->binfmt_misc);
| ^~~~~~~~~~~~~~~~
In file included from <command-line>:
fs/binfmt_misc.c:86:49: error: 'struct user_namespace' has no member named 'binfmt_misc'
86 | misc = smp_load_acquire(&user_ns->binfmt_misc);
| ^~
include/linux/compiler_types.h:302:23: note: in definition of macro '__compiletime_assert'
302 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:322:9: note: in expansion of macro '_compiletime_assert'
322 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:325:9: note: in expansion of macro 'compiletime_assert'
325 | compiletime_assert(__native_word(t), \
| ^~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:325:28: note: in expansion of macro '__native_word'
325 | compiletime_assert(__native_word(t), \
| ^~~~~~~~~~~~~
arch/s390/include/asm/barrier.h:44:9: note: in expansion of macro 'compiletime_assert_atomic_type'
44 | compiletime_assert_atomic_type(*p); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/barrier.h:142:29: note: in expansion of macro '__smp_load_acquire'
142 | #define smp_load_acquire(p) __smp_load_acquire(p)
| ^~~~~~~~~~~~~~~~~~
fs/binfmt_misc.c:86:24: note: in expansion of macro 'smp_load_acquire'
86 | misc = smp_load_acquire(&user_ns->binfmt_misc);
| ^~~~~~~~~~~~~~~~
fs/binfmt_misc.c:86:49: error: 'struct user_namespace' has no member named 'binfmt_misc'
86 | misc = smp_load_acquire(&user_ns->binfmt_misc);
| ^~
include/linux/compiler_types.h:302:23: note: in definition of macro '__compiletime_assert'
302 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:322:9: note: in expansion of macro '_compiletime_assert'
322 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:325:9: note: in expansion of macro 'compiletime_assert'
325 | compiletime_assert(__native_word(t), \
| ^~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:325:28: note: in expansion of macro '__native_word'
325 | compiletime_assert(__native_word(t), \
| ^~~~~~~~~~~~~
arch/s390/include/asm/barrier.h:44:9: note: in expansion of macro 'compiletime_assert_atomic_type'
44 | compiletime_assert_atomic_type(*p); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/barrier.h:142:29: note: in expansion of macro '__smp_load_acquire'
142 | #define smp_load_acquire(p) __smp_load_acquire(p)
| ^~~~~~~~~~~~~~~~~~
fs/binfmt_misc.c:86:24: note: in expansion of macro 'smp_load_acquire'
86 | misc = smp_load_acquire(&user_ns->binfmt_misc);
| ^~~~~~~~~~~~~~~~
fs/binfmt_misc.c:86:49: error: 'struct user_namespace' has no member named 'binfmt_misc'
86 | misc = smp_load_acquire(&user_ns->binfmt_misc);
| ^~
include/linux/compiler_types.h:302:23: note: in definition of macro '__compiletime_assert'
302 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:322:9: note: in expansion of macro '_compiletime_assert'
322 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:325:9: note: in expansion of macro 'compiletime_assert'
325 | compiletime_assert(__native_word(t), \
| ^~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:325:28: note: in expansion of macro '__native_word'
325 | compiletime_assert(__native_word(t), \
| ^~~~~~~~~~~~~
arch/s390/include/asm/barrier.h:44:9: note: in expansion of macro 'compiletime_assert_atomic_type'
44 | compiletime_assert_atomic_type(*p); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/barrier.h:142:29: note: in expansion of macro '__smp_load_acquire'
142 | #define smp_load_acquire(p) __smp_load_acquire(p)
| ^~~~~~~~~~~~~~~~~~
fs/binfmt_misc.c:86:24: note: in expansion of macro 'smp_load_acquire'
86 | misc = smp_load_acquire(&user_ns->binfmt_misc);
| ^~~~~~~~~~~~~~~~
fs/binfmt_misc.c:86:49: error: 'struct user_namespace' has no member named 'binfmt_misc'
86 | misc = smp_load_acquire(&user_ns->binfmt_misc);
| ^~
include/linux/compiler_types.h:302:23: note: in definition of macro '__compiletime_assert'
302 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:322:9: note: in expansion of macro '_compiletime_assert'
322 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:325:9: note: in expansion of macro 'compiletime_assert'
325 | compiletime_assert(__native_word(t), \
| ^~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:325:28: note: in expansion of macro '__native_word'
325 | compiletime_assert(__native_word(t), \
| ^~~~~~~~~~~~~
arch/s390/include/asm/barrier.h:44:9: note: in expansion of macro 'compiletime_assert_atomic_type'
44 | compiletime_assert_atomic_type(*p); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/barrier.h:142:29: note: in expansion of macro '__smp_load_acquire'
142 | #define smp_load_acquire(p) __smp_load_acquire(p)
| ^~~~~~~~~~~~~~~~~~
fs/binfmt_misc.c:86:24: note: in expansion of macro 'smp_load_acquire'
86 | misc = smp_load_acquire(&user_ns->binfmt_misc);
| ^~~~~~~~~~~~~~~~
>> fs/binfmt_misc.c:86:22: error: assignment to 'struct binfmt_misc *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
86 | misc = smp_load_acquire(&user_ns->binfmt_misc);
| ^
In file included from include/linux/module.h:12,
from fs/binfmt_misc.c:14:
fs/binfmt_misc.c: In function 'check_file':
fs/binfmt_misc.c:112:31: error: invalid use of undefined type 'struct binfmt_misc'
112 | list_for_each(l, &misc->entries) {
| ^~
include/linux/list.h:571:21: note: in definition of macro 'list_for_each'
571 | for (pos = (head)->next; pos != (head); pos = pos->next)
| ^~~~
fs/binfmt_misc.c:112:31: error: invalid use of undefined type 'struct binfmt_misc'
112 | list_for_each(l, &misc->entries) {
| ^~
include/linux/list.h:571:42: note: in definition of macro 'list_for_each'
571 | for (pos = (head)->next; pos != (head); pos = pos->next)
| ^~~~
fs/binfmt_misc.c: In function 'load_misc_binary':
fs/binfmt_misc.c:170:18: error: invalid use of undefined type 'struct binfmt_misc'
170 | if (!misc->enabled)
| ^~
In file included from include/linux/spinlock.h:317,
from include/linux/mm_types.h:9,
from include/linux/buildid.h:5,
from include/linux/module.h:14,
from fs/binfmt_misc.c:14:
fs/binfmt_misc.c:174:24: error: invalid use of undefined type 'struct binfmt_misc'
174 | read_lock(&misc->entries_lock);
| ^~
include/linux/rwlock.h:71:48: note: in definition of macro 'read_lock'
71 | #define read_lock(lock) _raw_read_lock(lock)
| ^~~~
fs/binfmt_misc.c:179:26: error: invalid use of undefined type 'struct binfmt_misc'
179 | read_unlock(&misc->entries_lock);
| ^~
include/linux/rwlock.h:105:58: note: in definition of macro 'read_unlock'
105 | #define read_unlock(lock) _raw_read_unlock(lock)
| ^~~~
fs/binfmt_misc.c: In function 'bm_evict_inode':
fs/binfmt_misc.c:610:33: error: invalid use of undefined type 'struct binfmt_misc'
610 | write_lock(&misc->entries_lock);
| ^~
include/linux/rwlock.h:70:49: note: in definition of macro 'write_lock'
70 | #define write_lock(lock) _raw_write_lock(lock)
| ^~~~
fs/binfmt_misc.c:612:35: error: invalid use of undefined type 'struct binfmt_misc'
612 | write_unlock(&misc->entries_lock);
| ^~
include/linux/rwlock.h:106:59: note: in definition of macro 'write_unlock'
106 | #define write_unlock(lock) _raw_write_unlock(lock)
| ^~~~
fs/binfmt_misc.c: In function 'bm_register_write':
fs/binfmt_misc.c:757:25: error: invalid use of undefined type 'struct binfmt_misc'
757 | write_lock(&misc->entries_lock);
| ^~
include/linux/rwlock.h:70:49: note: in definition of macro 'write_lock'
70 | #define write_lock(lock) _raw_write_lock(lock)
| ^~~~
fs/binfmt_misc.c:758:33: error: invalid use of undefined type 'struct binfmt_misc'
758 | list_add(&e->list, &misc->entries);
| ^~
In file included from include/linux/spinlock.h:317,
from include/linux/mm_types.h:9,
from include/linux/buildid.h:5,
from include/linux/module.h:14,
from fs/binfmt_misc.c:14:
fs/binfmt_misc.c:759:27: error: invalid use of undefined type 'struct binfmt_misc'
759 | write_unlock(&misc->entries_lock);
| ^~
include/linux/rwlock.h:106:59: note: in definition of macro 'write_unlock'
106 | #define write_unlock(lock) _raw_write_unlock(lock)
| ^~~~
fs/binfmt_misc.c: In function 'bm_status_read':
fs/binfmt_misc.c:793:17: error: invalid use of undefined type 'struct binfmt_misc'
793 | s = misc->enabled ? "enabled\n" : "disabled\n";
| ^~
fs/binfmt_misc.c: In function 'bm_status_write':
fs/binfmt_misc.c:811:21: error: invalid use of undefined type 'struct binfmt_misc'
811 | misc->enabled = false;
| ^~
fs/binfmt_misc.c:815:21: error: invalid use of undefined type 'struct binfmt_misc'
815 | misc->enabled = true;
| ^~
fs/binfmt_misc.c:822:41: error: invalid use of undefined type 'struct binfmt_misc'
822 | while (!list_empty(&misc->entries))
| ^~
In file included from fs/binfmt_misc.c:13:
fs/binfmt_misc.c:824:57: error: invalid use of undefined type 'struct binfmt_misc'
824 | list_first_entry(&misc->entries, Node, list));
| ^~
include/linux/kernel.h:494:33: note: in definition of macro 'container_of'
494 | void *__mptr = (void *)(ptr); \
| ^~~
include/linux/list.h:522:9: note: in expansion of macro 'list_entry'
522 | list_entry((ptr)->next, type, member)
| ^~~~~~~~~~
fs/binfmt_misc.c:824:35: note: in expansion of macro 'list_first_entry'
824 | list_first_entry(&misc->entries, Node, list));
| ^~~~~~~~~~~~~~~~
In file included from <command-line>:
vim +86 fs/binfmt_misc.c
79
80 static struct binfmt_misc *binfmt_misc(struct user_namespace *user_ns)
81 {
82 while (user_ns) {
83 struct binfmt_misc *misc;
84
85 /* Pairs with smp_store_release() in bm_fill_super(). */
> 86 misc = smp_load_acquire(&user_ns->binfmt_misc);
87 if (misc)
88 return misc;
89
90 user_ns = user_ns->parent;
91 }
92
93 /*
94 * As the first user namespace is initialized with
95 * &init_binfmt_misc we should never come here.
96 */
97 WARN_ON_ONCE(1);
98 return ERR_PTR(-EINVAL);
99 }
100
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (28826 bytes)
Powered by blists - more mailing lists