[brauner:fs.binfmt 2/2] fs/binfmt_misc.c:86:49: error: 'struct user_namespace' has no member named 'binfmt_misc'
From: kernel test robot
Date: Wed Oct 27 2021 - 17:50:08 EST
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: sparc-defconfig (attached as .config)
compiler: sparc-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
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=sparc SHELL=/bin/bash fs/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All errors (new ones prefixed by >>):
In file included from <command-line>:
fs/binfmt_misc.c: In function '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:279:27: note: in definition of macro '__unqual_scalar_typeof'
279 | _Generic((x), \
| ^
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/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~
include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
49 | compiletime_assert_rwonce_type(x); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/barrier.h:171:44: note: in expansion of macro 'READ_ONCE'
171 | __unqual_scalar_typeof(*p) ___p1 = READ_ONCE(*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/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~
include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
49 | compiletime_assert_rwonce_type(x); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/barrier.h:171:44: note: in expansion of macro 'READ_ONCE'
171 | __unqual_scalar_typeof(*p) ___p1 = READ_ONCE(*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/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~
include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
49 | compiletime_assert_rwonce_type(x); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/barrier.h:171:44: note: in expansion of macro 'READ_ONCE'
171 | __unqual_scalar_typeof(*p) ___p1 = READ_ONCE(*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/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~
include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
49 | compiletime_assert_rwonce_type(x); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/barrier.h:171:44: note: in expansion of macro 'READ_ONCE'
171 | __unqual_scalar_typeof(*p) ___p1 = READ_ONCE(*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/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
49 | compiletime_assert_rwonce_type(x); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/barrier.h:171:44: note: in expansion of macro 'READ_ONCE'
171 | __unqual_scalar_typeof(*p) ___p1 = READ_ONCE(*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:279:27: note: in definition of macro '__unqual_scalar_typeof'
279 | _Generic((x), \
| ^
include/asm-generic/rwonce.h:50:9: note: in expansion of macro '__READ_ONCE'
50 | __READ_ONCE(x); \
| ^~~~~~~~~~~
include/asm-generic/barrier.h:171:44: note: in expansion of macro 'READ_ONCE'
171 | __unqual_scalar_typeof(*p) ___p1 = READ_ONCE(*p); \
| ^~~~~~~~~
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 ./arch/sparc/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:266,
from include/linux/kernel.h:11,
from fs/binfmt_misc.c:13:
>> 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/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
| ^
include/asm-generic/barrier.h:171:44: note: in expansion of macro 'READ_ONCE'
171 | __unqual_scalar_typeof(*p) ___p1 = READ_ONCE(*p); \
| ^~~~~~~~~
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), \
| ^~~~~~~~~~~~~
include/asm-generic/barrier.h:172:9: note: in expansion of macro 'compiletime_assert_atomic_type'
172 | compiletime_assert_atomic_type(*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), \
| ^~~~~~~~~~~~~
include/asm-generic/barrier.h:172:9: note: in expansion of macro 'compiletime_assert_atomic_type'
172 | compiletime_assert_atomic_type(*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), \
| ^~~~~~~~~~~~~
include/asm-generic/barrier.h:172:9: note: in expansion of macro 'compiletime_assert_atomic_type'
172 | compiletime_assert_atomic_type(*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), \
| ^~~~~~~~~~~~~
include/asm-generic/barrier.h:172:9: note: in expansion of macro 'compiletime_assert_atomic_type'
172 | compiletime_assert_atomic_type(*p); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 arch/sparc/include/asm/barrier_32.h:5,
from arch/sparc/include/asm/barrier.h:7,
from arch/sparc/include/asm/atomic_32.h:18,
from arch/sparc/include/asm/atomic.h:7,
from include/linux/atomic.h:7,
from include/asm-generic/bitops/lock.h:5,
from arch/sparc/include/asm/bitops_32.h:102,
from arch/sparc/include/asm/bitops.h:7,
from include/linux/bitops.h:33,
from include/linux/kernel.h:12,
from fs/binfmt_misc.c:13:
>> 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/asm-generic/barrier.h:174:18: note: in definition of macro 'smp_load_acquire'
174 | (typeof(*p))___p1; \
| ^
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:326,
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/spinlock_api_up.h:28:32: note: in definition of macro '___LOCK'
28 | do { __acquire(lock); (void)(lock); } while (0)
| ^~~~
include/linux/spinlock_api_up.h:60:49: note: in expansion of macro '__LOCK'
60 | #define _raw_read_lock(lock) __LOCK(lock)
| ^~~~~~
include/linux/rwlock.h:71:33: note: in expansion of macro '_raw_read_lock'
71 | #define read_lock(lock) _raw_read_lock(lock)
| ^~~~~~~~~~~~~~
fs/binfmt_misc.c:174:9: note: in expansion of macro 'read_lock'
174 | read_lock(&misc->entries_lock);
| ^~~~~~~~~
fs/binfmt_misc.c:179:26: error: invalid use of undefined type 'struct binfmt_misc'
179 | read_unlock(&misc->entries_lock);
| ^~
include/linux/spinlock_api_up.h:43:32: note: in definition of macro '___UNLOCK'
43 | do { __release(lock); (void)(lock); } while (0)
| ^~~~
include/linux/spinlock_api_up.h:76:49: note: in expansion of macro '__UNLOCK'
76 | #define _raw_read_unlock(lock) __UNLOCK(lock)
| ^~~~~~~~
include/linux/rwlock.h:105:41: note: in expansion of macro '_raw_read_unlock'
105 | #define read_unlock(lock) _raw_read_unlock(lock)
| ^~~~~~~~~~~~~~~~
fs/binfmt_misc.c:179:9: note: in expansion of macro 'read_unlock'
179 | read_unlock(&misc->entries_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/spinlock_api_up.h:28:32: note: in definition of macro '___LOCK'
28 | do { __acquire(lock); (void)(lock); } while (0)
| ^~~~
include/linux/spinlock_api_up.h:61:49: note: in expansion of macro '__LOCK'
61 | #define _raw_write_lock(lock) __LOCK(lock)
| ^~~~~~
include/linux/rwlock.h:70:33: note: in expansion of macro '_raw_write_lock'
70 | #define write_lock(lock) _raw_write_lock(lock)
| ^~~~~~~~~~~~~~~
fs/binfmt_misc.c:610:17: note: in expansion of macro 'write_lock'
610 | write_lock(&misc->entries_lock);
| ^~~~~~~~~~
fs/binfmt_misc.c:612:35: error: invalid use of undefined type 'struct binfmt_misc'
612 | write_unlock(&misc->entries_lock);
| ^~
include/linux/spinlock_api_up.h:43:32: note: in definition of macro '___UNLOCK'
43 | do { __release(lock); (void)(lock); } while (0)
| ^~~~
include/linux/spinlock_api_up.h:77:49: note: in expansion of macro '__UNLOCK'
77 | #define _raw_write_unlock(lock) __UNLOCK(lock)
| ^~~~~~~~
include/linux/rwlock.h:106:41: note: in expansion of macro '_raw_write_unlock'
106 | #define write_unlock(lock) _raw_write_unlock(lock)
| ^~~~~~~~~~~~~~~~~
fs/binfmt_misc.c:612:17: note: in expansion of macro 'write_unlock'
612 | write_unlock(&misc->entries_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/spinlock_api_up.h:28:32: note: in definition of macro '___LOCK'
28 | do { __acquire(lock); (void)(lock); } while (0)
| ^~~~
include/linux/spinlock_api_up.h:61:49: note: in expansion of macro '__LOCK'
61 | #define _raw_write_lock(lock) __LOCK(lock)
| ^~~~~~
include/linux/rwlock.h:70:33: note: in expansion of macro '_raw_write_lock'
70 | #define write_lock(lock) _raw_write_lock(lock)
| ^~~~~~~~~~~~~~~
fs/binfmt_misc.c:757:9: note: in expansion of macro 'write_lock'
757 | write_lock(&misc->entries_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:326,
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/spinlock_api_up.h:43:32: note: in definition of macro '___UNLOCK'
43 | do { __release(lock); (void)(lock); } while (0)
| ^~~~
include/linux/spinlock_api_up.h:77:49: note: in expansion of macro '__UNLOCK'
77 | #define _raw_write_unlock(lock) __UNLOCK(lock)
| ^~~~~~~~
include/linux/rwlock.h:106:41: note: in expansion of macro '_raw_write_unlock'
106 | #define write_unlock(lock) _raw_write_unlock(lock)
| ^~~~~~~~~~~~~~~~~
fs/binfmt_misc.c:759:9: note: in expansion of macro 'write_unlock'
759 | write_unlock(&misc->entries_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>:
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/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/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/kernel.h:495:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
495 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~~~~~~
include/linux/kernel.h:495:27: note: in expansion of macro '__same_type'
495 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~
include/linux/list.h:511:9: note: in expansion of macro 'container_of'
511 | container_of(ptr, type, member)
| ^~~~~~~~~~~~
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));
| ^~~~~~~~~~~~~~~~
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/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/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/kernel.h:495:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
495 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~~~~~~
include/linux/kernel.h:496:27: note: in expansion of macro '__same_type'
496 | !__same_type(*(ptr), void), \
| ^~~~~~~~~~~
include/linux/list.h:511:9: note: in expansion of macro 'container_of'
511 | container_of(ptr, type, member)
| ^~~~~~~~~~~~
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));
| ^~~~~~~~~~~~~~~~
fs/binfmt_misc.c: In function 'bm_fill_super':
fs/binfmt_misc.c:878:23: error: 'struct user_namespace' has no member named 'binfmt_misc'
878 | misc = user_ns->binfmt_misc;
| ^~
>> fs/binfmt_misc.c:880:39: error: invalid application of 'sizeof' to incomplete type 'struct binfmt_misc'
880 | misc = kmalloc(sizeof(struct binfmt_misc), GFP_KERNEL);
| ^~~~~~
fs/binfmt_misc.c:884:37: error: invalid use of undefined type 'struct binfmt_misc'
884 | INIT_LIST_HEAD(&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:885:34: error: invalid use of undefined type 'struct binfmt_misc'
885 | rwlock_init(&misc->entries_lock);
| ^~
include/linux/rwlock.h:28:16: note: in definition of macro 'rwlock_init'
28 | do { *(lock) = __RW_LOCK_UNLOCKED(lock); } while (0)
| ^~~~
In file included from <command-line>:
fs/binfmt_misc.c:888:43: error: 'struct user_namespace' has no member named 'binfmt_misc'
888 | smp_store_release(&user_ns->binfmt_misc, 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), \
| ^~~~~~~~~~~~~
include/asm-generic/barrier.h:162:9: note: in expansion of macro 'compiletime_assert_atomic_type'
162 | compiletime_assert_atomic_type(*p); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/binfmt_misc.c:888:17: note: in expansion of macro 'smp_store_release'
888 | smp_store_release(&user_ns->binfmt_misc, misc);
| ^~~~~~~~~~~~~~~~~
fs/binfmt_misc.c:888:43: error: 'struct user_namespace' has no member named 'binfmt_misc'
888 | smp_store_release(&user_ns->binfmt_misc, 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), \
| ^~~~~~~~~~~~~
include/asm-generic/barrier.h:162:9: note: in expansion of macro 'compiletime_assert_atomic_type'
162 | compiletime_assert_atomic_type(*p); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/binfmt_misc.c:888:17: note: in expansion of macro 'smp_store_release'
888 | smp_store_release(&user_ns->binfmt_misc, misc);
| ^~~~~~~~~~~~~~~~~
fs/binfmt_misc.c:888:43: error: 'struct user_namespace' has no member named 'binfmt_misc'
888 | smp_store_release(&user_ns->binfmt_misc, 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), \
| ^~~~~~~~~~~~~
include/asm-generic/barrier.h:162:9: note: in expansion of macro 'compiletime_assert_atomic_type'
162 | compiletime_assert_atomic_type(*p); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/binfmt_misc.c:888:17: note: in expansion of macro 'smp_store_release'
888 | smp_store_release(&user_ns->binfmt_misc, misc);
| ^~~~~~~~~~~~~~~~~
fs/binfmt_misc.c:888:43: error: 'struct user_namespace' has no member named 'binfmt_misc'
888 | smp_store_release(&user_ns->binfmt_misc, 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), \
| ^~~~~~~~~~~~~
include/asm-generic/barrier.h:162:9: note: in expansion of macro 'compiletime_assert_atomic_type'
162 | compiletime_assert_atomic_type(*p); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/binfmt_misc.c:888:17: note: in expansion of macro 'smp_store_release'
888 | smp_store_release(&user_ns->binfmt_misc, misc);
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
101 /*
102 * Check if we support the binfmt
103 * if we do, return the node, else NULL
104 * locking is done in load_misc_binary
105 */
106 static Node *check_file(struct binfmt_misc *misc, struct linux_binprm *bprm)
107 {
108 char *p = strrchr(bprm->interp, '.');
109 struct list_head *l;
110
111 /* Walk all the registered handlers. */
> 112 list_for_each(l, &misc->entries) {
113 Node *e = list_entry(l, Node, list);
114 char *s;
115 int j;
116
117 /* Make sure this one is currently enabled. */
118 if (!test_bit(Enabled, &e->flags))
119 continue;
120
121 /* Do matching based on extension if applicable. */
122 if (!test_bit(Magic, &e->flags)) {
123 if (p && !strcmp(e->magic, p + 1))
124 return e;
125 continue;
126 }
127
128 /* Do matching based on magic & mask. */
129 s = bprm->buf + e->offset;
130 if (e->mask) {
131 for (j = 0; j < e->size; j++)
132 if ((*s++ ^ e->magic[j]) & e->mask[j])
133 break;
134 } else {
135 for (j = 0; j < e->size; j++)
136 if ((*s++ ^ e->magic[j]))
137 break;
138 }
139 if (j == e->size)
140 return e;
141 }
142 return NULL;
143 }
144
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip