linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [hnaz-linux-mm:master 89/340] include/linux/sched/signal.h:381:9: note: in expansion of macro 'unlikely'
@ 2020-03-10  6:45 kbuild test robot
  2020-03-10 14:39 ` Peter Xu
  0 siblings, 1 reply; 2+ messages in thread
From: kbuild test robot @ 2020-03-10  6:45 UTC (permalink / raw)
  To: Peter Xu
  Cc: kbuild-all, Johannes Weiner, Andrew Morton, Linux Memory Management List

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

tree:   https://github.com/hnaz/linux-mm master
head:   5d9ee416b5701096536c7a63c04dbe25012baa9e
commit: 133f884fbe299145671d583f255f71b63d9ad63f [89/340] mm: introduce fault_signal_pending()
config: xtensa-randconfig-a001-20200309 (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 133f884fbe299145671d583f255f71b63d9ad63f
        # save the attached .config to linux build tree
        GCC_VERSION=9.2.0 make.cross ARCH=xtensa 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from arch/xtensa/include/asm/processor.h:15,
                    from arch/xtensa/kernel/asm-offsets.c:15:
   include/linux/sched/signal.h: In function 'fault_signal_pending':
   include/linux/sched/signal.h:381:33: error: 'VM_FAULT_RETRY' undeclared (first use in this function)
     381 |  return unlikely((fault_flags & VM_FAULT_RETRY) &&
         |                                 ^~~~~~~~~~~~~~
   include/linux/compiler.h:33:34: note: in definition of macro '__branch_check__'
      33 |    ______r = __builtin_expect(!!(x), expect); \
         |                                  ^
>> include/linux/sched/signal.h:381:9: note: in expansion of macro 'unlikely'
     381 |  return unlikely((fault_flags & VM_FAULT_RETRY) &&
         |         ^~~~~~~~
   include/linux/sched/signal.h:381:33: note: each undeclared identifier is reported only once for each function it appears in
     381 |  return unlikely((fault_flags & VM_FAULT_RETRY) &&
         |                                 ^~~~~~~~~~~~~~
   include/linux/compiler.h:33:34: note: in definition of macro '__branch_check__'
      33 |    ______r = __builtin_expect(!!(x), expect); \
         |                                  ^
>> include/linux/sched/signal.h:381:9: note: in expansion of macro 'unlikely'
     381 |  return unlikely((fault_flags & VM_FAULT_RETRY) &&
         |         ^~~~~~~~
   make[2]: *** [scripts/Makefile.build:101: arch/xtensa/kernel/asm-offsets.s] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [Makefile:1113: prepare0] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:180: sub-make] Error 2
   11 real  4 user  7 sys  99.61% cpu 	make prepare

vim +/unlikely +381 include/linux/sched/signal.h

   371	
   372	/*
   373	 * This should only be used in fault handlers to decide whether we
   374	 * should stop the current fault routine to handle the signals
   375	 * instead, especially with the case where we've got interrupted with
   376	 * a VM_FAULT_RETRY.
   377	 */
   378	static inline bool fault_signal_pending(unsigned int fault_flags,
   379						struct pt_regs *regs)
   380	{
 > 381		return unlikely((fault_flags & VM_FAULT_RETRY) &&
   382				fatal_signal_pending(current));
   383	}
   384	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [hnaz-linux-mm:master 89/340] include/linux/sched/signal.h:381:9: note: in expansion of macro 'unlikely'
  2020-03-10  6:45 [hnaz-linux-mm:master 89/340] include/linux/sched/signal.h:381:9: note: in expansion of macro 'unlikely' kbuild test robot
@ 2020-03-10 14:39 ` Peter Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Xu @ 2020-03-10 14:39 UTC (permalink / raw)
  To: kbuild test robot, Andrew Morton
  Cc: kbuild-all, Johannes Weiner, Andrew Morton, Linux Memory Management List

