Fix up liblockdep for 5.8-rc
v3 cover Fix up liblockdep for 5.8-rc
Hi Peter,
This series fixes up most of liblockdep to work with the current kernel tree.
Change in v3:
- Rebase on top of the 5.8 merge window work.
Sasha Levin (14):
tools headers: Add kprobes.h header
tools headers: Add rcupdate.h header
tools/kernel.h: extend with dummy RCU functions
tools bitmap: add bitmap_andnot definition tools/lib/lockdep: add definition required for IRQ flag tracing tools bitmap: add bitmap_clear definition tools/lib/lockdep: Hook up vsprintf, find_bit, hweight libraries tools/lib/lockdep: Enable building with CONFIG_TRACE_IRQFLAGS tools/lib/lockdep: New stacktrace API tools/lib/lockdep: call lockdep_init_task on init tools/lib/lockdep: switch to using lockdep_init_map_waits tools/kernel.h: hide noinstr
tools/lib/lockdep: explicitly declare lockdep_init_task() tools/kernel.h: hide task_struct.hardirq_chain_key
tools/include/linux/bitmap.h | 10 ++++++ tools/include/linux/kernel.h | 11 ++++++ tools/include/linux/kprobes.h | 7 ++++ tools/include/linux/lockdep.h | 10 ++++++ tools/include/linux/rcupdate.h | 12 +++++++ tools/include/linux/stacktrace.h | 8 +++++ tools/lib/bitmap.c | 35 +++++++++++++++++++ tools/lib/lockdep/Build | 2 +- tools/lib/lockdep/Makefile | 2 +- tools/lib/lockdep/include/liblockdep/common.h | 4 +-- tools/lib/lockdep/include/liblockdep/mutex.h | 2 +- tools/lib/lockdep/include/liblockdep/rwlock.h | 2 +- tools/lib/lockdep/lockdep.c | 4 +-- tools/lib/lockdep/preload.c | 8 ++++- 14 files changed, 108 insertions(+), 9 deletions(-) create mode 100644 tools/include/linux/kprobes.h create mode 100644 tools/include/linux/rcupdate.h
Signature · 1 line
2.25.1
PATCH v3 3/14 tools/kernel.h: extend with dummy RCU functions
These calls were added by 108c14858b9e ("locking/lockdep: Add support for dynamic keys") and require no special handling in userspace, so just add empty function definitions.
--- tools/include/linux/kernel.h | 7 +++++++ 1 file changed, 7 insertions(+)
tools/include/linux/kernel.h +7 -0
@@ -117,4 +117,11 @@ int scnprintf_pad(char * buf, size_t size, const char * fmt, ...);#define current_gfp_context (k) 0#define synchronize_rcu () +static __maybe_unused int system_state; +#define SYSTEM_SCHEDULING 0 + +#define might_sleep () +#define rcu_read_lock () +#define rcu_read_unlock () +#endif
Signature · 1 line
2.25.1
PATCH v3 4/14 tools bitmap: add bitmap_andnot definition
In reply to Sasha LevinAdd definition of bitmap_andnot() and wire tools/lib/bitmap.c into liblockdep.
This is needed as a result of de4643a77356 ("locking/lockdep: Reuse lock chains that have been freed").
--- tools/include/linux/bitmap.h | 10 ++++++++++ tools/lib/bitmap.c | 15 +++++++++++++++ tools/lib/lockdep/Build | 2 +- 3 files changed, 26 insertions(+), 1 deletion(-)
tools/include/linux/bitmap.h +10 -0
@@ -18,6 +18,8 @@ int __bitmap_and(unsigned long *dst, const unsigned long *bitmap1,int __bitmap_equal (const unsigned long *bitmap1,const unsigned long *bitmap2,unsigned int bits);void bitmap_clear (unsigned long *map,unsigned int start,int len); +int __bitmap_andnot (unsigned long *dst,const unsigned long *bitmap1, +const unsigned long *bitmap2,unsigned int bits);#define BITMAP_FIRST_WORD_MASK (start) (~0UL << ((start) & (BITS_PER_LONG - 1)))
@@ -178,4 +180,12 @@ static inline int bitmap_equal(const unsigned long *src1, return __bitmap_equal(src1, src2, nbits); } +static inline int bitmap_andnot (unsigned long *dst,const unsigned long *src1, +const unsigned long *src2,unsigned int nbits) +{ +if (small_const_nbits (nbits)) +return (*dst = *src1 & ~(*src2) &BITMAP_LAST_WORD_MASK (nbits)) !=0 ; +return __bitmap_andnot (dst, src1, src2, nbits); +} +#endif /* _PERF_BITOPS_H */
tools/lib/bitmap.c +15 -0
@@ -86,3 +86,18 @@ int __bitmap_equal(const unsigned long *bitmap1,return 1 ; } + +int __bitmap_andnot (unsigned long *dst,const unsigned long *bitmap1, +const unsigned long *bitmap2,unsigned int bits) +{ +unsigned int k; +unsigned int lim = bits/BITS_PER_LONG ; +unsigned long result =0 ; + +for (k =0 ; k < lim; k++) + result |= (dst[k] = bitmap1[k] & ~bitmap2[k]); +if (bits %BITS_PER_LONG ) + result |= (dst[k] = bitmap1[k] & ~bitmap2[k] & +BITMAP_LAST_WORD_MASK (bits)); +return result !=0 ; +}
tools/lib/lockdep/Build +1 -1
@@ -1 +1 @@ -liblockdep-y += common.o lockdep.o preload.o rbtree.o +liblockdep-y += common.o lockdep.o preload.o rbtree.o ../../lib/bitmap.o
Signature · 1 line
2.25.1
PATCH v3 5/14 tools/lib/lockdep: add definition required for IRQ flag tracing
In reply to Sasha LevinWe are going to start building with CONFIG_TRACE_IRQFLAGS defined, so let's wire up a few dummy variables in our task_struct.
This isn't needed in userspace, but due to some refactoring in kernel-side lockdep it's easier to just wire it up and enable CONFIG_TRACE_IRQFLAGS.
--- tools/include/linux/lockdep.h | 8 ++++++++ tools/lib/lockdep/lockdep.c | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-)
tools/include/linux/lockdep.h +8 -0
@@ -23,6 +23,8 @@#include "../../../include/linux/lockdep.h" +static bool early_boot_irqs_disabled; +struct task_struct {u64 curr_chain_key;int lockdep_depth;
@@ -31,6 +33,12 @@ struct task_struct {gfp_t lockdep_reclaim_gfp;int pid;int state; +int softirqs_enabled, hardirqs_enabled, softirqs_disabled, hardirqs_disabled, irq_events; +unsigned long softirq_disable_ip, softirq_enable_ip; +unsigned int softirq_disable_event, softirq_enable_event; +unsigned long hardirq_disable_ip, hardirq_enable_ip; +unsigned int hardirq_disable_event, hardirq_enable_event; +int softirq_context, hardirq_context;char comm[17 ]; };
tools/lib/lockdep/lockdep.c +2 -2
@@ -15,10 +15,10 @@ u32 prandom_u32(void)abort (); } -void print_irqtrace_events (struct task_struct *curr) +/*void print_irqtrace_events(struct task_struct *curr) { abort(); -} +}*/ static struct new_utsname *init_utsname (void ) {
Signature · 1 line
2.25.1
PATCH v3 8/14 tools/lib/lockdep: Enable building with CONFIG_TRACE_IRQFLAGS
In reply to Sasha LevinAt this point it's always enabled with CONFIG_PROVE_LOCKING, so it's easier to enable it in liblockdep as well rather than try and fix up the lockdep code.
--- tools/lib/lockdep/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/lib/lockdep/Makefile +1 -1
@@ -78,7 +78,7 @@ export Q VERBOSE INCLUDES = -I. -I./uinclude -I./include -I../../include $(CONFIG_INCLUDES) # Set compile option CFLAGS if not set elsewhere -CFLAGS ?= -g -DCONFIG_LOCKDEP -DCONFIG_STACKTRACE -DCONFIG_PROVE_LOCKING -DBITS_PER_LONG=__WORDSIZE -DLIBLOCKDEP_VERSION='"$(LIBLOCKDEP_VERSION)"' -rdynamic -O0 -g +CFLAGS ?= -g -DCONFIG_LOCKDEP -DCONFIG_STACKTRACE -DCONFIG_PROVE_LOCKING -DCONFIG_TRACE_IRQFLAGS -DBITS_PER_LONG=__WORDSIZE -DLIBLOCKDEP_VERSION='"$(LIBLOCKDEP_VERSION)"' -rdynamic -O0 -g CFLAGS += -fPIC CFLAGS += -Wall
Signature · 1 line
2.25.1
PATCH v3 11/14 tools/lib/lockdep: switch to using lockdep_init_map_waits
In reply to Sasha LevinAs of de8f5e4f2dc1 ("lockdep: Introduce wait-type checks") lockdep exports lockdep_init_map_waits() instead of lockdep_init_map() for initialization.
--- tools/include/linux/kernel.h | 2 ++ tools/include/linux/lockdep.h | 1 + tools/lib/lockdep/include/liblockdep/common.h | 4 ++-- tools/lib/lockdep/include/liblockdep/mutex.h | 2 +- tools/lib/lockdep/include/liblockdep/rwlock.h | 2 +- tools/lib/lockdep/preload.c | 2 +- 6 files changed, 8 insertions(+), 5 deletions(-)
tools/include/linux/kernel.h +2 -0
@@ -124,4 +124,6 @@ static __maybe_unused int system_state;#define rcu_read_lock ()#define rcu_read_unlock () +#define in_nmi () 0 +#endif
tools/include/linux/lockdep.h +1 -0
@@ -34,6 +34,7 @@ struct task_struct {int pid;int state;int softirqs_enabled, hardirqs_enabled, softirqs_disabled, hardirqs_disabled, irq_events; +int hardirq_threaded, irq_config;unsigned long softirq_disable_ip, softirq_enable_ip;unsigned int softirq_disable_event, softirq_enable_event;unsigned long hardirq_disable_ip, hardirq_enable_ip;
tools/lib/lockdep/include/liblockdep/common.h +2 -2
@@ -37,8 +37,8 @@ struct lockdep_map {#endif }; -void lockdep_init_map (struct lockdep_map *lock,const char *name, -struct lock_class_key *key,int subclass); +void lockdep_init_map_waits (struct lockdep_map *lock,const char *name, +struct lock_class_key *key,int subclass,short inner,short outer);void lock_acquire (struct lockdep_map *lock,unsigned int subclass,int trylock,int read,int check,struct lockdep_map *nest_lock,unsigned long ip);
tools/lib/lockdep/include/liblockdep/mutex.h +1 -1
@@ -24,7 +24,7 @@ static inline int __mutex_init(liblockdep_pthread_mutex_t *lock,struct lock_class_key *key, const pthread_mutexattr_t *__mutexattr) { - lockdep_init_map(&lock->dep_map, name, key, 0); + lockdep_init_map_waits(&lock->dep_map, name, key, 0, 0, 0);return pthread_mutex_init (&lock->mutex, __mutexattr); }
tools/lib/lockdep/include/liblockdep/rwlock.h +1 -1
@@ -23,7 +23,7 @@ static inline int __rwlock_init(liblockdep_pthread_rwlock_t *lock,struct lock_class_key *key, const pthread_rwlockattr_t *attr) { - lockdep_init_map(&lock->dep_map, name, key, 0); + lockdep_init_map_waits(&lock->dep_map, name, key, 0, 0, 0);return pthread_rwlock_init (&lock->rwlock, attr); }
tools/lib/lockdep/preload.c +1 -1
@@ -199,7 +199,7 @@ static struct lock_lookup *__get_lock(void *lock)* TODO: Get the real name of the lock using libdwarf */ sprintf (l->name,"%p" , lock); -lockdep_init_map (&l->dep_map, l->name, &l->key,0 ); +// lockdep_init_map_waits(&l->dep_map, l->name, &l->key, 0, 0, 0); ll_pthread_rwlock_wrlock (&locks_rwlock);/* This might have changed since the last time we fetched it */
Signature · 1 line
2.25.1
PATCH v3 10/14 tools/lib/lockdep: call lockdep_init_task on init
In reply to Sasha LevinWe now have to explicitly call lockdep_init_task() when starting up.
--- tools/lib/lockdep/preload.c | 4 ++++ 1 file changed, 4 insertions(+)
tools/lib/lockdep/preload.c +4 -0
@@ -9,6 +9,8 @@#include "include/liblockdep/mutex.h" #include "../../include/linux/rbtree.h" +extern struct task_struct *__curr (void ); +/** * struct lock_lookup - liblockdep's view of a single unique lock * @orig: pointer to the original pthread lock, used for lookups
@@ -421,6 +423,8 @@ __attribute__((constructor)) static void init_preload(void)if (__init_state == done)return ; +lockdep_init_task (__curr ()); +#ifndef __GLIBC__ __init_state = prepare;
Signature · 1 line
2.25.1
PATCH v3 14/14 tools/kernel.h: hide task_struct.hardirq_chain_key
In reply to Sasha LevinAs a result of c86e9b987cea ("lockdep: Prepare for noinstr sections") we need to hide hardirq_chain_key from userspace to avoid a build error.
--- tools/include/linux/lockdep.h | 1 + 1 file changed, 1 insertion(+)
tools/include/linux/lockdep.h +1 -0
@@ -40,6 +40,7 @@ struct task_struct {unsigned long hardirq_disable_ip, hardirq_enable_ip;unsigned int hardirq_disable_event, hardirq_enable_event;int softirq_context, hardirq_context; +unsigned long hardirq_chain_key;char comm[17 ]; };
Signature · 1 line
2.25.1
PATCH v3 13/14 tools/lib/lockdep: explicitly declare lockdep_init_task()
In reply to Sasha LevinAvoid a warning as we can't pull the decleration for lockdep's header.
--- tools/lib/lockdep/preload.c | 2 ++ 1 file changed, 2 insertions(+)
tools/lib/lockdep/preload.c +2 -0
@@ -92,6 +92,8 @@ static int (*ll_pthread_rwlock_trywrlock)(pthread_rwlock_t *rwlock) = __pthread_static int (*ll_pthread_rwlock_wrlock)(pthread_rwlock_t *rwlock) = __pthread_rwlock_wrlock;static int (*ll_pthread_rwlock_unlock)(pthread_rwlock_t *rwlock) = __pthread_rwlock_unlock; +extern void lockdep_init_task (struct task_struct *task); +enum { none, prepare, done, } __init_state;static void init_preload (void );static void try_init_preload (void )
Signature · 1 line
2.25.1
PATCH v3 12/14 tools/kernel.h: hide noinstr
In reply to Sasha LevinAfter 655389666643 ("vmlinux.lds.h: Create section for protection against instrumentation") we need to ignore "noinstr" in userspace.
--- tools/include/linux/kernel.h | 2 ++ 1 file changed, 2 insertions(+)
tools/include/linux/kernel.h +2 -0
@@ -126,4 +126,6 @@ static __maybe_unused int system_state;#define in_nmi () 0 +#define noinstr +#endif
Signature · 1 line
2.25.1
PATCH v3 2/14 tools headers: Add rcupdate.h header
In reply to Sasha LevinThis is now needed by liblockdep as a result of a0b0fd53e1e6 ("locking/lockdep: Free lock classes that are no longer in use").
--- tools/include/linux/rcupdate.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tools/include/linux/rcupdate.h
tools/include/linux/rcupdate.h new file +12 -0
@@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LIBLOCKDEP_RCUPDATE_H_ +#define _LIBLOCKDEP_RCUPDATE_H_ + +#define call_rcu (x, y) +#define init_rcu_head (x) + +struct rcu_head { +char dummy; +}; + +#endif
Signature · 1 line
2.25.1
PATCH v3 9/14 tools/lib/lockdep: New stacktrace API
In reply to Sasha LevinThe kernel switched to using kernel/stacktrace.c, and the API slightly changed.
Adjust it to make stack traces work again.
--- tools/include/linux/stacktrace.h | 8 ++++++++ 1 file changed, 8 insertions(+)
tools/include/linux/stacktrace.h +8 -0
@@ -15,10 +15,18 @@ static inline void print_stack_trace(struct stack_trace *trace, int spaces)backtrace_symbols_fd ((void **)trace->entries, trace->nr_entries,1 ); } +static inline void stack_trace_print (const long unsigned int *entries,unsigned int nr,int spaces) +{ +backtrace_symbols_fd ((void **)entries, nr,1 ); +} +#define save_stack_trace (trace) \ ((trace)->nr_entries = \ backtrace((void **)(trace)->entries, (trace)->max_entries)) +#define stack_trace_save (e, m, x) \ + backtrace((void **)(e), (m)) +static inline int dump_stack (void ) {void *array[64 ];
Signature · 1 line
2.25.1
PATCH v3 7/14 tools/lib/lockdep: Hook up vsprintf, find_bit, hweight libraries
In reply to Sasha LevinThey already exist in tools/lib/, and are now required by liblockdep, so just add them to the build manifest.
--- tools/lib/lockdep/Build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/lib/lockdep/Build +1 -1
@@ -1 +1 @@ -liblockdep-y += common.o lockdep.o preload.o rbtree.o ../../lib/bitmap.o +liblockdep-y += common.o lockdep.o preload.o rbtree.o ../../lib/bitmap.o ../../lib/vsprintf.o ../../lib/find_bit.o ../../lib/hweight.o
Signature · 1 line
2.25.1
PATCH v3 6/14 tools bitmap: add bitmap_clear definition
In reply to Sasha LevinThis is needed as a result of de4643a77356 ("locking/lockdep: Reuse lock chains that have been freed").
--- tools/lib/bitmap.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
tools/lib/bitmap.c +20 -0
@@ -101,3 +101,23 @@ int __bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1, BITMAP_LAST_WORD_MASK(bits));return result !=0 ; } + +void bitmap_clear (unsigned long *map,unsigned int start,int len) +{ +unsigned long *p = map +BIT_WORD (start); +const unsigned int size = start + len; +int bits_to_clear =BITS_PER_LONG - (start %BITS_PER_LONG ); +unsigned long mask_to_clear =BITMAP_FIRST_WORD_MASK (start); + +while (len - bits_to_clear >=0 ) { + *p &= ~mask_to_clear; + len -= bits_to_clear; + bits_to_clear =BITS_PER_LONG ; + mask_to_clear = ~0UL ; + p++; + } +if (len) { + mask_to_clear &=BITMAP_LAST_WORD_MASK (size); + *p &= ~mask_to_clear; + } +}
Signature · 1 line
2.25.1
PATCH v3 1/14 tools headers: Add kprobes.h header
In reply to Sasha LevinThis is now needed by liblockdep as a result of 2f43c6022d84 ("kprobes:
Prohibit probing on lockdep functions").
--- tools/include/linux/kprobes.h | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 tools/include/linux/kprobes.h
tools/include/linux/kprobes.h new file +7 -0
@@ -0,0 +1,7 @@ +#ifndef _TOOLS_LINUX_KPROBES_H_ +#define _TOOLS_LINUX_KPROBES_H_ + +#define NOKPROBE_SYMBOL (x) +#define nokprobe_inline + +#endif
Signature · 1 line
2.25.1
kernel test robot
build botRe: [PATCH v3 12/14] tools/kernel.h: hide noinstr
In reply to Sasha LevinI love your patch! Yet something to improve:
Hi Sasha,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.8-rc2 next-20200622]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Sasha-Levin/Fix-up-liblockdep-for-5-8-rc/20200623-064735 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git dd0d718152e4c65b173070d48ea9dfc06894c3e5 config: x86_64-rhel (attached as .config) compiler: gcc-9 (Debian 9.3.0-13) 9.3.0 reproduce (this is a W=1 build): # save the attached .config to linux build tree make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
All errors (new ones prefixed by >>):
In file included from objtool.h:13,
from weak.c:10:
>> elf.h:42:37: error: expected identifier or '(' before ';' token
42 | bool changed, text, rodata, noinstr;
| ^
elf.h:43:1: error: no semicolon at end of struct or union [-Werror]
43 | };
| ^
cc1: all warnings being treated as errors
In file included from objtool.h:13,
from orc_dump.c:8:
>> elf.h:42:37: error: expected identifier or '(' before ';' token
42 | bool changed, text, rodata, noinstr;
| ^
elf.h:43:1: error: no semicolon at end of struct or union [-Werror]
43 | };
| ^
In file included from objtool.h:13,
from builtin-orc.c:17:
>> elf.h:42:37: error: expected identifier or '(' before ';' token
42 | bool changed, text, rodata, noinstr;
| ^
elf.h:43:1: error: no semicolon at end of struct or union [-Werror]
43 | };
| ^
In file included from objtool.h:13,
from arch.h:11,
from check.h:11,
from orc_gen.c:9:
>> elf.h:42:37: error: expected identifier or '(' before ';' token
42 | bool changed, text, rodata, noinstr;
| ^
elf.h:43:1: error: no semicolon at end of struct or union [-Werror]
43 | };
| ^
In file included from orc_gen.c:9:
check.h:18:14: error: declaration does not declare anything [-Werror]
18 | bool noinstr;
| ^
cc1: all warnings being treated as errors
mv: cannot stat 'tools/objtool/.weak.o.tmp': No such file or directory
make[4]: *** [tools/build/Makefile.build:97: tools/objtool/weak.o] Error 1
make[4]: *** Waiting for unfinished jobs....
In file included from objtool.h:13,
from builtin-check.c:19:
>> elf.h:42:37: error: expected identifier or '(' before ';' token
42 | bool changed, text, rodata, noinstr;
| ^
elf.h:43:1: error: no semicolon at end of struct or union [-Werror]
43 | };
| ^
In file included from objtool.h:13,
from arch.h:11,
from check.c:11:
>> elf.h:42:37: error: expected identifier or '(' before ';' token
42 | bool changed, text, rodata, noinstr;
| ^
elf.h:43:1: error: no semicolon at end of struct or union [-Werror]
43 | };
| ^
In file included from special.h:10,
from special.c:15:
>> elf.h:42:37: error: expected identifier or '(' before ';' token
42 | bool changed, text, rodata, noinstr;
| ^
elf.h:43:1: error: no semicolon at end of struct or union [-Werror]
43 | };
| ^
In file included from check.c:12:
check.h:18:14: error: declaration does not declare anything [-Werror]
18 | bool noinstr;
| ^
cc1: all warnings being treated as errors
mv: cannot stat 'tools/objtool/.builtin-orc.o.tmp': No such file or directory
In file included from elf.c:20:
>> elf.h:42:37: error: expected identifier or '(' before ';' token
42 | bool changed, text, rodata, noinstr;
| ^
elf.h:43:1: error: no semicolon at end of struct or union [-Werror]
43 | };
| ^
make[4]: *** [tools/build/Makefile.build:97: tools/objtool/builtin-orc.o] Error 1
cc1: all warnings being treated as errors
mv: cannot stat 'tools/objtool/.builtin-check.o.tmp': No such file or directory
make[4]: *** [tools/build/Makefile.build:97: tools/objtool/builtin-check.o] Error 1
mv: cannot stat 'tools/objtool/.orc_gen.o.tmp': No such file or directory
cc1: all warnings being treated as errors
make[4]: *** [tools/build/Makefile.build:97: tools/objtool/orc_gen.o] Error 1
cc1: all warnings being treated as errors
mv: cannot stat 'tools/objtool/.orc_dump.o.tmp': No such file or directory
mv: cannot stat 'tools/objtool/.special.o.tmp': No such file or directory
make[4]: *** [tools/build/Makefile.build:97: tools/objtool/orc_dump.o] Error 1
make[4]: *** [tools/build/Makefile.build:97: tools/objtool/special.o] Error 1
cc1: all warnings being treated as errors
check.c: In function 'init_insn_state':
>> check.c:254:18: error: expected identifier before '=' token
254 | state->noinstr = sec->noinstr;
| ^
check.c: In function 'decode_instructions':
check.c:282:17: error: expected identifier before '=' token
282 | sec->noinstr = true;
| ^
mv: cannot stat 'tools/objtool/.elf.o.tmp': No such file or directory
make[4]: *** [tools/build/Makefile.build:97: tools/objtool/elf.o] Error 1
check.c: In function 'validate_call':
check.c:2195:21: error: expected identifier before '&&' token
2195 | if (state->noinstr && state->instr <= 0 &&
| ^~
check.c: In function 'validate_return':
check.c:2230:21: error: expected identifier before '&&' token
2230 | if (state->noinstr && state->instr > 0) {
| ^~
check.c: In function 'validate_branch':
>> check.c:2334:20: error: expected identifier before ')' token
2334 | if (state.noinstr)
| ^
In file included from arch/x86/../../objtool.h:13,
from arch/x86/../../arch.h:11,
from arch/x86/../../check.h:11,
from arch/x86/decode.c:14:
>> arch/x86/../../elf.h:42:37: error: expected identifier or '(' before ';' token
42 | bool changed, text, rodata, noinstr;
| ^
arch/x86/../../elf.h:43:1: error: no semicolon at end of struct or union [-Werror]
43 | };
| ^
In file included from arch/x86/decode.c:14:
arch/x86/../../check.h:18:14: error: declaration does not declare anything [-Werror]
18 | bool noinstr;
| ^ cc1: all warnings being treated as errors
cc1: all warnings being treated as errors
mv: cannot stat 'tools/objtool/.check.o.tmp': No such file or directory
mv: cannot stat 'tools/objtool/arch/x86/.decode.o.tmp': No such file or directory make[4]: *** [tools/build/Makefile.build:96: tools/objtool/check.o] Error 1 make[5]: *** [tools/build/Makefile.build:97: tools/objtool/arch/x86/decode.o] Error 1 make[4]: *** [tools/build/Makefile.build:139: arch/x86] Error 2 make[3]: *** [Makefile:64: tools/objtool/objtool-in.o] Error 2
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:68: objtool] Error 2
make[1]: *** [Makefile:1858: tools/objtool] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:185: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org