Re: [PATCH v2 1/3] stacktrace: move arch_within_stack_frames from thread_info.h

From: kbuild test robot
Date: Mon Apr 09 2018 - 04:59:32 EST


Hi Sahara,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.16 next-20180406]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/kpark3469-gmail-com/usercopy-reimplement-arch_within_stack_frames/20180409-144349
config: x86_64-randconfig-x013-201814 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64

All errors (new ones prefixed by >>):

from include/linux/uaccess.h:5,
from arch/x86/include/asm/stacktrace.h:10,
from include/linux/stacktrace.h:6,
from include/linux/lockdep.h:29,
from include/linux/spinlock_types.h:18,
from kernel/bounds.c:14:
include/linux/spinlock.h:297:24: error: unknown type name 'raw_spinlock_t'
static __always_inline raw_spinlock_t *spinlock_check(spinlock_t *lock)
^~~~~~~~~~~~~~
include/linux/spinlock.h:297:55: error: unknown type name 'spinlock_t'; did you mean 'clock_t'?
static __always_inline raw_spinlock_t *spinlock_check(spinlock_t *lock)
^~~~~~~~~~
clock_t
include/linux/spinlock.h:308:39: error: unknown type name 'spinlock_t'; did you mean 'clock_t'?
static __always_inline void spin_lock(spinlock_t *lock)
^~~~~~~~~~
clock_t
include/linux/spinlock.h:313:42: error: unknown type name 'spinlock_t'; did you mean 'clock_t'?
static __always_inline void spin_lock_bh(spinlock_t *lock)
^~~~~~~~~~
clock_t
include/linux/spinlock.h:318:41: error: unknown type name 'spinlock_t'; did you mean 'clock_t'?
static __always_inline int spin_trylock(spinlock_t *lock)
^~~~~~~~~~
clock_t
include/linux/spinlock.h:333:43: error: unknown type name 'spinlock_t'; did you mean 'clock_t'?
static __always_inline void spin_lock_irq(spinlock_t *lock)
^~~~~~~~~~
clock_t
include/linux/spinlock.h:348:41: error: unknown type name 'spinlock_t'; did you mean 'clock_t'?
static __always_inline void spin_unlock(spinlock_t *lock)
^~~~~~~~~~
clock_t
include/linux/spinlock.h:353:44: error: unknown type name 'spinlock_t'; did you mean 'clock_t'?
static __always_inline void spin_unlock_bh(spinlock_t *lock)
^~~~~~~~~~
clock_t
include/linux/spinlock.h:358:45: error: unknown type name 'spinlock_t'; did you mean 'clock_t'?
static __always_inline void spin_unlock_irq(spinlock_t *lock)
^~~~~~~~~~
clock_t
include/linux/spinlock.h:363:52: error: unknown type name 'spinlock_t'; did you mean 'clock_t'?
static __always_inline void spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags)
^~~~~~~~~~
clock_t
include/linux/spinlock.h:368:44: error: unknown type name 'spinlock_t'; did you mean 'clock_t'?
static __always_inline int spin_trylock_bh(spinlock_t *lock)
^~~~~~~~~~
clock_t
include/linux/spinlock.h:373:45: error: unknown type name 'spinlock_t'; did you mean 'clock_t'?
static __always_inline int spin_trylock_irq(spinlock_t *lock)
^~~~~~~~~~
clock_t
include/linux/spinlock.h:383:43: error: unknown type name 'spinlock_t'; did you mean 'clock_t'?
static __always_inline int spin_is_locked(spinlock_t *lock)
^~~~~~~~~~
clock_t
include/linux/spinlock.h:388:46: error: unknown type name 'spinlock_t'; did you mean 'clock_t'?
static __always_inline int spin_is_contended(spinlock_t *lock)
^~~~~~~~~~
clock_t
include/linux/spinlock.h:408:51: error: unknown type name 'spinlock_t'; did you mean 'clock_t'?
extern int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock);
^~~~~~~~~~
clock_t
include/linux/spinlock.h:412:28: error: unknown type name 'spinlock_t'; did you mean 'clock_t'?
int alloc_bucket_spinlocks(spinlock_t **locks, unsigned int *lock_mask,
^~~~~~~~~~
clock_t
include/linux/spinlock.h:416:28: error: unknown type name 'spinlock_t'; did you mean 'clock_t'?
void free_bucket_spinlocks(spinlock_t *locks);
^~~~~~~~~~
clock_t
In file included from include/linux/time.h:6:0,
from include/linux/ktime.h:24,
from include/linux/rcutiny.h:28,
from include/linux/rcupdate.h:211,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/uaccess.h:5,
from arch/x86/include/asm/stacktrace.h:10,
from include/linux/stacktrace.h:6,
from include/linux/lockdep.h:29,
from include/linux/spinlock_types.h:18,
from kernel/bounds.c:14:
include/linux/seqlock.h:51:21: error: field 'dep_map' has incomplete type
struct lockdep_map dep_map;
^~~~~~~
include/linux/seqlock.h:56:15: warning: 'struct lock_class_key' declared inside parameter list will not be visible outside of this definition or declaration
struct lock_class_key *key)
^~~~~~~~~~~~~~
include/linux/seqlock.h: In function '__seqcount_init':
include/linux/seqlock.h:61:2: error: implicit declaration of function 'lockdep_init_map' [-Werror=implicit-function-declaration]
lockdep_init_map(&s->dep_map, name, key, 0);
^~~~~~~~~~~~~~~~
include/linux/seqlock.h: In function 'seqcount_lockdep_reader_access':
include/linux/seqlock.h:81:2: error: implicit declaration of function 'seqcount_acquire_read' [-Werror=implicit-function-declaration]
seqcount_acquire_read(&l->dep_map, 0, 0, _RET_IP_);
^~~~~~~~~~~~~~~~~~~~~
>> include/linux/seqlock.h:82:2: error: implicit declaration of function 'seqcount_release'; did you mean 'seqcount_init'? [-Werror=implicit-function-declaration]
seqcount_release(&l->dep_map, 1, _RET_IP_);
^~~~~~~~~~~~~~~~
seqcount_init
include/linux/seqlock.h: In function 'write_seqcount_begin_nested':
include/linux/seqlock.h:377:2: error: implicit declaration of function 'seqcount_acquire'; did you mean 'seqcount_init'? [-Werror=implicit-function-declaration]
seqcount_acquire(&s->dep_map, subclass, 0, _RET_IP_);
^~~~~~~~~~~~~~~~
seqcount_init
include/linux/seqlock.h: At top level:
include/linux/seqlock.h:406:2: error: unknown type name 'spinlock_t'
spinlock_t lock;
^~~~~~~~~~
include/linux/seqlock.h: In function 'write_seqlock':
include/linux/seqlock.h:448:2: error: implicit declaration of function 'spin_lock'; did you mean 'write_lock'? [-Werror=implicit-function-declaration]
spin_lock(&sl->lock);
^~~~~~~~~
write_lock
include/linux/seqlock.h: In function 'write_sequnlock':
include/linux/seqlock.h:455:2: error: implicit declaration of function 'spin_unlock'; did you mean 'raw_spin_unlock'? [-Werror=implicit-function-declaration]
spin_unlock(&sl->lock);
^~~~~~~~~~~
raw_spin_unlock
include/linux/seqlock.h: In function 'write_seqlock_bh':
include/linux/seqlock.h:460:2: error: implicit declaration of function 'spin_lock_bh'; did you mean 'raw_spin_lock_bh'? [-Werror=implicit-function-declaration]
spin_lock_bh(&sl->lock);
^~~~~~~~~~~~
raw_spin_lock_bh
include/linux/seqlock.h: In function 'write_sequnlock_bh':
include/linux/seqlock.h:467:2: error: implicit declaration of function 'spin_unlock_bh'; did you mean 'write_unlock_bh'? [-Werror=implicit-function-declaration]
spin_unlock_bh(&sl->lock);
^~~~~~~~~~~~~~
write_unlock_bh
include/linux/seqlock.h: In function 'write_seqlock_irq':
include/linux/seqlock.h:472:2: error: implicit declaration of function 'spin_lock_irq'; did you mean 'spin_lock_init'? [-Werror=implicit-function-declaration]
spin_lock_irq(&sl->lock);
^~~~~~~~~~~~~
spin_lock_init
include/linux/seqlock.h: In function 'write_sequnlock_irq':
include/linux/seqlock.h:479:2: error: implicit declaration of function 'spin_unlock_irq'; did you mean 'read_unlock_irq'? [-Werror=implicit-function-declaration]
spin_unlock_irq(&sl->lock);
^~~~~~~~~~~~~~~
read_unlock_irq
In file included from include/linux/seqlock.h:36:0,
from include/linux/time.h:6,
from include/linux/ktime.h:24,
from include/linux/rcutiny.h:28,
from include/linux/rcupdate.h:211,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/uaccess.h:5,
from arch/x86/include/asm/stacktrace.h:10,
from include/linux/stacktrace.h:6,
from include/linux/lockdep.h:29,
from include/linux/spinlock_types.h:18,
from kernel/bounds.c:14:
include/linux/seqlock.h: In function '__write_seqlock_irqsave':
include/linux/spinlock.h:222:11: error: implicit declaration of function '_raw_spin_lock_irqsave'; did you mean 'raw_spin_lock_irqsave'? [-Werror=implicit-function-declaration]
flags = _raw_spin_lock_irqsave(lock); \
^
include/linux/spinlock.h:340:2: note: in expansion of macro 'raw_spin_lock_irqsave'
raw_spin_lock_irqsave(spinlock_check(lock), flags); \
^~~~~~~~~~~~~~~~~~~~~
include/linux/seqlock.h:486:2: note: in expansion of macro 'spin_lock_irqsave'
spin_lock_irqsave(&sl->lock, flags);
^~~~~~~~~~~~~~~~~
include/linux/spinlock.h:340:24: error: implicit declaration of function 'spinlock_check'; did you mean 'cpumask_check'? [-Werror=implicit-function-declaration]
raw_spin_lock_irqsave(spinlock_check(lock), flags); \
^
include/linux/spinlock.h:222:34: note: in definition of macro 'raw_spin_lock_irqsave'
flags = _raw_spin_lock_irqsave(lock); \
^~~~
include/linux/seqlock.h:486:2: note: in expansion of macro 'spin_lock_irqsave'
spin_lock_irqsave(&sl->lock, flags);
^~~~~~~~~~~~~~~~~
In file included from include/linux/time.h:6:0,
from include/linux/ktime.h:24,
from include/linux/rcutiny.h:28,
from include/linux/rcupdate.h:211,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/uaccess.h:5,
from arch/x86/include/asm/stacktrace.h:10,
from include/linux/stacktrace.h:6,
from include/linux/lockdep.h:29,
from include/linux/spinlock_types.h:18,
from kernel/bounds.c:14:
include/linux/seqlock.h: In function 'write_sequnlock_irqrestore':
include/linux/seqlock.h:498:2: error: implicit declaration of function 'spin_unlock_irqrestore'; did you mean 'raw_spin_unlock_irqrestore'? [-Werror=implicit-function-declaration]
spin_unlock_irqrestore(&sl->lock, flags);
^~~~~~~~~~~~~~~~~~~~~~
raw_spin_unlock_irqrestore
In file included from include/linux/rculist.h:11:0,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/uaccess.h:5,
from arch/x86/include/asm/stacktrace.h:10,
from include/linux/stacktrace.h:6,
from include/linux/lockdep.h:29,

