All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [RFC v4][PATCH part-1 7/7] mm/asi: Implement PTI with ASI
Date: Tue, 05 May 2020 18:58:18 +0800	[thread overview]
Message-ID: <202005051858.Ly9Oai4L%lkp@intel.com> (raw)
In-Reply-To: <20200504144939.11318-8-alexandre.chartre@oracle.com>

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

Hi Alexandre,

[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on tip/x86/asm]
[also build test ERROR on v5.7-rc4]
[cannot apply to tip/x86/mm tip/x86/core next-20200505]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Alexandre-Chartre/ASI-Part-I-ASI-Infrastructure-and-PTI/20200505-074555
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 2ce0d7f9766f0e49bb54f149c77bae89464932fb
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

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

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

   In file included from include/asm-generic/percpu.h:7:0,
                    from arch/x86/include/asm/percpu.h:556,
                    from arch/x86/include/asm/preempt.h:6,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:6,
                    from include/linux/slab.h:15,
                    from include/linux/crypto.h:19,
                    from arch/x86/kernel/asm-offsets.c:9:
   arch/x86/include/asm/tlbflush.h: In function 'invalidate_user_asid':
>> arch/x86/include/asm/tlbflush.h:410:27: error: 'asi_type_user' undeclared (first use in this function)
      tlb_state = get_cpu_ptr(asi_type_user.tlb_state);
                              ^
   include/linux/percpu-defs.h:219:47: note: in definition of macro '__verify_pcpu_ptr'
     const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
                                                  ^~~
   include/linux/percpu-defs.h:252:27: note: in expansion of macro 'raw_cpu_ptr'
    #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
                              ^~~~~~~~~~~
>> include/linux/percpu-defs.h:294:2: note: in expansion of macro 'this_cpu_ptr'
     this_cpu_ptr(var);      \
     ^~~~~~~~~~~~
>> arch/x86/include/asm/tlbflush.h:410:15: note: in expansion of macro 'get_cpu_ptr'
      tlb_state = get_cpu_ptr(asi_type_user.tlb_state);
                  ^~~~~~~~~~~
   arch/x86/include/asm/tlbflush.h:410:27: note: each undeclared identifier is reported only once for each function it appears in
      tlb_state = get_cpu_ptr(asi_type_user.tlb_state);
                              ^
   include/linux/percpu-defs.h:219:47: note: in definition of macro '__verify_pcpu_ptr'
     const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
                                                  ^~~
   include/linux/percpu-defs.h:252:27: note: in expansion of macro 'raw_cpu_ptr'
    #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
                              ^~~~~~~~~~~
>> include/linux/percpu-defs.h:294:2: note: in expansion of macro 'this_cpu_ptr'
     this_cpu_ptr(var);      \
     ^~~~~~~~~~~~
>> arch/x86/include/asm/tlbflush.h:410:15: note: in expansion of macro 'get_cpu_ptr'
      tlb_state = get_cpu_ptr(asi_type_user.tlb_state);
                  ^~~~~~~~~~~
   In file included from arch/x86/include/asm/highmem.h:27:0,
                    from include/linux/highmem.h:35,
                    from include/linux/pagemap.h:11,
                    from include/linux/blkdev.h:16,
                    from include/linux/blk-cgroup.h:23,
                    from include/linux/writeback.h:14,
                    from include/linux/memcontrol.h:22,
                    from include/linux/swap.h:9,
                    from include/linux/suspend.h:5,
                    from arch/x86/kernel/asm-offsets.c:13:
