From: kernel test robot <lkp@intel.com>
To: Balbir Singh <balbirs@nvidia.com>
Cc: oe-kbuild-all@lists.linux.dev,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: [akpm-mm:mm-unstable 39/428] include/linux/pgtable.h:235:36: error: expected expression before 'do'
Date: Sat, 13 Sep 2025 12:53:27 +0800 [thread overview]
Message-ID: <202509131255.x9EfvIGt-lkp@intel.com> (raw)
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
next reply other threads:[~2025-09-13 4:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-13 4:53 kernel test robot [this message]
2025-09-13 6:03 ` Andrew Morton
2025-09-13 22:57 ` Balbir Singh
2025-09-14 0:06 ` Andrew Morton
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=202509131255.x9EfvIGt-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=balbirs@nvidia.com \
--cc=linux-mm@kvack.org \
--cc=oe-kbuild-all@lists.linux.dev \
/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