Hi Alexandre,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on tip/x86/mm]
[also build test WARNING on v5.10-rc4]
[cannot apply to tip/x86/core tip/x86/asm next-20201116]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url:
https://github.com/0day-ci/linux/commits/Alexandre-Chartre/x86-pti-Defer-...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
1fcd009102ee02e217f2e7635ab65517d785da8e
config: i386-randconfig-a012-20201115 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
#
https://github.com/0day-ci/linux/commit/8fa40c99f8d79767c2e49a4899ccf6bd1...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Alexandre-Chartre/x86-pti-Defer-CR3-switch-to-C-code/20201116-225620
git checkout 8fa40c99f8d79767c2e49a4899ccf6bd11f65532
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/x86/include/asm/cpufeature.h:5,
from arch/x86/include/asm/thread_info.h:53,
from include/linux/thread_info.h:38,
from arch/x86/include/asm/preempt.h:7,
from include/linux/preempt.h:78,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/context_tracking.h:5,
from arch/x86/kernel/traps.c:15:
arch/x86/include/asm/idtentry.h: In function 'pti_kernel_stack':
arch/x86/include/asm/processor.h:773:53: error: 'KERNEL_STACK_SIZE' undeclared
(first use in this function); did you mean 'KERNEL_IMAGE_SIZE'?
773 | ((void *)(((unsigned long)task_stack_page(task)) + KERNEL_STACK_SIZE))
| ^~~~~~~~~~~~~~~~~
arch/x86/include/asm/idtentry.h:52:26: note: in expansion of macro
'task_top_of_kernel_stack'
52 | stack = (unsigned long)task_top_of_kernel_stack(current);
| ^~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/processor.h:773:53: note: each undeclared identifier is reported
only once for each function it appears in
773 | ((void *)(((unsigned long)task_stack_page(task)) + KERNEL_STACK_SIZE))
| ^~~~~~~~~~~~~~~~~
arch/x86/include/asm/idtentry.h:52:26: note: in expansion of macro
'task_top_of_kernel_stack'
52 | stack = (unsigned long)task_top_of_kernel_stack(current);
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/x86/include/asm/traps.h:9,
from arch/x86/kernel/traps.c:49:
arch/x86/include/asm/idtentry.h: In function 'run_idt':
arch/x86/include/asm/idtentry.h:24:3: error: implicit declaration of function
'asm_call_on_stack_1' [-Werror=implicit-function-declaration]
24 | asm_call_on_stack_1(stack, \
| ^~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/idtentry.h:66:2: note: in expansion of macro
'CALL_ON_STACK_1'
66 | CALL_ON_STACK_1(pti_kernel_stack(regs), func, regs);
| ^~~~~~~~~~~~~~~
arch/x86/include/asm/idtentry.h: In function 'run_idt_errcode':
arch/x86/include/asm/idtentry.h:30:3: error: implicit declaration of function
'asm_call_on_stack_2' [-Werror=implicit-function-declaration]
30 | asm_call_on_stack_2(stack, \
| ^~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/idtentry.h:73:2: note: in expansion of macro
'CALL_ON_STACK_2'
73 | CALL_ON_STACK_2(pti_kernel_stack(regs), func, regs, error_code);
| ^~~~~~~~~~~~~~~
arch/x86/include/asm/idtentry.h: In function 'run_idt_pagefault':
arch/x86/include/asm/idtentry.h:36:3: error: implicit declaration of function
'asm_call_on_stack_3' [-Werror=implicit-function-declaration]
36 | asm_call_on_stack_3(stack, \
| ^~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/idtentry.h:82:2: note: in expansion of macro
'CALL_ON_STACK_3'
82 | CALL_ON_STACK_3(pti_kernel_stack(regs),
| ^~~~~~~~~~~~~~~
arch/x86/kernel/traps.c: In function 'exc_double_fault':
> arch/x86/kernel/traps.c:348:16: warning: variable
'saved_cr3' set but not used [-Wunused-but-set-variable]
348 |
unsigned long saved_cr3;
| ^~~~~~~~~
cc1: some warnings being treated as errors
vim +/saved_cr3 +348 arch/x86/kernel/traps.c
324
325 /*
326 * Runs on an IST stack for x86_64 and on a special task stack for x86_32.
327 *
328 * On x86_64, this is more or less a normal kernel entry. Notwithstanding the
329 * SDM's warnings about double faults being unrecoverable, returning works as
330 * expected. Presumably what the SDM actually means is that the CPU may get
331 * the register state wrong on entry, so returning could be a bad idea.
332 *
333 * Various CPU engineers have promised that double faults due to an IRET fault
334 * while the stack is read-only are, in fact, recoverable.
335 *
336 * On x86_32, this is entered through a task gate, and regs are synthesized
337 * from the TSS. Returning is, in principle, okay, but changes to regs will
338 * be lost. If, for some reason, we need to return to a context with modified
339 * regs, the shim code could be adjusted to synchronize the registers.
340 *
341 * The 32bit #DF shim provides CR2 already as an argument. On 64bit it needs
342 * to be read before doing anything else.
343 */
344 DEFINE_IDTENTRY_DF(exc_double_fault)
345 {
346 static const char str[] = "double fault";
347 struct task_struct *tsk;
348 unsigned long saved_cr3;
349 #ifdef CONFIG_VMAP_STACK
350 unsigned long address;
351 #endif
352
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org