linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [akpm-mm:mm-unstable 39/428] include/linux/pgtable.h:235:36: error: expected expression before 'do'
@ 2025-09-13  4:53 kernel test robot
  2025-09-13  6:03 ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2025-09-13  4:53 UTC (permalink / raw)
  To: Balbir Singh; +Cc: oe-kbuild-all, Andrew Morton, Linux Memory Management List

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
head:   8ded915c4409a5190b1c9c57c172d62ab5534274
commit: f6748cc302fdca7c486c6098f315bd4174f5c614 [39/428] kasan: Fix warnings caused by use of arch_enter_lazy_mmu_mode()
config: s390-randconfig-002-20250913 (https://download.01.org/0day-ci/archive/20250913/202509131255.x9EfvIGt-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250913/202509131255.x9EfvIGt-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202509131255.x9EfvIGt-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from include/linux/kasan.h:37,
                    from mm/kasan/shadow.c:14:
   mm/kasan/shadow.c: In function 'kasan_populate_vmalloc_pte':
>> include/linux/pgtable.h:235:36: error: expected expression before 'do'
    #define arch_enter_lazy_mmu_mode() do {} while (0)
                                       ^~
   mm/kasan/shadow.c:322:8: note: in expansion of macro 'arch_enter_lazy_mmu_mode'
     (void)arch_enter_lazy_mmu_mode();
           ^~~~~~~~~~~~~~~~~~~~~~~~
   mm/kasan/shadow.c: In function 'kasan_depopulate_vmalloc_pte':
>> include/linux/pgtable.h:235:36: error: expected expression before 'do'
    #define arch_enter_lazy_mmu_mode() do {} while (0)
                                       ^~
   mm/kasan/shadow.c:497:8: note: in expansion of macro 'arch_enter_lazy_mmu_mode'
     (void)arch_enter_lazy_mmu_mode();
           ^~~~~~~~~~~~~~~~~~~~~~~~


vim +/do +235 include/linux/pgtable.h

533c67e63584067 Kinsey Ho               2023-12-27  214  
bcc6cc832573a99 Matthew Wilcox (Oracle  2023-08-02  215) /*
bcc6cc832573a99 Matthew Wilcox (Oracle  2023-08-02  216)  * A facility to provide lazy MMU batching.  This allows PTE updates and
bcc6cc832573a99 Matthew Wilcox (Oracle  2023-08-02  217)  * page invalidations to be delayed until a call to leave lazy MMU mode
bcc6cc832573a99 Matthew Wilcox (Oracle  2023-08-02  218)  * is issued.  Some architectures may benefit from doing this, and it is
bcc6cc832573a99 Matthew Wilcox (Oracle  2023-08-02  219)  * beneficial for both shadow and direct mode hypervisors, which may batch
bcc6cc832573a99 Matthew Wilcox (Oracle  2023-08-02  220)  * the PTE updates which happen during this window.  Note that using this
bcc6cc832573a99 Matthew Wilcox (Oracle  2023-08-02  221)  * interface requires that read hazards be removed from the code.  A read
bcc6cc832573a99 Matthew Wilcox (Oracle  2023-08-02  222)  * hazard could result in the direct mode hypervisor case, since the actual
bcc6cc832573a99 Matthew Wilcox (Oracle  2023-08-02  223)  * write to the page tables may not yet have taken place, so reads though
bcc6cc832573a99 Matthew Wilcox (Oracle  2023-08-02  224)  * a raw PTE pointer after it has been modified are not guaranteed to be
691ee97e1a9de0c Ryan Roberts            2025-03-03  225   * up to date.
691ee97e1a9de0c Ryan Roberts            2025-03-03  226   *
691ee97e1a9de0c Ryan Roberts            2025-03-03  227   * In the general case, no lock is guaranteed to be held between entry and exit
691ee97e1a9de0c Ryan Roberts            2025-03-03  228   * of the lazy mode. So the implementation must assume preemption may be enabled
691ee97e1a9de0c Ryan Roberts            2025-03-03  229   * and cpu migration is possible; it must take steps to be robust against this.
691ee97e1a9de0c Ryan Roberts            2025-03-03  230   * (In practice, for user PTE updates, the appropriate page table lock(s) are
691ee97e1a9de0c Ryan Roberts            2025-03-03  231   * held, but for kernel PTE updates, no lock is held). Nesting is not permitted
691ee97e1a9de0c Ryan Roberts            2025-03-03  232   * and the mode cannot be used in interrupt context.
bcc6cc832573a99 Matthew Wilcox (Oracle  2023-08-02  233)  */
bcc6cc832573a99 Matthew Wilcox (Oracle  2023-08-02  234) #ifndef __HAVE_ARCH_ENTER_LAZY_MMU_MODE
bcc6cc832573a99 Matthew Wilcox (Oracle  2023-08-02 @235) #define arch_enter_lazy_mmu_mode()	do {} while (0)
bcc6cc832573a99 Matthew Wilcox (Oracle  2023-08-02  236) #define arch_leave_lazy_mmu_mode()	do {} while (0)
bcc6cc832573a99 Matthew Wilcox (Oracle  2023-08-02  237) #define arch_flush_lazy_mmu_mode()	do {} while (0)
bcc6cc832573a99 Matthew Wilcox (Oracle  2023-08-02  238) #endif
bcc6cc832573a99 Matthew Wilcox (Oracle  2023-08-02  239) 

:::::: The code at line 235 was first introduced by commit
:::::: bcc6cc832573a99d1f935c89a28e2c71fd1aaf0c mm: add default definition of set_ptes()

:::::: TO: Matthew Wilcox (Oracle) <willy@infradead.org>
:::::: CC: Andrew Morton <akpm@linux-foundation.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


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

end of thread, other threads:[~2025-09-14  0:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-13  4:53 [akpm-mm:mm-unstable 39/428] include/linux/pgtable.h:235:36: error: expected expression before 'do' kernel test robot
2025-09-13  6:03 ` Andrew Morton
2025-09-13 22:57   ` Balbir Singh
2025-09-14  0:06     ` Andrew Morton

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