On Tue, Mar 10, 2020 at 02:45:50PM +0800, kbuild test robot wrote:
> tree:   https://github.com/hnaz/linux-mm master
> head:   5d9ee416b5701096536c7a63c04dbe25012baa9e
> commit: 133f884fbe299145671d583f255f71b63d9ad63f [89/340] mm: introduce fault_signal_pending()
> config: xtensa-randconfig-a001-20200309 (attached as .config)
> compiler: xtensa-linux-gcc (GCC) 9.2.0
> reproduce:
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         git checkout 133f884fbe299145671d583f255f71b63d9ad63f
>         # save the attached .config to linux build tree
>         GCC_VERSION=9.2.0 make.cross ARCH=xtensa 
> 
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@intel.com>
> 
> All warnings (new ones prefixed by >>):
> 
>    In file included from arch/xtensa/include/asm/processor.h:15,
>                     from arch/xtensa/kernel/asm-offsets.c:15:
>    include/linux/sched/signal.h: In function 'fault_signal_pending':
>    include/linux/sched/signal.h:381:33: error: 'VM_FAULT_RETRY' undeclared (first use in this function)
>      381 |  return unlikely((fault_flags & VM_FAULT_RETRY) &&
>          |                                 ^~~~~~~~~~~~~~

Hi, Andrew,

Thanks for queuing the two series, and sorry for breaking the builds.

I received 6 build errors this morning after you queued the two series
on mm page fault retries and userfault-wp.  They are:

[hnaz-linux-mm:master 89/340] include/linux/sched/signal.h:381:9: note: in expansion of macro 'unlikely'
[hnaz-linux-mm:master 89/340] include/linux/sched/signal.h:381:33: error: 'VM_FAULT_RETRY' undeclared
[hnaz-linux-mm:master 95/340] include/linux/sched/signal.h:383:6: error: implicit declaration of function 'user_mode'
[hnaz-linux-mm:master 89/340] include/linux/sched/signal.h:381:33: error: 'VM_FAULT_RETRY' undeclared
[hnaz-linux-mm:master 89/340] arch/mips/mm/fault.c:157:27: error: passing argument 1 of 'fault_signal_pending' makes integer from pointer without a cast
[hnaz-linux-mm:master 95/340] include/linux/sched/signal.h:383:6: error: implicit declaration of function 'user_mode'

If I'm correct, it's all caused by the patch 3 with subject "mm:
Introduce fault_signal_pending()" in the mm page fault retry series.
And IIUC below should be able to fix if squashed into the same patch:

------------8<----------------
diff --git a/arch/mips/mm/fault.c b/arch/mips/mm/fault.c
index fd64b135fd7b..4a0eafe3d932 100644
--- a/arch/mips/mm/fault.c
+++ b/arch/mips/mm/fault.c
@@ -154,7 +154,7 @@ static void __kprobes __do_page_fault(struct pt_regs *regs, unsigned long write,
         */
        fault = handle_mm_fault(vma, address, flags);
 
-       if (fault_signal_pending(regs))
+       if (fault_signal_pending(fault, regs))
                return;
 
        perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address);
diff --git a/include/linux/sched/signal.h b/include/linux/sched/signal.h
index 09d40ce6a162..c8e0e4f801e4 100644
--- a/include/linux/sched/signal.h
+++ b/include/linux/sched/signal.h
@@ -10,6 +10,8 @@
 #include <linux/cred.h>
 #include <linux/refcount.h>
 #include <linux/posix-timers.h>
+#include <linux/mm_types.h>
+#include <asm/ptrace.h>
 
 /*
  * Types defining task->signal and task->sighand and APIs using them:
------------>8----------------

I'm sorry I still don't have proper hosts to test build these, so this
code clip is only test-compile on x86.  May need your help to see how
to move on and improve this.

Thanks!

-- 
Peter Xu



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-10 14:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-10  6:45 [hnaz-linux-mm:master 89/340] include/linux/sched/signal.h:381:9: note: in expansion of macro 'unlikely' kbuild test robot
2020-03-10 14:39 ` Peter Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).