>> arch/x86/include/asm/tlbflush.h:411:12: error: dereferencing pointer to incomplete type 'struct asi_tlb_state'
      tlb_state->tlb_pgtables[asid].id = 0;
               ^~
   In file included from arch/x86/kernel/asm-offsets.c:14:0:
   arch/x86/kernel/asm-offsets.c: In function 'common':
   include/linux/compiler_types.h:129:35: error: 'struct tlb_state' has no member named 'asi_session'
    #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
                                      ^
   include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE'
     asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
                                                                 ^~~
   include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
    #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
                                   ^~~~~~~~~~~~~~~~~~~
   include/linux/kbuild.h:11:14: note: in expansion of macro 'offsetof'
     DEFINE(sym, offsetof(struct str, mem))
                 ^~~~~~~~
   arch/x86/kernel/asm-offsets.c:97:2: note: in expansion of macro 'OFFSET'
     OFFSET(TLB_STATE_asi, tlb_state, asi_session.asi);
     ^~~~~~
   include/linux/compiler_types.h:129:35: error: 'struct tlb_state' has no member named 'asi_session'
    #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
                                      ^
   include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE'
     asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
                                                                 ^~~
   include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
    #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
                                   ^~~~~~~~~~~~~~~~~~~
   include/linux/kbuild.h:11:14: note: in expansion of macro 'offsetof'
     DEFINE(sym, offsetof(struct str, mem))
                 ^~~~~~~~
   arch/x86/kernel/asm-offsets.c:98:2: note: in expansion of macro 'OFFSET'
     OFFSET(TLB_STATE_asi_isolation_cr3, tlb_state,
     ^~~~~~
   include/linux/compiler_types.h:129:35: error: 'struct tlb_state' has no member named 'asi_session'
    #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
                                      ^
   include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE'
     asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
                                                                 ^~~
   include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
    #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
                                   ^~~~~~~~~~~~~~~~~~~
   include/linux/kbuild.h:11:14: note: in expansion of macro 'offsetof'
     DEFINE(sym, offsetof(struct str, mem))
                 ^~~~~~~~
   arch/x86/kernel/asm-offsets.c:100:2: note: in expansion of macro 'OFFSET'
     OFFSET(TLB_STATE_asi_original_cr3, tlb_state, asi_session.original_cr3);
     ^~~~~~
   include/linux/compiler_types.h:129:35: error: 'struct tlb_state' has no member named 'asi_session'
    #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
                                      ^
   include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE'
     asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
                                                                 ^~~
   include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
    #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
                                   ^~~~~~~~~~~~~~~~~~~
   include/linux/kbuild.h:11:14: note: in expansion of macro 'offsetof'
     DEFINE(sym, offsetof(struct str, mem))
                 ^~~~~~~~
   arch/x86/kernel/asm-offsets.c:101:2: note: in expansion of macro 'OFFSET'
     OFFSET(TLB_STATE_asi_idepth, tlb_state, asi_session.idepth);
     ^~~~~~
   make[2]: *** [scripts/Makefile.build:100: arch/x86/kernel/asm-offsets.s] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [Makefile:1141: prepare0] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:180: sub-make] Error 2

vim +/asi_type_user +410 arch/x86/include/asm/tlbflush.h

   384	
   385	/*
   386	 * Given an ASID, flush the corresponding user ASID.  We can delay this
   387	 * until the next time we switch to it.
   388	 *
   389	 * See SWITCH_TO_USER_CR3.
   390	 */
   391	static inline void invalidate_user_asid(u16 asid)
   392	{
   393		struct asi_tlb_state *tlb_state;
   394	
   395		/* There is no user ASID if address space separation is off */
   396		if (!IS_ENABLED(CONFIG_PAGE_TABLE_ISOLATION))
   397			return;
   398	
   399		/*
   400		 * We only have a single ASID if PCID is off and the CR3
   401		 * write will have flushed it.
   402		 */
   403		if (!cpu_feature_enabled(X86_FEATURE_PCID))
   404			return;
   405	
   406		if (!static_cpu_has(X86_FEATURE_PTI))
   407			return;
   408	
   409		if (IS_ENABLED(CONFIG_ADDRESS_SPACE_ISOLATION)) {
 > 410			tlb_state = get_cpu_ptr(asi_type_user.tlb_state);
 > 411			tlb_state->tlb_pgtables[asid].id = 0;
   412		} else {
   413			__set_bit(kern_pcid(asid),
   414			    (unsigned long *)this_cpu_ptr(&cpu_tlbstate.user_pcid_flush_mask));
   415		}
   416	}
   417	

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

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

  reply	other threads:[~2020-05-05 10:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-04 14:49 [RFC v4][PATCH part-1 0/7] ASI - Part I (ASI Infrastructure and PTI) Alexandre Chartre
2020-05-04 14:49 ` [RFC v4][PATCH part-1 1/7] mm/x86: Introduce kernel Address Space Isolation (ASI) Alexandre Chartre
2020-05-04 14:49 ` [RFC v4][PATCH part-1 2/7] mm/asi: ASI entry/exit interface Alexandre Chartre
2020-05-04 14:49 ` [RFC v4][PATCH part-1 3/7] mm/asi: Improve TLB flushing when switching to an ASI pagetable Alexandre Chartre
2020-05-04 14:49 ` [RFC v4][PATCH part-1 4/7] mm/asi: Interrupt ASI on interrupt/exception/NMI Alexandre Chartre
2020-05-05  9:26   ` kbuild test robot
2020-05-06  7:36   ` [mm/asi] c13d1a6ed3: BUG:scheduling_while_atomic kernel test robot
2020-05-06  7:36     ` kernel test robot
2020-05-04 14:49 ` [RFC v4][PATCH part-1 5/7] mm/asi: Exit/enter ASI when task enters/exits scheduler Alexandre Chartre
2020-05-05  0:27   ` kbuild test robot
2020-05-05  1:26   ` kbuild test robot
2020-05-04 14:49 ` [RFC v4][PATCH part-1 6/7] mm/asi: ASI fault handler Alexandre Chartre
2020-05-04 14:49 ` [RFC v4][PATCH part-1 7/7] mm/asi: Implement PTI with ASI Alexandre Chartre
2020-05-05 10:58   ` kbuild test robot [this message]
2020-05-12 17:45 ` [RFC v4][PATCH part-1 0/7] ASI - Part I (ASI Infrastructure and PTI) Dave Hansen
2020-05-12 19:25   ` Alexandre Chartre
2020-05-12 20:07   ` Andy Lutomirski

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=202005051858.Ly9Oai4L%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /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.