All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Kees Cook <keescook@chromium.org>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
	"Rik van Riel" <riel@redhat.com>,
	"Andy Lutomirski" <luto@kernel.org>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Ingo Molnar" <mingo@redhat.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Dave Hansen" <dave.hansen@linux.intel.com>,
	"Yu-cheng Yu" <yu-cheng.yu@intel.com>,
	"Masahiro Yamada" <yamada.masahiro@socionext.com>,
	"Borislav Petkov" <bp@suse.de>,
	"Christian Borntraeger" <borntraeger@de.ibm.com>,
	"Thomas Garnier" <thgarnie@google.com>,
	"Brian Gerst" <brgerst@gmail.com>,
	"He Chen" <he.chen@linux.intel.com>,
	"Mathias Krause" <minipli@googlemail.com>,
	"Fenghua Yu" <fenghua.yu@intel.com>,
	"Piotr Luc" <piotr.luc@intel.com>, "Kyle Huey" <me@kylehuey.com>,
	"Len Brown" <len.brown@intel.com>,
	kvm@vger.kernel.org, kernel-hardening@lists.openwall.com
Subject: Re: [PATCH] x86/fpu: move FPU state into separate cache
Date: Fri, 31 Mar 2017 13:57:10 +0800	[thread overview]
Message-ID: <201703311331.U3AX8Y1u%fengguang.wu@intel.com> (raw)
In-Reply-To: <20170329203908.GA39222@beast>

[-- Attachment #1: Type: text/plain, Size: 17716 bytes --]

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31191 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: Kees Cook <keescook@chromium.org>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
	"Rik van Riel" <riel@redhat.com>,
	"Andy Lutomirski" <luto@kernel.org>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Ingo Molnar" <mingo@redhat.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Dave Hansen" <dave.hansen@linux.intel.com>,
	"Yu-cheng Yu" <yu-cheng.yu@intel.com>,
	"Masahiro Yamada" <yamada.masahiro@socionext.com>,
	"Borislav Petkov" <bp@suse.de>,
	"Christian Borntraeger" <borntraeger@de.ibm.com>,
	"Thomas Garnier" <thgarnie@google.com>,
	"Brian Gerst" <brgerst@gmail.com>,
	"He Chen" <he.chen@linux.intel.com>,
	"Mathias Krause" <minipli@googlemail.com>,
	"Fenghua Yu" <fenghua.yu@intel.com>,
	"Piotr Luc" <piotr.luc@intel.com>, "Kyle Huey" <me@kylehuey.com>,
	"Len Brown" <len.brown@intel.com>,
	kvm@vger.kernel.org
Subject: Re: [PATCH] x86/fpu: move FPU state into separate cache
Date: Fri, 31 Mar 2017 13:57:10 +0800	[thread overview]
Message-ID: <201703311331.U3AX8Y1u%fengguang.wu@intel.com> (raw)
In-Reply-To: <20170329203908.GA39222@beast>

[-- Attachment #1: Type: text/plain, Size: 17716 bytes --]

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31191 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: Kees Cook <keescook@chromium.org>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
	"Rik van Riel" <riel@redhat.com>,
	"Andy Lutomirski" <luto@kernel.org>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Ingo Molnar" <mingo@redhat.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Dave Hansen" <dave.hansen@linux.intel.com>,
	"Yu-cheng Yu" <yu-cheng.yu@intel.com>,
	"Masahiro Yamada" <yamada.masahiro@socionext.com>,
	"Borislav Petkov" <bp@suse.de>,
	"Christian Borntraeger" <borntraeger@de.ibm.com>,
	"Thomas Garnier" <thgarnie@google.com>,
	"Brian Gerst" <brgerst@gmail.com>,
	"He Chen" <he.chen@linux.intel.com>,
	"Mathias Krause" <minipli@googlemail.com>,
	"Fenghua Yu" <fenghua.yu@intel.com>,
	"Piotr Luc" <piotr.luc@intel.com>, "Kyle Huey" <me@kylehuey.com>,
	"Len Brown" <len.brown@intel.com>,
	kvm@vger.kernel.org, kernel-hardening@lists.openwall.com
Subject: [kernel-hardening] Re: [PATCH] x86/fpu: move FPU state into separate cache
Date: Fri, 31 Mar 2017 13:57:10 +0800	[thread overview]
Message-ID: <201703311331.U3AX8Y1u%fengguang.wu@intel.com> (raw)
In-Reply-To: <20170329203908.GA39222@beast>

[-- Attachment #1: Type: text/plain, Size: 17716 bytes --]

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31191 bytes --]

  parent reply	other threads:[~2017-03-31  5:57 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-29 20:39 [PATCH] x86/fpu: move FPU state into separate cache Kees Cook
2017-03-29 20:39 ` [kernel-hardening] " Kees Cook
2017-03-29 20:45 ` H. Peter Anvin
2017-03-29 20:45   ` [kernel-hardening] " H. Peter Anvin
2017-03-29 20:45   ` H. Peter Anvin
2017-03-29 21:09   ` Kees Cook
2017-03-29 21:09     ` [kernel-hardening] " Kees Cook
2017-03-29 21:09     ` Kees Cook
2017-03-29 21:19     ` Dave Hansen
2017-03-29 21:19       ` [kernel-hardening] " Dave Hansen
2017-03-29 21:30     ` Linus Torvalds
2017-03-29 21:30       ` [kernel-hardening] " Linus Torvalds
2017-03-29 21:30       ` Linus Torvalds
2017-03-29 21:35       ` Andy Lutomirski
2017-03-29 21:35         ` [kernel-hardening] " Andy Lutomirski
2017-03-29 21:35         ` Andy Lutomirski
2017-03-29 21:41         ` Linus Torvalds
2017-03-29 21:41           ` [kernel-hardening] " Linus Torvalds
2017-03-29 21:41           ` Linus Torvalds
2017-03-29 22:28           ` hpa
2017-03-29 22:28             ` [kernel-hardening] " hpa
2017-03-29 22:28             ` hpa
2017-03-29 23:56             ` Linus Torvalds
2017-03-29 23:56               ` [kernel-hardening] " Linus Torvalds
2017-03-29 23:56               ` Linus Torvalds
2017-03-30  1:50               ` Kees Cook
2017-03-30  1:50                 ` [kernel-hardening] " Kees Cook
2017-03-30  1:50                 ` Kees Cook
2017-03-29 21:35       ` Linus Torvalds
2017-03-29 21:35         ` [kernel-hardening] " Linus Torvalds
2017-03-29 21:35         ` Linus Torvalds
2017-03-31  4:59 ` kbuild test robot
2017-03-31  4:59   ` [kernel-hardening] " kbuild test robot
2017-03-31  4:59   ` kbuild test robot
2017-03-31  5:57 ` kbuild test robot [this message]
2017-03-31  5:57   ` [kernel-hardening] " kbuild test robot
2017-03-31  5:57   ` kbuild test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201703311331.U3AX8Y1u%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=borntraeger@de.ibm.com \
    --cc=bp@suse.de \
    --cc=brgerst@gmail.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=fenghua.yu@intel.com \
    --cc=he.chen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=kbuild-all@01.org \
    --cc=keescook@chromium.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=kvm@vger.kernel.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=me@kylehuey.com \
    --cc=mingo@redhat.com \
    --cc=minipli@googlemail.com \
    --cc=pbonzini@redhat.com \
    --cc=peterz@infradead.org \
    --cc=piotr.luc@intel.com \
    --cc=riel@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=thgarnie@google.com \
    --cc=x86@kernel.org \
    --cc=yamada.masahiro@socionext.com \
    --cc=yu-cheng.yu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.