lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <201705240804.LZIbJicL%fengguang.wu@intel.com>
Date:   Wed, 24 May 2017 08:23:09 +0800
From:   kbuild test robot <fengguang.wu@...el.com>
To:     "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc:     kbuild-all@...org, linux-kernel@...r.kernel.org
Subject: [rcu:ms 3/3] arch/x86//kernel/tboot.c:107:2: error: unknown field
 'mmap_sem' specified in initializer

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git ms
head:   00b05b63697360b35f5f05b08e24028d6baa292d
commit: 00b05b63697360b35f5f05b08e24028d6baa292d [3/3] Rename mmap_sem to mmap_sem1 to test wrapper application
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        git checkout 00b05b63697360b35f5f05b08e24028d6baa292d
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All error/warnings (new ones prefixed by >>):

>> arch/x86//kernel/tboot.c:107:2: error: unknown field 'mmap_sem' specified in initializer
     .mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
     ^
   In file included from include/linux/key.h:23:0,
                    from include/linux/cred.h:17,
                    from include/linux/sched/signal.h:9,
                    from include/linux/ptrace.h:6,
                    from include/linux/ftrace.h:13,
                    from include/linux/init_task.h:8,
                    from arch/x86//kernel/tboot.c:23:
   include/linux/rwsem.h:61:34: error: unknown field 'count' specified in initializer
    #define __RWSEM_INIT_COUNT(name) .count = ATOMIC_LONG_INIT(RWSEM_UNLOCKED_VALUE)
                                     ^
   include/linux/rwsem.h:79:4: note: in expansion of macro '__RWSEM_INIT_COUNT'
     { __RWSEM_INIT_COUNT(name),    \
       ^~~~~~~~~~~~~~~~~~
>> arch/x86//kernel/tboot.c:107:20: note: in expansion of macro '__RWSEM_INITIALIZER'
     .mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
                       ^~~~~~~~~~~~~~~~~~~
>> arch/x86//kernel/tboot.c:107:2: warning: braces around scalar initializer
     .mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
     ^
   arch/x86//kernel/tboot.c:107:2: note: (near initialization for 'tboot_mm.nr_ptes.counter')
   In file included from include/linux/key.h:23:0,
                    from include/linux/cred.h:17,
                    from include/linux/sched/signal.h:9,
                    from include/linux/ptrace.h:6,
                    from include/linux/ftrace.h:13,
                    from include/linux/init_task.h:8,
                    from arch/x86//kernel/tboot.c:23:
   include/linux/rwsem.h:80:4: error: unknown field 'wait_list' specified in initializer
       .wait_list = LIST_HEAD_INIT((name).wait_list), \
       ^
>> arch/x86//kernel/tboot.c:107:20: note: in expansion of macro '__RWSEM_INITIALIZER'
     .mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
                       ^~~~~~~~~~~~~~~~~~~
   In file included from include/linux/preempt.h:10:0,
                    from include/linux/spinlock.h:50,
                    from include/linux/rcupdate.h:38,
                    from include/linux/init_task.h:4,
                    from arch/x86//kernel/tboot.c:23:
   include/linux/list.h:20:30: error: extra brace group at end of initializer
    #define LIST_HEAD_INIT(name) { &(name), &(name) }
                                 ^
   include/linux/rwsem.h:80:17: note: in expansion of macro 'LIST_HEAD_INIT'
       .wait_list = LIST_HEAD_INIT((name).wait_list), \
                    ^~~~~~~~~~~~~~
>> arch/x86//kernel/tboot.c:107:20: note: in expansion of macro '__RWSEM_INITIALIZER'
     .mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
                       ^~~~~~~~~~~~~~~~~~~
   include/linux/list.h:20:30: note: (near initialization for 'tboot_mm.nr_ptes')
    #define LIST_HEAD_INIT(name) { &(name), &(name) }
                                 ^
   include/linux/rwsem.h:80:17: note: in expansion of macro 'LIST_HEAD_INIT'
       .wait_list = LIST_HEAD_INIT((name).wait_list), \
                    ^~~~~~~~~~~~~~
>> arch/x86//kernel/tboot.c:107:20: note: in expansion of macro '__RWSEM_INITIALIZER'
     .mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
                       ^~~~~~~~~~~~~~~~~~~
>> arch/x86//kernel/tboot.c:107:47: error: 'struct mm_struct' has no member named 'mmap_sem'; did you mean 'mmap_sem1'?
     .mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
                                                  ^
   include/linux/list.h:20:34: note: in definition of macro 'LIST_HEAD_INIT'
    #define LIST_HEAD_INIT(name) { &(name), &(name) }
                                     ^~~~
>> arch/x86//kernel/tboot.c:107:20: note: in expansion of macro '__RWSEM_INITIALIZER'
     .mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
                       ^~~~~~~~~~~~~~~~~~~
>> arch/x86//kernel/tboot.c:107:47: error: 'struct mm_struct' has no member named 'mmap_sem'; did you mean 'mmap_sem1'?
     .mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
                                                  ^
   include/linux/list.h:20:43: note: in definition of macro 'LIST_HEAD_INIT'
    #define LIST_HEAD_INIT(name) { &(name), &(name) }
                                              ^~~~
>> arch/x86//kernel/tboot.c:107:20: note: in expansion of macro '__RWSEM_INITIALIZER'
     .mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
                       ^~~~~~~~~~~~~~~~~~~
   include/linux/list.h:20:30: warning: excess elements in struct initializer
    #define LIST_HEAD_INIT(name) { &(name), &(name) }
                                 ^
   include/linux/rwsem.h:80:17: note: in expansion of macro 'LIST_HEAD_INIT'
       .wait_list = LIST_HEAD_INIT((name).wait_list), \
                    ^~~~~~~~~~~~~~
>> arch/x86//kernel/tboot.c:107:20: note: in expansion of macro '__RWSEM_INITIALIZER'
     .mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
                       ^~~~~~~~~~~~~~~~~~~
   include/linux/list.h:20:30: note: (near initialization for 'tboot_mm.nr_ptes')
    #define LIST_HEAD_INIT(name) { &(name), &(name) }
                                 ^
   include/linux/rwsem.h:80:17: note: in expansion of macro 'LIST_HEAD_INIT'
       .wait_list = LIST_HEAD_INIT((name).wait_list), \
                    ^~~~~~~~~~~~~~
>> arch/x86//kernel/tboot.c:107:20: note: in expansion of macro '__RWSEM_INITIALIZER'
     .mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
                       ^~~~~~~~~~~~~~~~~~~
   In file included from include/linux/key.h:23:0,
                    from include/linux/cred.h:17,
                    from include/linux/sched/signal.h:9,
                    from include/linux/ptrace.h:6,
                    from include/linux/ftrace.h:13,
                    from include/linux/init_task.h:8,
                    from arch/x86//kernel/tboot.c:23:
   include/linux/rwsem.h:81:4: error: unknown field 'wait_lock' specified in initializer
       .wait_lock = __RAW_SPIN_LOCK_UNLOCKED(name.wait_lock) \
       ^
>> arch/x86//kernel/tboot.c:107:20: note: in expansion of macro '__RWSEM_INITIALIZER'
     .mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
                       ^~~~~~~~~~~~~~~~~~~
   In file included from include/linux/spinlock.h:81:0,
                    from include/linux/rcupdate.h:38,
                    from include/linux/init_task.h:4,
                    from arch/x86//kernel/tboot.c:23:
   include/linux/spinlock_types.h:60:2: warning: excess elements in struct initializer
     (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname)
     ^
   include/linux/rwsem.h:81:17: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED'
       .wait_lock = __RAW_SPIN_LOCK_UNLOCKED(name.wait_lock) \
                    ^~~~~~~~~~~~~~~~~~~~~~~~
>> arch/x86//kernel/tboot.c:107:20: note: in expansion of macro '__RWSEM_INITIALIZER'
     .mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
                       ^~~~~~~~~~~~~~~~~~~
   include/linux/spinlock_types.h:60:2: note: (near initialization for 'tboot_mm.nr_ptes')
     (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname)
     ^
   include/linux/rwsem.h:81:17: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED'
       .wait_lock = __RAW_SPIN_LOCK_UNLOCKED(name.wait_lock) \
                    ^~~~~~~~~~~~~~~~~~~~~~~~
>> arch/x86//kernel/tboot.c:107:20: note: in expansion of macro '__RWSEM_INITIALIZER'
     .mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
                       ^~~~~~~~~~~~~~~~~~~
   In file included from include/linux/key.h:23:0,
                    from include/linux/cred.h:17,
                    from include/linux/sched/signal.h:9,
                    from include/linux/ptrace.h:6,
                    from include/linux/ftrace.h:13,
                    from include/linux/init_task.h:8,
                    from arch/x86//kernel/tboot.c:23:
>> include/linux/rwsem.h:73:38: error: unknown field 'osq' specified in initializer
    #define __RWSEM_OPT_INIT(lockname) , .osq = OSQ_LOCK_UNLOCKED, .owner = NULL
                                         ^
>> include/linux/rwsem.h:82:4: note: in expansion of macro '__RWSEM_OPT_INIT'
       __RWSEM_OPT_INIT(name)    \
       ^~~~~~~~~~~~~~~~
>> arch/x86//kernel/tboot.c:107:20: note: in expansion of macro '__RWSEM_INITIALIZER'
     .mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
                       ^~~~~~~~~~~~~~~~~~~
   In file included from include/linux/mutex.h:20:0,
                    from include/linux/sched.h:17,
                    from include/linux/utsname.h:5,
                    from include/linux/init_task.h:6,
                    from arch/x86//kernel/tboot.c:23:
>> include/linux/osq_lock.h:25:27: error: extra brace group at end of initializer
    #define OSQ_LOCK_UNLOCKED { ATOMIC_INIT(OSQ_UNLOCKED_VAL) }
                              ^
>> include/linux/rwsem.h:73:45: note: in expansion of macro 'OSQ_LOCK_UNLOCKED'
    #define __RWSEM_OPT_INIT(lockname) , .osq = OSQ_LOCK_UNLOCKED, .owner = NULL
                                                ^~~~~~~~~~~~~~~~~
--
                    from include/linux/spinlock.h:50,
                    from include/linux/rcupdate.h:38,
                    from include/linux/init_task.h:4,
                    from arch/x86/kernel/tboot.c:23:
   include/linux/list.h:20:30: error: extra brace group at end of initializer
    #define LIST_HEAD_INIT(name) { &(name), &(name) }
                                 ^
   include/linux/rwsem.h:80:17: note: in expansion of macro 'LIST_HEAD_INIT'
       .wait_list = LIST_HEAD_INIT((name).wait_list), \
                    ^~~~~~~~~~~~~~
   arch/x86/kernel/tboot.c:107:20: note: in expansion of macro '__RWSEM_INITIALIZER'
     .mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
                       ^~~~~~~~~~~~~~~~~~~
   include/linux/list.h:20:30: note: (near initialization for 'tboot_mm.nr_ptes')
    #define LIST_HEAD_INIT(name) { &(name), &(name) }
                                 ^
   include/linux/rwsem.h:80:17: note: in expansion of macro 'LIST_HEAD_INIT'
       .wait_list = LIST_HEAD_INIT((name).wait_list), \
                    ^~~~~~~~~~~~~~
   arch/x86/kernel/tboot.c:107:20: note: in expansion of macro '__RWSEM_INITIALIZER'
     .mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
                       ^~~~~~~~~~~~~~~~~~~
   arch/x86/kernel/tboot.c:107:47: error: 'struct mm_struct' has no member named 'mmap_sem'; did you mean 'mmap_sem1'?
     .mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
                                                  ^
   include/linux/list.h:20:34: note: in definition of macro 'LIST_HEAD_INIT'
    #define LIST_HEAD_INIT(name) { &(name), &(name) }
                                     ^~~~
   arch/x86/kernel/tboot.c:107:20: note: in expansion of macro '__RWSEM_INITIALIZER'
     .mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
                       ^~~~~~~~~~~~~~~~~~~
   arch/x86/kernel/tboot.c:107:47: error: 'struct mm_struct' has no member named 'mmap_sem'; did you mean 'mmap_sem1'?
     .mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
                                                  ^
   include/linux/list.h:20:43: note: in definition of macro 'LIST_HEAD_INIT'
    #define LIST_HEAD_INIT(name) { &(name), &(name) }
                                              ^~~~
   arch/x86/kernel/tboot.c:107:20: note: in expansion of macro '__RWSEM_INITIALIZER'
     .mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
                       ^~~~~~~~~~~~~~~~~~~
   include/linux/list.h:20:30: warning: excess elements in struct initializer
    #define LIST_HEAD_INIT(name) { &(name), &(name) }
                                 ^
   include/linux/rwsem.h:80:17: note: in expansion of macro 'LIST_HEAD_INIT'
       .wait_list = LIST_HEAD_INIT((name).wait_list), \
                    ^~~~~~~~~~~~~~
   arch/x86/kernel/tboot.c:107:20: note: in expansion of macro '__RWSEM_INITIALIZER'
     .mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
                       ^~~~~~~~~~~~~~~~~~~
   include/linux/list.h:20:30: note: (near initialization for 'tboot_mm.nr_ptes')
    #define LIST_HEAD_INIT(name) { &(name), &(name) }
                                 ^
   include/linux/rwsem.h:80:17: note: in expansion of macro 'LIST_HEAD_INIT'
       .wait_list = LIST_HEAD_INIT((name).wait_list), \
                    ^~~~~~~~~~~~~~
   arch/x86/kernel/tboot.c:107:20: note: in expansion of macro '__RWSEM_INITIALIZER'
     .mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
                       ^~~~~~~~~~~~~~~~~~~
   In file included from include/linux/key.h:23:0,
                    from include/linux/cred.h:17,
                    from include/linux/sched/signal.h:9,
                    from include/linux/ptrace.h:6,
                    from include/linux/ftrace.h:13,
                    from include/linux/init_task.h:8,
                    from arch/x86/kernel/tboot.c:23:
   include/linux/rwsem.h:81:4: error: unknown field 'wait_lock' specified in initializer
       .wait_lock = __RAW_SPIN_LOCK_UNLOCKED(name.wait_lock) \
       ^
   arch/x86/kernel/tboot.c:107:20: note: in expansion of macro '__RWSEM_INITIALIZER'
     .mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
                       ^~~~~~~~~~~~~~~~~~~
   In file included from include/linux/spinlock.h:81:0,
                    from include/linux/rcupdate.h:38,
                    from include/linux/init_task.h:4,
                    from arch/x86/kernel/tboot.c:23:
   include/linux/spinlock_types.h:60:2: warning: excess elements in struct initializer
     (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname)
     ^
   include/linux/rwsem.h:81:17: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED'
       .wait_lock = __RAW_SPIN_LOCK_UNLOCKED(name.wait_lock) \
                    ^~~~~~~~~~~~~~~~~~~~~~~~
   arch/x86/kernel/tboot.c:107:20: note: in expansion of macro '__RWSEM_INITIALIZER'
     .mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
                       ^~~~~~~~~~~~~~~~~~~
   include/linux/spinlock_types.h:60:2: note: (near initialization for 'tboot_mm.nr_ptes')
     (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname)
     ^
   include/linux/rwsem.h:81:17: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED'
       .wait_lock = __RAW_SPIN_LOCK_UNLOCKED(name.wait_lock) \
                    ^~~~~~~~~~~~~~~~~~~~~~~~
   arch/x86/kernel/tboot.c:107:20: note: in expansion of macro '__RWSEM_INITIALIZER'
     .mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
                       ^~~~~~~~~~~~~~~~~~~
   In file included from include/linux/key.h:23:0,
                    from include/linux/cred.h:17,
                    from include/linux/sched/signal.h:9,
                    from include/linux/ptrace.h:6,
                    from include/linux/ftrace.h:13,
                    from include/linux/init_task.h:8,
                    from arch/x86/kernel/tboot.c:23:
>> include/linux/rwsem.h:73:38: error: unknown field 'osq' specified in initializer
    #define __RWSEM_OPT_INIT(lockname) , .osq = OSQ_LOCK_UNLOCKED, .owner = NULL
                                         ^
>> include/linux/rwsem.h:82:4: note: in expansion of macro '__RWSEM_OPT_INIT'
       __RWSEM_OPT_INIT(name)    \
       ^~~~~~~~~~~~~~~~
   arch/x86/kernel/tboot.c:107:20: note: in expansion of macro '__RWSEM_INITIALIZER'
     .mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
                       ^~~~~~~~~~~~~~~~~~~
   In file included from include/linux/mutex.h:20:0,
                    from include/linux/sched.h:17,
                    from include/linux/utsname.h:5,
                    from include/linux/init_task.h:6,
                    from arch/x86/kernel/tboot.c:23:
>> include/linux/osq_lock.h:25:27: error: extra brace group at end of initializer
    #define OSQ_LOCK_UNLOCKED { ATOMIC_INIT(OSQ_UNLOCKED_VAL) }
                              ^
>> include/linux/rwsem.h:73:45: note: in expansion of macro 'OSQ_LOCK_UNLOCKED'
    #define __RWSEM_OPT_INIT(lockname) , .osq = OSQ_LOCK_UNLOCKED, .owner = NULL
                                                ^~~~~~~~~~~~~~~~~
>> include/linux/rwsem.h:82:4: note: in expansion of macro '__RWSEM_OPT_INIT'
       __RWSEM_OPT_INIT(name)    \
       ^~~~~~~~~~~~~~~~
   arch/x86/kernel/tboot.c:107:20: note: in expansion of macro '__RWSEM_INITIALIZER'
     .mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
                       ^~~~~~~~~~~~~~~~~~~
   include/linux/osq_lock.h:25:27: note: (near initialization for 'tboot_mm.nr_ptes')
    #define OSQ_LOCK_UNLOCKED { ATOMIC_INIT(OSQ_UNLOCKED_VAL) }
                              ^
>> include/linux/rwsem.h:73:45: note: in expansion of macro 'OSQ_LOCK_UNLOCKED'
    #define __RWSEM_OPT_INIT(lockname) , .osq = OSQ_LOCK_UNLOCKED, .owner = NULL
                                                ^~~~~~~~~~~~~~~~~
>> include/linux/rwsem.h:82:4: note: in expansion of macro '__RWSEM_OPT_INIT'
       __RWSEM_OPT_INIT(name)    \
       ^~~~~~~~~~~~~~~~
   arch/x86/kernel/tboot.c:107:20: note: in expansion of macro '__RWSEM_INITIALIZER'
     .mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
                       ^~~~~~~~~~~~~~~~~~~
   In file included from arch/x86/include/asm/msr.h:66:0,
                    from arch/x86/include/asm/processor.h:20,
                    from arch/x86/include/asm/cpufeature.h:4,
                    from arch/x86/include/asm/thread_info.h:52,
                    from include/linux/thread_info.h:37,
                    from arch/x86/include/asm/preempt.h:6,
                    from include/linux/preempt.h:80,
                    from include/linux/spinlock.h:50,
                    from include/linux/rcupdate.h:38,
                    from include/linux/init_task.h:4,
                    from arch/x86/kernel/tboot.c:23:
>> arch/x86/include/asm/atomic.h:16:24: error: extra brace group at end of initializer
    #define ATOMIC_INIT(i) { (i) }
                           ^
>> include/linux/osq_lock.h:25:29: note: in expansion of macro 'ATOMIC_INIT'
    #define OSQ_LOCK_UNLOCKED { ATOMIC_INIT(OSQ_UNLOCKED_VAL) }
                                ^~~~~~~~~~~
>> include/linux/rwsem.h:73:45: note: in expansion of macro 'OSQ_LOCK_UNLOCKED'
    #define __RWSEM_OPT_INIT(lockname) , .osq = OSQ_LOCK_UNLOCKED, .owner = NULL
                                                ^~~~~~~~~~~~~~~~~
>> include/linux/rwsem.h:82:4: note: in expansion of macro '__RWSEM_OPT_INIT'
       __RWSEM_OPT_INIT(name)    \
       ^~~~~~~~~~~~~~~~
   arch/x86/kernel/tboot.c:107:20: note: in expansion of macro '__RWSEM_INITIALIZER'
     .mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
                       ^~~~~~~~~~~~~~~~~~~
   arch/x86/include/asm/atomic.h:16:24: note: (near initialization for 'tboot_mm.nr_ptes')
    #define ATOMIC_INIT(i) { (i) }
                           ^
>> include/linux/osq_lock.h:25:29: note: in expansion of macro 'ATOMIC_INIT'
    #define OSQ_LOCK_UNLOCKED { ATOMIC_INIT(OSQ_UNLOCKED_VAL) }
                                ^~~~~~~~~~~
>> include/linux/rwsem.h:73:45: note: in expansion of macro 'OSQ_LOCK_UNLOCKED'
    #define __RWSEM_OPT_INIT(lockname) , .osq = OSQ_LOCK_UNLOCKED, .owner = NULL
                                                ^~~~~~~~~~~~~~~~~
>> include/linux/rwsem.h:82:4: note: in expansion of macro '__RWSEM_OPT_INIT'
       __RWSEM_OPT_INIT(name)    \
       ^~~~~~~~~~~~~~~~
   arch/x86/kernel/tboot.c:107:20: note: in expansion of macro '__RWSEM_INITIALIZER'
     .mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
                       ^~~~~~~~~~~~~~~~~~~
   In file included from include/linux/mutex.h:20:0,
                    from include/linux/sched.h:17,
                    from include/linux/utsname.h:5,
                    from include/linux/init_task.h:6,
                    from arch/x86/kernel/tboot.c:23:
>> include/linux/osq_lock.h:25:27: warning: excess elements in struct initializer
    #define OSQ_LOCK_UNLOCKED { ATOMIC_INIT(OSQ_UNLOCKED_VAL) }
                              ^
>> include/linux/rwsem.h:73:45: note: in expansion of macro 'OSQ_LOCK_UNLOCKED'
    #define __RWSEM_OPT_INIT(lockname) , .osq = OSQ_LOCK_UNLOCKED, .owner = NULL
                                                ^~~~~~~~~~~~~~~~~
>> include/linux/rwsem.h:82:4: note: in expansion of macro '__RWSEM_OPT_INIT'
       __RWSEM_OPT_INIT(name)    \
       ^~~~~~~~~~~~~~~~
   arch/x86/kernel/tboot.c:107:20: note: in expansion of macro '__RWSEM_INITIALIZER'
     .mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
                       ^~~~~~~~~~~~~~~~~~~
   include/linux/osq_lock.h:25:27: note: (near initialization for 'tboot_mm.nr_ptes')
    #define OSQ_LOCK_UNLOCKED { ATOMIC_INIT(OSQ_UNLOCKED_VAL) }
                              ^
>> include/linux/rwsem.h:73:45: note: in expansion of macro 'OSQ_LOCK_UNLOCKED'
    #define __RWSEM_OPT_INIT(lockname) , .osq = OSQ_LOCK_UNLOCKED, .owner = NULL
                                                ^~~~~~~~~~~~~~~~~
>> include/linux/rwsem.h:82:4: note: in expansion of macro '__RWSEM_OPT_INIT'
       __RWSEM_OPT_INIT(name)    \
       ^~~~~~~~~~~~~~~~
   arch/x86/kernel/tboot.c:107:20: note: in expansion of macro '__RWSEM_INITIALIZER'
     .mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
                       ^~~~~~~~~~~~~~~~~~~
   In file included from include/linux/key.h:23:0,
                    from include/linux/cred.h:17,
                    from include/linux/sched/signal.h:9,
                    from include/linux/ptrace.h:6,
                    from include/linux/ftrace.h:13,
                    from include/linux/init_task.h:8,
                    from arch/x86/kernel/tboot.c:23:
>> include/linux/rwsem.h:73:64: error: unknown field 'owner' specified in initializer
    #define __RWSEM_OPT_INIT(lockname) , .osq = OSQ_LOCK_UNLOCKED, .owner = NULL
                                                                   ^

vim +/mmap_sem +107 arch/x86//kernel/tboot.c

31625340 Joseph Cihula   2009-06-30   17   * this program; if not, write to the Free Software Foundation, Inc.,
31625340 Joseph Cihula   2009-06-30   18   * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
31625340 Joseph Cihula   2009-06-30   19   *
31625340 Joseph Cihula   2009-06-30   20   */
31625340 Joseph Cihula   2009-06-30   21  
31625340 Joseph Cihula   2009-06-30   22  #include <linux/dma_remapping.h>
31625340 Joseph Cihula   2009-06-30  @23  #include <linux/init_task.h>
31625340 Joseph Cihula   2009-06-30   24  #include <linux/spinlock.h>
69c60c88 Paul Gortmaker  2011-05-26   25  #include <linux/export.h>
69575d38 Shane Wang      2009-09-01   26  #include <linux/delay.h>
31625340 Joseph Cihula   2009-06-30   27  #include <linux/sched.h>
31625340 Joseph Cihula   2009-06-30   28  #include <linux/init.h>
31625340 Joseph Cihula   2009-06-30   29  #include <linux/dmar.h>
69575d38 Shane Wang      2009-09-01   30  #include <linux/cpu.h>
31625340 Joseph Cihula   2009-06-30   31  #include <linux/pfn.h>
31625340 Joseph Cihula   2009-06-30   32  #include <linux/mm.h>
69575d38 Shane Wang      2009-09-01   33  #include <linux/tboot.h>
13bfd47a Qiaowei Ren     2013-06-24   34  #include <linux/debugfs.h>
31625340 Joseph Cihula   2009-06-30   35  
c9b77ccb Jarkko Sakkinen 2012-05-08   36  #include <asm/realmode.h>
31625340 Joseph Cihula   2009-06-30   37  #include <asm/processor.h>
31625340 Joseph Cihula   2009-06-30   38  #include <asm/bootparam.h>
31625340 Joseph Cihula   2009-06-30   39  #include <asm/pgtable.h>
31625340 Joseph Cihula   2009-06-30   40  #include <asm/pgalloc.h>
b7f080cf Alexey Dobriyan 2011-06-16   41  #include <asm/swiotlb.h>
81e2d7b3 H. Peter Anvin  2009-08-12   42  #include <asm/fixmap.h>
58c41d28 H. Peter Anvin  2009-08-14   43  #include <asm/proto.h>
31625340 Joseph Cihula   2009-06-30   44  #include <asm/setup.h>
66441bd3 Ingo Molnar     2017-01-27   45  #include <asm/e820/api.h>
31625340 Joseph Cihula   2009-06-30   46  #include <asm/io.h>
31625340 Joseph Cihula   2009-06-30   47  
bf8b88e9 Jarkko Sakkinen 2012-05-08   48  #include "../realmode/rm/wakeup.h"
31625340 Joseph Cihula   2009-06-30   49  
31625340 Joseph Cihula   2009-06-30   50  /* Global pointer to shared data; NULL means no measured launch. */
31625340 Joseph Cihula   2009-06-30   51  struct tboot *tboot __read_mostly;
cafd6659 Shane Wang      2010-04-29   52  EXPORT_SYMBOL(tboot);
31625340 Joseph Cihula   2009-06-30   53  
31625340 Joseph Cihula   2009-06-30   54  /* timeout for APs (in secs) to enter wait-for-SIPI state during shutdown */
31625340 Joseph Cihula   2009-06-30   55  #define AP_WAIT_TIMEOUT		1
31625340 Joseph Cihula   2009-06-30   56  
31625340 Joseph Cihula   2009-06-30   57  #undef pr_fmt
31625340 Joseph Cihula   2009-06-30   58  #define pr_fmt(fmt)	"tboot: " fmt
31625340 Joseph Cihula   2009-06-30   59  
31625340 Joseph Cihula   2009-06-30   60  static u8 tboot_uuid[16] __initdata = TBOOT_UUID;
31625340 Joseph Cihula   2009-06-30   61  
31625340 Joseph Cihula   2009-06-30   62  void __init tboot_probe(void)
31625340 Joseph Cihula   2009-06-30   63  {
31625340 Joseph Cihula   2009-06-30   64  	/* Look for valid page-aligned address for shared page. */
31625340 Joseph Cihula   2009-06-30   65  	if (!boot_params.tboot_addr)
31625340 Joseph Cihula   2009-06-30   66  		return;
31625340 Joseph Cihula   2009-06-30   67  	/*
31625340 Joseph Cihula   2009-06-30   68  	 * also verify that it is mapped as we expect it before calling
31625340 Joseph Cihula   2009-06-30   69  	 * set_fixmap(), to reduce chance of garbage value causing crash
31625340 Joseph Cihula   2009-06-30   70  	 */
3bce64f0 Ingo Molnar     2017-01-28   71  	if (!e820__mapped_any(boot_params.tboot_addr,
09821ff1 Ingo Molnar     2017-01-28   72  			     boot_params.tboot_addr, E820_TYPE_RESERVED)) {
09821ff1 Ingo Molnar     2017-01-28   73  		pr_warning("non-0 tboot_addr but it is not of type E820_TYPE_RESERVED\n");
31625340 Joseph Cihula   2009-06-30   74  		return;
31625340 Joseph Cihula   2009-06-30   75  	}
31625340 Joseph Cihula   2009-06-30   76  
31625340 Joseph Cihula   2009-06-30   77  	/* Map and check for tboot UUID. */
31625340 Joseph Cihula   2009-06-30   78  	set_fixmap(FIX_TBOOT_BASE, boot_params.tboot_addr);
31625340 Joseph Cihula   2009-06-30   79  	tboot = (struct tboot *)fix_to_virt(FIX_TBOOT_BASE);
31625340 Joseph Cihula   2009-06-30   80  	if (memcmp(&tboot_uuid, &tboot->uuid, sizeof(tboot->uuid))) {
31625340 Joseph Cihula   2009-06-30   81  		pr_warning("tboot at 0x%llx is invalid\n",
31625340 Joseph Cihula   2009-06-30   82  			   boot_params.tboot_addr);
31625340 Joseph Cihula   2009-06-30   83  		tboot = NULL;
31625340 Joseph Cihula   2009-06-30   84  		return;
31625340 Joseph Cihula   2009-06-30   85  	}
31625340 Joseph Cihula   2009-06-30   86  	if (tboot->version < 5) {
31625340 Joseph Cihula   2009-06-30   87  		pr_warning("tboot version is invalid: %u\n", tboot->version);
31625340 Joseph Cihula   2009-06-30   88  		tboot = NULL;
31625340 Joseph Cihula   2009-06-30   89  		return;
31625340 Joseph Cihula   2009-06-30   90  	}
31625340 Joseph Cihula   2009-06-30   91  
31625340 Joseph Cihula   2009-06-30   92  	pr_info("found shared page at phys addr 0x%llx:\n",
31625340 Joseph Cihula   2009-06-30   93  		boot_params.tboot_addr);
31625340 Joseph Cihula   2009-06-30   94  	pr_debug("version: %d\n", tboot->version);
31625340 Joseph Cihula   2009-06-30   95  	pr_debug("log_addr: 0x%08x\n", tboot->log_addr);
31625340 Joseph Cihula   2009-06-30   96  	pr_debug("shutdown_entry: 0x%x\n", tboot->shutdown_entry);
31625340 Joseph Cihula   2009-06-30   97  	pr_debug("tboot_base: 0x%08x\n", tboot->tboot_base);
31625340 Joseph Cihula   2009-06-30   98  	pr_debug("tboot_size: 0x%x\n", tboot->tboot_size);
31625340 Joseph Cihula   2009-06-30   99  }
31625340 Joseph Cihula   2009-06-30  100  
11520e5e Linus Torvalds  2012-12-15  101  static pgd_t *tboot_pg_dir;
11520e5e Linus Torvalds  2012-12-15  102  static struct mm_struct tboot_mm = {
11520e5e Linus Torvalds  2012-12-15  103  	.mm_rb          = RB_ROOT,
11520e5e Linus Torvalds  2012-12-15  104  	.pgd            = swapper_pg_dir,
11520e5e Linus Torvalds  2012-12-15  105  	.mm_users       = ATOMIC_INIT(2),
11520e5e Linus Torvalds  2012-12-15  106  	.mm_count       = ATOMIC_INIT(1),
11520e5e Linus Torvalds  2012-12-15 @107  	.mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
11520e5e Linus Torvalds  2012-12-15  108  	.page_table_lock =  __SPIN_LOCK_UNLOCKED(init_mm.page_table_lock),
11520e5e Linus Torvalds  2012-12-15  109  	.mmlist         = LIST_HEAD_INIT(init_mm.mmlist),
11520e5e Linus Torvalds  2012-12-15  110  };

:::::: The code at line 107 was first introduced by commit
:::::: 11520e5e7c1855fc3bf202bb3be35a39d9efa034 Revert "x86-64/efi: Use EFI to deal with platform wall clock (again)"

:::::: TO: Linus Torvalds <torvalds@...ux-foundation.org>
:::::: CC: Linus Torvalds <torvalds@...ux-foundation.org>

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

Download attachment ".config.gz" of type "application/gzip" (60031 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