linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [tip:WIP.x86/pti-upstream 38/50] arch/x86/include/asm/mmu_context.h:73:18: error: 'LDT_BASE_ADDR' undeclared
@ 2017-12-16 23:35 kbuild test robot
  2017-12-17  2:50 ` Andy Lutomirski
  0 siblings, 1 reply; 2+ messages in thread
From: kbuild test robot @ 2017-12-16 23:35 UTC (permalink / raw)
  To: Andy Lutomirski; +Cc: kbuild-all, linux-kernel, tipbuild, Thomas Gleixner

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.x86/pti-upstream
head:   78e4da51f7c77587cc6f419af4f63a21b289bdb7
commit: 7e482cfe4a23ead21215423c4566c8516ba21025 [38/50] x86/pti: Put the LDT in its own PGD if PTI is on
config: i386-randconfig-h0-12170619 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
        git checkout 7e482cfe4a23ead21215423c4566c8516ba21025
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   In file included from arch/x86//kernel/apic/ipi.c:16:0:
   arch/x86/include/asm/mmu_context.h: In function 'ldt_slot_va':
>> arch/x86/include/asm/mmu_context.h:73:18: error: 'LDT_BASE_ADDR' undeclared (first use in this function)
     return (void *)(LDT_BASE_ADDR + LDT_SLOT_STRIDE * slot);
                     ^~~~~~~~~~~~~
   arch/x86/include/asm/mmu_context.h:73:18: note: each undeclared identifier is reported only once for each function it appears in
--
   In file included from arch/x86//kernel/cpu/common.c:22:0:
   arch/x86/include/asm/mmu_context.h: In function 'ldt_slot_va':
>> arch/x86/include/asm/mmu_context.h:73:18: error: 'LDT_BASE_ADDR' undeclared (first use in this function)
     return (void *)(LDT_BASE_ADDR + LDT_SLOT_STRIDE * slot);
                     ^~~~~~~~~~~~~
   arch/x86/include/asm/mmu_context.h:73:18: note: each undeclared identifier is reported only once for each function it appears in
   In file included from arch/x86//kernel/cpu/common.c:22:0:
   arch/x86/include/asm/mmu_context.h:74:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^

vim +/LDT_BASE_ADDR +73 arch/x86/include/asm/mmu_context.h

    70	
    71	static inline void *ldt_slot_va(int slot)
    72	{
  > 73		return (void *)(LDT_BASE_ADDR + LDT_SLOT_STRIDE * slot);
    74	}
    75	

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

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

* Re: [tip:WIP.x86/pti-upstream 38/50] arch/x86/include/asm/mmu_context.h:73:18: error: 'LDT_BASE_ADDR' undeclared
  2017-12-16 23:35 [tip:WIP.x86/pti-upstream 38/50] arch/x86/include/asm/mmu_context.h:73:18: error: 'LDT_BASE_ADDR' undeclared kbuild test robot
@ 2017-12-17  2:50 ` Andy Lutomirski
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Lutomirski @ 2017-12-17  2:50 UTC (permalink / raw)
  To: kbuild test robot
  Cc: Andy Lutomirski, kbuild-all, linux-kernel, tipbuild, Thomas Gleixner

On Sat, Dec 16, 2017 at 3:35 PM, kbuild test robot
<fengguang.wu@intel.com> wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.x86/pti-upstream
> head:   78e4da51f7c77587cc6f419af4f63a21b289bdb7
> commit: 7e482cfe4a23ead21215423c4566c8516ba21025 [38/50] x86/pti: Put the LDT in its own PGD if PTI is on
> config: i386-randconfig-h0-12170619 (attached as .config)
> compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
> reproduce:
>         git checkout 7e482cfe4a23ead21215423c4566c8516ba21025
>         # save the attached .config to linux build tree
>         make ARCH=i386
>
> All errors (new ones prefixed by >>):
>
>    In file included from arch/x86//kernel/apic/ipi.c:16:0:
>    arch/x86/include/asm/mmu_context.h: In function 'ldt_slot_va':
>>> arch/x86/include/asm/mmu_context.h:73:18: error: 'LDT_BASE_ADDR' undeclared (first use in this function)
>      return (void *)(LDT_BASE_ADDR + LDT_SLOT_STRIDE * slot);
>                      ^~~~~~~~~~~~~
>    arch/x86/include/asm/mmu_context.h:73:18: note: each undeclared identifier is reported only once for each function it appears in
> --
>    In file included from arch/x86//kernel/cpu/common.c:22:0:
>    arch/x86/include/asm/mmu_context.h: In function 'ldt_slot_va':
>>> arch/x86/include/asm/mmu_context.h:73:18: error: 'LDT_BASE_ADDR' undeclared (first use in this function)
>      return (void *)(LDT_BASE_ADDR + LDT_SLOT_STRIDE * slot);
>                      ^~~~~~~~~~~~~
>    arch/x86/include/asm/mmu_context.h:73:18: note: each undeclared identifier is reported only once for each function it appears in
>    In file included from arch/x86//kernel/cpu/common.c:22:0:
>    arch/x86/include/asm/mmu_context.h:74:1: warning: control reaches end of non-void function [-Wreturn-type]
>     }
>     ^
>
> vim +/LDT_BASE_ADDR +73 arch/x86/include/asm/mmu_context.h
>
>     70
>     71  static inline void *ldt_slot_va(int slot)
>     72  {
>   > 73          return (void *)(LDT_BASE_ADDR + LDT_SLOT_STRIDE * slot);
>     74  }
>     75
>

I would fix this like this:

index b7ffd45b22f7..3c7042877e63 100644
--- a/arch/x86/include/asm/mmu_context.h
+++ b/arch/x86/include/asm/mmu_context.h
@@ -70,7 +70,11 @@ struct ldt_struct {

 static inline void *ldt_slot_va(int slot)
 {
+#ifdef CONFIG_X86_64
        return (void *)(LDT_BASE_ADDR + LDT_SLOT_STRIDE * slot);
+#else
+       BUG();
+#endif
 }

Ingo or Thomas, want to do that manually?  It's probably easier than
folding in a patch.

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

end of thread, other threads:[~2017-12-17  2:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-16 23:35 [tip:WIP.x86/pti-upstream 38/50] arch/x86/include/asm/mmu_context.h:73:18: error: 'LDT_BASE_ADDR' undeclared kbuild test robot
2017-12-17  2:50 ` Andy Lutomirski

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).