mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: "Chang S. Bae" <chang.seok.bae@intel.com>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
	tipbuild@zytor.com, Thomas Gleixner <tglx@linutronix.de>
Subject: [tip:WIP.x86/cpu 8/17] arch/x86//kernel/process_64.c:256:3: note: in expansion of macro 'local_irq_save'
Date: Sat, 22 Jun 2019 02:13:26 +0800	[thread overview]
Message-ID: <201906220224.NgwVQwq6%lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.x86/cpu
head:   707e6befd43ba8d754485d8d02ed4f49ec8ec667
commit: 41cf6ccef21080168970226f657daff26ecaf3e1 [8/17] x86/process/64: Use FSGSBASE instructions on thread copy and ptrace
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        git checkout 41cf6ccef21080168970226f657daff26ecaf3e1
        # save the attached .config to linux build tree
        make ARCH=x86_64 

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

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

   In file included from include/linux/kernel.h:14:0,
                    from include/linux/list.h:9,
                    from include/linux/kobject.h:19,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from arch/x86//kernel/process_64.c:18:
   arch/x86//kernel/process_64.c: In function 'save_fsgs':
   include/linux/typecheck.h:12:18: warning: comparison of distinct pointer types lacks a cast
     (void)(&__dummy == &__dummy2); \
                     ^
>> include/linux/irqflags.h:83:3: note: in expansion of macro 'typecheck'
      typecheck(unsigned long, flags); \
      ^~~~~~~~~
>> include/linux/irqflags.h:115:3: note: in expansion of macro 'raw_local_irq_save'
      raw_local_irq_save(flags);  \
      ^~~~~~~~~~~~~~~~~~
>> arch/x86//kernel/process_64.c:256:3: note: in expansion of macro 'local_irq_save'
      local_irq_save(&flags);
      ^~~~~~~~~~~~~~
   In file included from arch/x86/include/asm/processor.h:33:0,
                    from include/linux/mutex.h:19,
                    from include/linux/kernfs.h:12,
                    from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from arch/x86//kernel/process_64.c:18:
>> include/linux/irqflags.h:84:9: error: lvalue required as left operand of assignment
      flags = arch_local_irq_save();  \
            ^
>> include/linux/irqflags.h:115:3: note: in expansion of macro 'raw_local_irq_save'
      raw_local_irq_save(flags);  \
      ^~~~~~~~~~~~~~~~~~
>> arch/x86//kernel/process_64.c:256:3: note: in expansion of macro 'local_irq_save'
      local_irq_save(&flags);
      ^~~~~~~~~~~~~~
   In file included from include/linux/kernel.h:14:0,
                    from include/linux/list.h:9,
                    from include/linux/kobject.h:19,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from arch/x86//kernel/process_64.c:18:
   include/linux/typecheck.h:12:18: warning: comparison of distinct pointer types lacks a cast
     (void)(&__dummy == &__dummy2); \
                     ^
   include/linux/irqflags.h:98:3: note: in expansion of macro 'typecheck'
      typecheck(unsigned long, flags); \
      ^~~~~~~~~
>> include/linux/irqflags.h:122:7: note: in expansion of macro 'raw_irqs_disabled_flags'
      if (raw_irqs_disabled_flags(flags)) { \
          ^~~~~~~~~~~~~~~~~~~~~~~
>> arch/x86//kernel/process_64.c:258:3: note: in expansion of macro 'local_irq_restore'
      local_irq_restore(&flags);
      ^~~~~~~~~~~~~~~~~
   In file included from arch/x86/include/asm/processor.h:33:0,
                    from include/linux/mutex.h:19,
                    from include/linux/kernfs.h:12,
                    from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from arch/x86//kernel/process_64.c:18:
>> arch/x86//kernel/process_64.c:258:21: warning: passing argument 1 of 'arch_irqs_disabled_flags' makes integer from pointer without a cast [-Wint-conversion]
      local_irq_restore(&flags);
                        ^
   include/linux/irqflags.h:99:28: note: in definition of macro 'raw_irqs_disabled_flags'
      arch_irqs_disabled_flags(flags); \
                               ^~~~~
>> arch/x86//kernel/process_64.c:258:3: note: in expansion of macro 'local_irq_restore'
      local_irq_restore(&flags);
      ^~~~~~~~~~~~~~~~~
   In file included from include/linux/irqflags.h:16:0,
                    from arch/x86/include/asm/processor.h:33,
                    from include/linux/mutex.h:19,
                    from include/linux/kernfs.h:12,
                    from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from arch/x86//kernel/process_64.c:18:
   arch/x86/include/asm/irqflags.h:162:19: note: expected 'long unsigned int' but argument is of type 'long unsigned int *'
    static inline int arch_irqs_disabled_flags(unsigned long flags)
                      ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/kernel.h:14:0,
                    from include/linux/list.h:9,
                    from include/linux/kobject.h:19,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from arch/x86//kernel/process_64.c:18:
   include/linux/typecheck.h:12:18: warning: comparison of distinct pointer types lacks a cast
     (void)(&__dummy == &__dummy2); \
                     ^
   include/linux/irqflags.h:88:3: note: in expansion of macro 'typecheck'
      typecheck(unsigned long, flags); \
      ^~~~~~~~~
>> include/linux/irqflags.h:123:4: note: in expansion of macro 'raw_local_irq_restore'
       raw_local_irq_restore(flags); \
       ^~~~~~~~~~~~~~~~~~~~~
>> arch/x86//kernel/process_64.c:258:3: note: in expansion of macro 'local_irq_restore'
      local_irq_restore(&flags);
      ^~~~~~~~~~~~~~~~~
   In file included from arch/x86/include/asm/processor.h:33:0,
                    from include/linux/mutex.h:19,
                    from include/linux/kernfs.h:12,
                    from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from arch/x86//kernel/process_64.c:18:
>> arch/x86//kernel/process_64.c:258:21: warning: passing argument 1 of 'arch_local_irq_restore' makes integer from pointer without a cast [-Wint-conversion]
      local_irq_restore(&flags);
                        ^
   include/linux/irqflags.h:89:26: note: in definition of macro 'raw_local_irq_restore'
      arch_local_irq_restore(flags);  \
                             ^~~~~
>> arch/x86//kernel/process_64.c:258:3: note: in expansion of macro 'local_irq_restore'
      local_irq_restore(&flags);
      ^~~~~~~~~~~~~~~~~
   In file included from arch/x86/include/asm/msr.h:258:0,
                    from arch/x86/include/asm/processor.h:21,
                    from include/linux/mutex.h:19,
                    from include/linux/kernfs.h:12,
                    from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from arch/x86//kernel/process_64.c:18:
   arch/x86/include/asm/paravirt.h:765:28: note: expected 'long unsigned int' but argument is of type 'long unsigned int *'
    static inline notrace void arch_local_irq_restore(unsigned long f)
                               ^~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/kernel.h:14:0,
                    from include/linux/list.h:9,
                    from include/linux/kobject.h:19,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from arch/x86//kernel/process_64.c:18:
   include/linux/typecheck.h:12:18: warning: comparison of distinct pointer types lacks a cast
     (void)(&__dummy == &__dummy2); \
                     ^
   include/linux/irqflags.h:88:3: note: in expansion of macro 'typecheck'
      typecheck(unsigned long, flags); \
      ^~~~~~~~~
   include/linux/irqflags.h:127:4: note: in expansion of macro 'raw_local_irq_restore'
       raw_local_irq_restore(flags); \
       ^~~~~~~~~~~~~~~~~~~~~
>> arch/x86//kernel/process_64.c:258:3: note: in expansion of macro 'local_irq_restore'
      local_irq_restore(&flags);
      ^~~~~~~~~~~~~~~~~
   In file included from arch/x86/include/asm/processor.h:33:0,
                    from include/linux/mutex.h:19,
                    from include/linux/kernfs.h:12,
                    from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from arch/x86//kernel/process_64.c:18:
>> arch/x86//kernel/process_64.c:258:21: warning: passing argument 1 of 'arch_local_irq_restore' makes integer from pointer without a cast [-Wint-conversion]
      local_irq_restore(&flags);
                        ^
   include/linux/irqflags.h:89:26: note: in definition of macro 'raw_local_irq_restore'
      arch_local_irq_restore(flags);  \
                             ^~~~~
>> arch/x86//kernel/process_64.c:258:3: note: in expansion of macro 'local_irq_restore'
      local_irq_restore(&flags);
      ^~~~~~~~~~~~~~~~~
   In file included from arch/x86/include/asm/msr.h:258:0,
                    from arch/x86/include/asm/processor.h:21,
                    from include/linux/mutex.h:19,
                    from include/linux/kernfs.h:12,
                    from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from arch/x86//kernel/process_64.c:18:
   arch/x86/include/asm/paravirt.h:765:28: note: expected 'long unsigned int' but argument is of type 'long unsigned int *'
    static inline notrace void arch_local_irq_restore(unsigned long f)
                               ^~~~~~~~~~~~~~~~~~~~~~
--
   In file included from include/linux/kernel.h:14:0,
                    from include/linux/list.h:9,
                    from include/linux/kobject.h:19,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from arch/x86/kernel/process_64.c:18:
   arch/x86/kernel/process_64.c: In function 'save_fsgs':
   include/linux/typecheck.h:12:18: warning: comparison of distinct pointer types lacks a cast
     (void)(&__dummy == &__dummy2); \
                     ^
>> include/linux/irqflags.h:83:3: note: in expansion of macro 'typecheck'
      typecheck(unsigned long, flags); \
      ^~~~~~~~~
>> include/linux/irqflags.h:115:3: note: in expansion of macro 'raw_local_irq_save'
      raw_local_irq_save(flags);  \
      ^~~~~~~~~~~~~~~~~~
   arch/x86/kernel/process_64.c:256:3: note: in expansion of macro 'local_irq_save'
      local_irq_save(&flags);
      ^~~~~~~~~~~~~~
   In file included from arch/x86/include/asm/processor.h:33:0,
                    from include/linux/mutex.h:19,
                    from include/linux/kernfs.h:12,
                    from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from arch/x86/kernel/process_64.c:18:
>> include/linux/irqflags.h:84:9: error: lvalue required as left operand of assignment
      flags = arch_local_irq_save();  \
            ^
>> include/linux/irqflags.h:115:3: note: in expansion of macro 'raw_local_irq_save'
      raw_local_irq_save(flags);  \
      ^~~~~~~~~~~~~~~~~~
   arch/x86/kernel/process_64.c:256:3: note: in expansion of macro 'local_irq_save'
      local_irq_save(&flags);
      ^~~~~~~~~~~~~~
   In file included from include/linux/kernel.h:14:0,
                    from include/linux/list.h:9,
                    from include/linux/kobject.h:19,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from arch/x86/kernel/process_64.c:18:
   include/linux/typecheck.h:12:18: warning: comparison of distinct pointer types lacks a cast
     (void)(&__dummy == &__dummy2); \
                     ^
   include/linux/irqflags.h:98:3: note: in expansion of macro 'typecheck'
      typecheck(unsigned long, flags); \
      ^~~~~~~~~
>> include/linux/irqflags.h:122:7: note: in expansion of macro 'raw_irqs_disabled_flags'
      if (raw_irqs_disabled_flags(flags)) { \
          ^~~~~~~~~~~~~~~~~~~~~~~
   arch/x86/kernel/process_64.c:258:3: note: in expansion of macro 'local_irq_restore'
      local_irq_restore(&flags);
      ^~~~~~~~~~~~~~~~~
   In file included from arch/x86/include/asm/processor.h:33:0,
                    from include/linux/mutex.h:19,
                    from include/linux/kernfs.h:12,
                    from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from arch/x86/kernel/process_64.c:18:
   arch/x86/kernel/process_64.c:258:21: warning: passing argument 1 of 'arch_irqs_disabled_flags' makes integer from pointer without a cast [-Wint-conversion]
      local_irq_restore(&flags);
                        ^
   include/linux/irqflags.h:99:28: note: in definition of macro 'raw_irqs_disabled_flags'
      arch_irqs_disabled_flags(flags); \
                               ^~~~~
   arch/x86/kernel/process_64.c:258:3: note: in expansion of macro 'local_irq_restore'
      local_irq_restore(&flags);
      ^~~~~~~~~~~~~~~~~
   In file included from include/linux/irqflags.h:16:0,
                    from arch/x86/include/asm/processor.h:33,
                    from include/linux/mutex.h:19,
                    from include/linux/kernfs.h:12,
                    from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from arch/x86/kernel/process_64.c:18:
   arch/x86/include/asm/irqflags.h:162:19: note: expected 'long unsigned int' but argument is of type 'long unsigned int *'
    static inline int arch_irqs_disabled_flags(unsigned long flags)
                      ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/kernel.h:14:0,
                    from include/linux/list.h:9,
                    from include/linux/kobject.h:19,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from arch/x86/kernel/process_64.c:18:
   include/linux/typecheck.h:12:18: warning: comparison of distinct pointer types lacks a cast
     (void)(&__dummy == &__dummy2); \
                     ^
   include/linux/irqflags.h:88:3: note: in expansion of macro 'typecheck'
      typecheck(unsigned long, flags); \
      ^~~~~~~~~
>> include/linux/irqflags.h:123:4: note: in expansion of macro 'raw_local_irq_restore'
       raw_local_irq_restore(flags); \
       ^~~~~~~~~~~~~~~~~~~~~
   arch/x86/kernel/process_64.c:258:3: note: in expansion of macro 'local_irq_restore'
      local_irq_restore(&flags);
      ^~~~~~~~~~~~~~~~~
   In file included from arch/x86/include/asm/processor.h:33:0,
                    from include/linux/mutex.h:19,
                    from include/linux/kernfs.h:12,
                    from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from arch/x86/kernel/process_64.c:18:
   arch/x86/kernel/process_64.c:258:21: warning: passing argument 1 of 'arch_local_irq_restore' makes integer from pointer without a cast [-Wint-conversion]
      local_irq_restore(&flags);
                        ^
   include/linux/irqflags.h:89:26: note: in definition of macro 'raw_local_irq_restore'
      arch_local_irq_restore(flags);  \
                             ^~~~~
   arch/x86/kernel/process_64.c:258:3: note: in expansion of macro 'local_irq_restore'
      local_irq_restore(&flags);
      ^~~~~~~~~~~~~~~~~
   In file included from arch/x86/include/asm/msr.h:258:0,
                    from arch/x86/include/asm/processor.h:21,
                    from include/linux/mutex.h:19,
                    from include/linux/kernfs.h:12,
                    from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from arch/x86/kernel/process_64.c:18:
   arch/x86/include/asm/paravirt.h:765:28: note: expected 'long unsigned int' but argument is of type 'long unsigned int *'
    static inline notrace void arch_local_irq_restore(unsigned long f)
                               ^~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/kernel.h:14:0,
                    from include/linux/list.h:9,
                    from include/linux/kobject.h:19,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from arch/x86/kernel/process_64.c:18:
   include/linux/typecheck.h:12:18: warning: comparison of distinct pointer types lacks a cast
     (void)(&__dummy == &__dummy2); \
                     ^
   include/linux/irqflags.h:88:3: note: in expansion of macro 'typecheck'
      typecheck(unsigned long, flags); \
      ^~~~~~~~~
   include/linux/irqflags.h:127:4: note: in expansion of macro 'raw_local_irq_restore'
       raw_local_irq_restore(flags); \
       ^~~~~~~~~~~~~~~~~~~~~
   arch/x86/kernel/process_64.c:258:3: note: in expansion of macro 'local_irq_restore'
      local_irq_restore(&flags);
      ^~~~~~~~~~~~~~~~~
   In file included from arch/x86/include/asm/processor.h:33:0,
                    from include/linux/mutex.h:19,
                    from include/linux/kernfs.h:12,
                    from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from arch/x86/kernel/process_64.c:18:
   arch/x86/kernel/process_64.c:258:21: warning: passing argument 1 of 'arch_local_irq_restore' makes integer from pointer without a cast [-Wint-conversion]
      local_irq_restore(&flags);
                        ^
   include/linux/irqflags.h:89:26: note: in definition of macro 'raw_local_irq_restore'
      arch_local_irq_restore(flags);  \
                             ^~~~~
   arch/x86/kernel/process_64.c:258:3: note: in expansion of macro 'local_irq_restore'
      local_irq_restore(&flags);
      ^~~~~~~~~~~~~~~~~
   In file included from arch/x86/include/asm/msr.h:258:0,
                    from arch/x86/include/asm/processor.h:21,
                    from include/linux/mutex.h:19,
                    from include/linux/kernfs.h:12,
                    from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from arch/x86/kernel/process_64.c:18:
   arch/x86/include/asm/paravirt.h:765:28: note: expected 'long unsigned int' but argument is of type 'long unsigned int *'
    static inline notrace void arch_local_irq_restore(unsigned long f)
                               ^~~~~~~~~~~~~~~~~~~~~~

vim +/local_irq_save +256 arch/x86//kernel/process_64.c

   242	
   243	static __always_inline void save_fsgs(struct task_struct *task)
   244	{
   245		savesegment(fs, task->thread.fsindex);
   246		savesegment(gs, task->thread.gsindex);
   247		if (static_cpu_has(X86_FEATURE_FSGSBASE)) {
   248			unsigned long flags;
   249	
   250			/*
   251			 * If FSGSBASE is enabled, we can't make any useful guesses
   252			 * about the base, and user code expects us to save the current
   253			 * value.  Fortunately, reading the base directly is efficient.
   254			 */
   255			task->thread.fsbase = rdfsbase();
 > 256			local_irq_save(&flags);
   257			task->thread.gsbase = __rdgsbase_inactive();
 > 258			local_irq_restore(&flags);
   259		} else {
   260			save_base_legacy(task, task->thread.fsindex, FS);
   261			save_base_legacy(task, task->thread.gsindex, GS);
   262		}
   263	}
   264	

---
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: 68816 bytes --]

                 reply	other threads:[~2019-06-21 18:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=201906220224.NgwVQwq6%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=chang.seok.bae@intel.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tipbuild@zytor.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®