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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 31 Mar 2017 13:57:10 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Kees Cook <keescook@...omium.org>
Cc:     kbuild-all@...org, linux-kernel@...r.kernel.org,
        Rik van Riel <riel@...hat.com>,
        Andy Lutomirski <luto@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
        Paolo Bonzini <pbonzini@...hat.com>,
        Radim Krčmář <rkrcmar@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Yu-cheng Yu <yu-cheng.yu@...el.com>,
        Masahiro Yamada <yamada.masahiro@...ionext.com>,
        Borislav Petkov <bp@...e.de>,
        Christian Borntraeger <borntraeger@...ibm.com>,
        Thomas Garnier <thgarnie@...gle.com>,
        Brian Gerst <brgerst@...il.com>,
        He Chen <he.chen@...ux.intel.com>,
        Mathias Krause <minipli@...glemail.com>,
        Fenghua Yu <fenghua.yu@...el.com>,
        Piotr Luc <piotr.luc@...el.com>, Kyle Huey <me@...ehuey.com>,
        Len Brown <len.brown@...el.com>, kvm@...r.kernel.org,
        kernel-hardening@...ts.openwall.com
Subject: Re: [PATCH] x86/fpu: move FPU state into separate cache

Hi Kees,

[auto build test ERROR on kvm/linux-next]
[also build test ERROR on v4.11-rc4 next-20170330]
[cannot apply to tip/x86/core]
[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/Kees-Cook/x86-fpu-move-FPU-state-into-separate-cache/20170331-110507
base:   https://git.kernel.org/pub/scm/virt/kvm/kvm.git linux-next
config: i386-randconfig-s0-201713 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

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

   In file included from arch/x86/include/asm/cpufeature.h:4:0,
                    from arch/x86/include/asm/thread_info.h:52,
                    from include/linux/thread_info.h:25,
                    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 init/init_task.c:1:
>> arch/x86/include/asm/processor.h:805:17: error: 'init_fpregs_state' undeclared here (not in a function)
     .fpu.state  = &init_fpregs_state,     \
                    ^
>> include/linux/init_task.h:255:13: note: in expansion of macro 'INIT_THREAD'
     .thread  = INIT_THREAD,     \
                ^~~~~~~~~~~
>> init/init_task.c:19:32: note: in expansion of macro 'INIT_TASK'
    struct task_struct init_task = INIT_TASK(init_task);
                                   ^~~~~~~~~
--
   In file included from arch/x86/math-emu/fpu_entry.c:35:0:
   arch/x86/math-emu/status_w.h: In function 'setcc':
>> arch/x86/math-emu/fpu_system.h:71:30: error: 'get_current()->thread.fpu.state' is a pointer; did you mean to use '->'?
    #define partial_status  (I387->soft.swd)
                                 ^
     ->
>> arch/x86/math-emu/status_w.h:53:2: note: in expansion of macro 'partial_status'
     partial_status &= ~(SW_C0 | SW_C1 | SW_C2 | SW_C3);
     ^~~~~~~~~~~~~~
>> arch/x86/math-emu/fpu_system.h:71:30: error: 'get_current()->thread.fpu.state' is a pointer; did you mean to use '->'?
    #define partial_status  (I387->soft.swd)
                                 ^
     ->
   arch/x86/math-emu/status_w.h:54:2: note: in expansion of macro 'partial_status'
     partial_status |= (cc) & (SW_C0 | SW_C1 | SW_C2 | SW_C3);
     ^~~~~~~~~~~~~~
   arch/x86/math-emu/fpu_entry.c: In function 'math_emulate':
   arch/x86/math-emu/fpu_system.h:50:24: error: 'get_current()->thread.fpu.state' is a pointer; did you mean to use '->'?
    #define FPU_info  (I387->soft.info)
                           ^
     ->
>> arch/x86/math-emu/fpu_entry.c:126:2: note: in expansion of macro 'FPU_info'
     FPU_info = info;
     ^~~~~~~~
   arch/x86/math-emu/fpu_system.h:50:24: error: 'get_current()->thread.fpu.state' is a pointer; did you mean to use '->'?
    #define FPU_info  (I387->soft.info)
                           ^
     ->
>> arch/x86/math-emu/fpu_system.h:58:24: note: in expansion of macro 'FPU_info'
    #define FPU_ORIG_EIP  (FPU_info->___orig_eip)
                           ^~~~~~~~
>> arch/x86/math-emu/fpu_entry.c:128:2: note: in expansion of macro 'FPU_ORIG_EIP'
     FPU_ORIG_EIP = FPU_EIP;
     ^~~~~~~~~~~~
   arch/x86/math-emu/fpu_system.h:50:24: error: 'get_current()->thread.fpu.state' is a pointer; did you mean to use '->'?
    #define FPU_info  (I387->soft.info)
                           ^
                    ->
   arch/x86/math-emu/fpu_system.h:57:20: note: in expansion of macro 'FPU_info'
    #define FPU_EIP   (FPU_info->regs->ip)
                       ^~~~~~~~
>> arch/x86/math-emu/fpu_entry.c:128:17: note: in expansion of macro 'FPU_EIP'
     FPU_ORIG_EIP = FPU_EIP;
                    ^~~~~~~
   arch/x86/math-emu/fpu_system.h:50:24: error: 'get_current()->thread.fpu.state' is a pointer; did you mean to use '->'?
    #define FPU_info  (I387->soft.info)
                           ^
          ->
   arch/x86/math-emu/fpu_system.h:56:22: note: in expansion of macro 'FPU_info'
    #define FPU_EFLAGS  (FPU_info->regs->flags)
                         ^~~~~~~~
>> arch/x86/math-emu/fpu_entry.c:130:7: note: in expansion of macro 'FPU_EFLAGS'
     if ((FPU_EFLAGS & 0x00020000) != 0) {
          ^~~~~~~~~~
   arch/x86/math-emu/fpu_system.h:50:24: error: 'get_current()->thread.fpu.state' is a pointer; did you mean to use '->'?
    #define FPU_info  (I387->soft.info)
                           ^
      ->
   arch/x86/math-emu/fpu_system.h:57:20: note: in expansion of macro 'FPU_info'
    #define FPU_EIP   (FPU_info->regs->ip)
                       ^~~~~~~~
   arch/x86/math-emu/fpu_entry.c:133:3: note: in expansion of macro 'FPU_EIP'
      FPU_EIP += code_base = FPU_CS << 4;
      ^~~~~~~
   arch/x86/math-emu/fpu_system.h:50:24: error: 'get_current()->thread.fpu.state' is a pointer; did you mean to use '->'?
    #define FPU_info  (I387->soft.info)
                           ^
                             ->
   arch/x86/math-emu/fpu_system.h:52:41: note: in expansion of macro 'FPU_info'
    #define FPU_CS   (*(unsigned short *) &(FPU_info->regs->cs))
                                            ^~~~~~~~
>> arch/x86/math-emu/fpu_entry.c:133:26: note: in expansion of macro 'FPU_CS'
      FPU_EIP += code_base = FPU_CS << 4;
                             ^~~~~~
   arch/x86/math-emu/fpu_system.h:50:24: error: 'get_current()->thread.fpu.state' is a pointer; did you mean to use '->'?
    #define FPU_info  (I387->soft.info)
                           ^
                ->
   arch/x86/math-emu/fpu_system.h:52:41: note: in expansion of macro 'FPU_info'
    #define FPU_CS   (*(unsigned short *) &(FPU_info->regs->cs))
                                            ^~~~~~~~
   arch/x86/math-emu/fpu_entry.c:135:13: note: in expansion of macro 'FPU_CS'
     } else if (FPU_CS == __USER_CS && FPU_DS == __USER_DS) {
                ^~~~~~
   arch/x86/math-emu/fpu_system.h:50:24: error: 'get_current()->thread.fpu.state' is a pointer; did you mean to use '->'?
    #define FPU_info  (I387->soft.info)
                           ^
                                       ->
   arch/x86/math-emu/fpu_system.h:54:41: note: in expansion of macro 'FPU_info'
    #define FPU_DS   (*(unsigned short *) &(FPU_info->regs->ds))
                                            ^~~~~~~~
>> arch/x86/math-emu/fpu_entry.c:135:36: note: in expansion of macro 'FPU_DS'
     } else if (FPU_CS == __USER_CS && FPU_DS == __USER_DS) {
                                       ^~~~~~
   arch/x86/math-emu/fpu_system.h:50:24: error: 'get_current()->thread.fpu.state' is a pointer; did you mean to use '->'?
    #define FPU_info  (I387->soft.info)
                           ^
                ->
   arch/x86/math-emu/fpu_system.h:52:41: note: in expansion of macro 'FPU_info'
    #define FPU_CS   (*(unsigned short *) &(FPU_info->regs->cs))
                                            ^~~~~~~~
   arch/x86/math-emu/fpu_entry.c:137:13: note: in expansion of macro 'FPU_CS'
     } else if (FPU_CS == __KERNEL_CS) {
                ^~~~~~
   arch/x86/math-emu/fpu_system.h:50:24: error: 'get_current()->thread.fpu.state' is a pointer; did you mean to use '->'?
    #define FPU_info  (I387->soft.info)
                           ^
                                           ->
   arch/x86/math-emu/fpu_system.h:52:41: note: in expansion of macro 'FPU_info'
    #define FPU_CS   (*(unsigned short *) &(FPU_info->regs->cs))
                                            ^~~~~~~~
   arch/x86/math-emu/fpu_entry.c:138:40: note: in expansion of macro 'FPU_CS'
      printk("math_emulate: %04x:%08lx\n", FPU_CS, FPU_EIP);
                                           ^~~~~~
   arch/x86/math-emu/fpu_system.h:50:24: error: 'get_current()->thread.fpu.state' is a pointer; did you mean to use '->'?
    #define FPU_info  (I387->soft.info)
                           ^
                                                   ->
   arch/x86/math-emu/fpu_system.h:57:20: note: in expansion of macro 'FPU_info'
    #define FPU_EIP   (FPU_info->regs->ip)
                       ^~~~~~~~
   arch/x86/math-emu/fpu_entry.c:138:48: note: in expansion of macro 'FPU_EIP'
      printk("math_emulate: %04x:%08lx\n", FPU_CS, FPU_EIP);
                                                   ^~~~~~~
   arch/x86/math-emu/fpu_system.h:50:24: error: 'get_current()->thread.fpu.state' is a pointer; did you mean to use '->'?
    #define FPU_info  (I387->soft.info)
                           ^
           ->
   arch/x86/math-emu/fpu_system.h:52:41: note: in expansion of macro 'FPU_info'
    #define FPU_CS   (*(unsigned short *) &(FPU_info->regs->cs))
                                            ^~~~~~~~
   arch/x86/math-emu/fpu_entry.c:142:8: note: in expansion of macro 'FPU_CS'
      if ((FPU_CS & 4) != 4) { /* Must be in the LDT */
           ^~~~~~
   arch/x86/math-emu/fpu_system.h:50:24: error: 'get_current()->thread.fpu.state' is a pointer; did you mean to use '->'?
    #define FPU_info  (I387->soft.info)
                           ^
                  ->
   arch/x86/math-emu/fpu_entry.c:146:15: note: in expansion of macro 'FPU_info'
       math_abort(FPU_info, SIGILL);
                  ^~~~~~~~
   arch/x86/math-emu/fpu_system.h:50:24: error: 'get_current()->thread.fpu.state' is a pointer; did you mean to use '->'?
    #define FPU_info  (I387->soft.info)
                           ^
                                               ->
   arch/x86/math-emu/fpu_system.h:52:41: note: in expansion of macro 'FPU_info'
    #define FPU_CS   (*(unsigned short *) &(FPU_info->regs->cs))
                                            ^~~~~~~~
   arch/x86/math-emu/fpu_entry.c:149:44: note: in expansion of macro 'FPU_CS'
      code_descriptor = FPU_get_ldt_descriptor(FPU_CS);
                                               ^~~~~~
   arch/x86/math-emu/fpu_system.h:50:24: error: 'get_current()->thread.fpu.state' is a pointer; did you mean to use '->'?
    #define FPU_info  (I387->soft.info)
                           ^
      ->
   arch/x86/math-emu/fpu_system.h:57:20: note: in expansion of macro 'FPU_info'
    #define FPU_EIP   (FPU_info->regs->ip)
                       ^~~~~~~~
   arch/x86/math-emu/fpu_entry.c:158:3: note: in expansion of macro 'FPU_EIP'
      FPU_EIP += code_base = SEG_BASE_ADDR(code_descriptor);
      ^~~~~~~
   arch/x86/math-emu/fpu_system.h:60:38: error: 'get_current()->thread.fpu.state' is a pointer; did you mean to use '->'?
    #define FPU_lookahead           (I387->soft.lookahead)
                                         ^
     ->
>> arch/x86/math-emu/fpu_entry.c:167:2: note: in expansion of macro 'FPU_lookahead'
     FPU_lookahead = !(FPU_EFLAGS & X86_EFLAGS_TF);
     ^~~~~~~~~~~~~
   arch/x86/math-emu/fpu_system.h:50:24: error: 'get_current()->thread.fpu.state' is a pointer; did you mean to use '->'?
    #define FPU_info  (I387->soft.info)
                           ^
                       ->
   arch/x86/math-emu/fpu_system.h:56:22: note: in expansion of macro 'FPU_info'
    #define FPU_EFLAGS  (FPU_info->regs->flags)
                         ^~~~~~~~
   arch/x86/math-emu/fpu_entry.c:167:20: note: in expansion of macro 'FPU_EFLAGS'
     FPU_lookahead = !(FPU_EFLAGS & X86_EFLAGS_TF);
                       ^~~~~~~~~~
   arch/x86/math-emu/fpu_system.h:50:24: error: 'get_current()->thread.fpu.state' is a pointer; did you mean to use '->'?
    #define FPU_info  (I387->soft.info)
                           ^
                                                    ->
   arch/x86/math-emu/fpu_system.h:57:20: note: in expansion of macro 'FPU_info'
    #define FPU_EIP   (FPU_info->regs->ip)
                       ^~~~~~~~
   arch/x86/math-emu/fpu_entry.c:169:49: note: in expansion of macro 'FPU_EIP'
     if (!valid_prefix(&byte1, (u_char __user **) & FPU_EIP,
                                                    ^~~~~~~
   arch/x86/math-emu/fpu_system.h:50:24: error: 'get_current()->thread.fpu.state' is a pointer; did you mean to use '->'?
    #define FPU_info  (I387->soft.info)
                           ^
                 ->
   arch/x86/math-emu/fpu_entry.c:178:14: note: in expansion of macro 'FPU_info'
      math_abort(FPU_info, SIGILL);
                 ^~~~~~~~
   arch/x86/math-emu/fpu_system.h:64:41: error: 'get_current()->thread.fpu.state' is a pointer; did you mean to use '->'?
    #define no_ip_update  (*(u_char *)&(I387->soft.no_update))
                                            ^
     ->
>> arch/x86/math-emu/fpu_entry.c:183:2: note: in expansion of macro 'no_ip_update'
     no_ip_update = 0;
     ^~~~~~~~~~~~
   arch/x86/math-emu/fpu_system.h:50:24: error: 'get_current()->thread.fpu.state' is a pointer; did you mean to use '->'?
    #define FPU_info  (I387->soft.info)
                           ^
     ->
   arch/x86/math-emu/fpu_system.h:57:20: note: in expansion of macro 'FPU_info'
    #define FPU_EIP   (FPU_info->regs->ip)
                       ^~~~~~~~
   arch/x86/math-emu/fpu_entry.c:185:2: note: in expansion of macro 'FPU_EIP'
     FPU_EIP++;  /* We have fetched the prefix and first code bytes. */
     ^~~~~~~
   arch/x86/math-emu/fpu_system.h:50:24: error: 'get_current()->thread.fpu.state' is a pointer; did you mean to use '->'?
    #define FPU_info  (I387->soft.info)
                           ^
          ->
   arch/x86/math-emu/fpu_system.h:57:20: note: in expansion of macro 'FPU_info'
    #define FPU_EIP   (FPU_info->regs->ip)
                       ^~~~~~~~
   arch/x86/math-emu/fpu_entry.c:190:7: note: in expansion of macro 'FPU_EIP'
      if (FPU_EIP > code_limit)
          ^~~~~~~
   arch/x86/math-emu/fpu_system.h:50:24: error: 'get_current()->thread.fpu.state' is a pointer; did you mean to use '->'?
    #define FPU_info  (I387->soft.info)
                           ^
                  ->
   arch/x86/math-emu/fpu_entry.c:191:15: note: in expansion of macro 'FPU_info'
       math_abort(FPU_info, SIGSEGV);
                  ^~~~~~~~
>> arch/x86/math-emu/fpu_system.h:71:30: error: 'get_current()->thread.fpu.state' is a pointer; did you mean to use '->'?
    #define partial_status  (I387->soft.swd)
                                 ^
           ->
>> arch/x86/math-emu/fpu_entry.c:196:8: note: in expansion of macro 'partial_status'
       if (partial_status & SW_Summary)
           ^~~~~~~~~~~~~~
   arch/x86/math-emu/fpu_system.h:50:24: error: 'get_current()->thread.fpu.state' is a pointer; did you mean to use '->'?
    #define FPU_info  (I387->soft.info)
                           ^
                 ->
   arch/x86/math-emu/fpu_entry.c:203:14: note: in expansion of macro 'FPU_info'
      math_abort(FPU_info, SIGILL);
                 ^~~~~~~~
   In file included from include/asm-generic/bug.h:4:0,
                    from arch/x86/include/asm/bug.h:35,
                    from include/linux/bug.h:4,
                    from include/linux/signal.h:4,
                    from arch/x86/math-emu/fpu_entry.c:27:
   arch/x86/math-emu/fpu_system.h:50:24: error: 'get_current()->thread.fpu.state' is a pointer; did you mean to use '->'?
    #define FPU_info  (I387->soft.info)
                           ^
     ->
   include/linux/compiler.h:178:40: note: in definition of macro 'likely'
    # define likely(x) __builtin_expect(!!(x), 1)
                                           ^
>> arch/x86/include/asm/uaccess.h:100:10: note: in expansion of macro '__range_not_ok'
     likely(!__range_not_ok(addr, size, user_addr_max()));  \
             ^~~~~~~~~~~~~~
>> arch/x86/math-emu/fpu_system.h:80:36: note: in expansion of macro 'access_ok'
    #define FPU_access_ok(x,y,z) if ( !access_ok(x,y,z) ) \
                                       ^~~~~~~~~
>> arch/x86/math-emu/fpu_system.h:95:31: note: in expansion of macro 'FPU_access_ok'
    #define FPU_code_access_ok(z) FPU_access_ok(VERIFY_READ,(void __user *)FPU_EIP,z)
                                  ^~~~~~~~~~~~~
   arch/x86/math-emu/fpu_system.h:57:20: note: in expansion of macro 'FPU_info'
    #define FPU_EIP   (FPU_info->regs->ip)
                       ^~~~~~~~
>> arch/x86/math-emu/fpu_system.h:95:72: note: in expansion of macro 'FPU_EIP'
    #define FPU_code_access_ok(z) FPU_access_ok(VERIFY_READ,(void __user *)FPU_EIP,z)
                                                                           ^~~~~~~
>> arch/x86/math-emu/fpu_entry.c:208:2: note: in expansion of macro 'FPU_code_access_ok'
     FPU_code_access_ok(1);
     ^~~~~~~~~~~~~~~~~~
   In file included from arch/x86/math-emu/fpu_entry.c:35:0:
   arch/x86/math-emu/fpu_system.h:50:24: error: 'get_current()->thread.fpu.state' is a pointer; did you mean to use '->'?
    #define FPU_info  (I387->soft.info)
                           ^
     ->
   arch/x86/math-emu/fpu_system.h:81:16: note: in expansion of macro 'FPU_info'
        math_abort(FPU_info,SIGSEGV)
                   ^~~~~~~~
>> arch/x86/math-emu/fpu_system.h:95:31: note: in expansion of macro 'FPU_access_ok'
    #define FPU_code_access_ok(z) FPU_access_ok(VERIFY_READ,(void __user *)FPU_EIP,z)
                                  ^~~~~~~~~~~~~
..

vim +/init_fpregs_state +805 arch/x86/include/asm/processor.h

   799	
   800	#define INIT_THREAD  {							  \
   801		.sp0			= TOP_OF_INIT_STACK,			  \
   802		.sysenter_cs		= __KERNEL_CS,				  \
   803		.io_bitmap_ptr		= NULL,					  \
   804		.addr_limit		= KERNEL_DS,				  \
 > 805		.fpu.state		= &init_fpregs_state,			  \
   806	}
   807	
   808	/*

---
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" (31191 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