vim +82 include/linux/seqlock.h

^1da177e Linus Torvalds 2005-04-16 54
1ca7d67c John Stultz 2013-10-07 55 static inline void __seqcount_init(seqcount_t *s, const char *name,
1ca7d67c John Stultz 2013-10-07 56 struct lock_class_key *key)
1ca7d67c John Stultz 2013-10-07 57 {
1ca7d67c John Stultz 2013-10-07 58 /*
1ca7d67c John Stultz 2013-10-07 59 * Make sure we are not reinitializing a held lock:
1ca7d67c John Stultz 2013-10-07 60 */
1ca7d67c John Stultz 2013-10-07 @61 lockdep_init_map(&s->dep_map, name, key, 0);
1ca7d67c John Stultz 2013-10-07 62 s->sequence = 0;
1ca7d67c John Stultz 2013-10-07 63 }
1ca7d67c John Stultz 2013-10-07 64
1ca7d67c John Stultz 2013-10-07 65 #ifdef CONFIG_DEBUG_LOCK_ALLOC
1ca7d67c John Stultz 2013-10-07 66 # define SEQCOUNT_DEP_MAP_INIT(lockname) \
1ca7d67c John Stultz 2013-10-07 67 .dep_map = { .name = #lockname } \
1ca7d67c John Stultz 2013-10-07 68
1ca7d67c John Stultz 2013-10-07 69 # define seqcount_init(s) \
1ca7d67c John Stultz 2013-10-07 70 do { \
1ca7d67c John Stultz 2013-10-07 71 static struct lock_class_key __key; \
1ca7d67c John Stultz 2013-10-07 72 __seqcount_init((s), #s, &__key); \
1ca7d67c John Stultz 2013-10-07 73 } while (0)
1ca7d67c John Stultz 2013-10-07 74
1ca7d67c John Stultz 2013-10-07 75 static inline void seqcount_lockdep_reader_access(const seqcount_t *s)
1ca7d67c John Stultz 2013-10-07 76 {
1ca7d67c John Stultz 2013-10-07 77 seqcount_t *l = (seqcount_t *)s;
1ca7d67c John Stultz 2013-10-07 78 unsigned long flags;
1ca7d67c John Stultz 2013-10-07 79
1ca7d67c John Stultz 2013-10-07 80 local_irq_save(flags);
1ca7d67c John Stultz 2013-10-07 81 seqcount_acquire_read(&l->dep_map, 0, 0, _RET_IP_);
1ca7d67c John Stultz 2013-10-07 @82 seqcount_release(&l->dep_map, 1, _RET_IP_);
1ca7d67c John Stultz 2013-10-07 83 local_irq_restore(flags);
1ca7d67c John Stultz 2013-10-07 84 }
1ca7d67c John Stultz 2013-10-07 85

:::::: The code at line 82 was first introduced by commit
:::::: 1ca7d67cf5d5a2aef26a8d9afd789006fa098347 seqcount: Add lockdep functionality to seqcount/seqlock structures

:::::: TO: John Stultz <john.stultz@xxxxxxxxxx>
:::::: CC: Ingo Molnar <mingo@xxxxxxxxxx>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip