Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jackie Liu <liu.yun@linux.dev>, glider@google.com
Cc: oe-kbuild-all@lists.linux.dev, dvyukov@google.com,
	elver@google.com, pjw@kernel.org, alex@ghiti.fr,
	aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org,
	linux-mm@kvack.org, kasan-dev@googlegroups.com,
	muchun.song@linux.dev, liu.yun@linux.dev
Subject: Re: [PATCH 3/3] riscv: keep booting if KFENCE pool reservation fails
Date: Thu, 29 Oct 2026 10:28:33 +0800	[thread overview]
Message-ID: <202610290904.wbrEL97y-lkp@intel.com> (raw)
In-Reply-To: <58e3baebbf4e454725e6bde8b7a267fb71cfdaae.1793017074.git.liuyun01@kylinos.cn>

Hi Jackie,

kernel test robot noticed the following build errors:

[auto build test ERROR on 7be4bc52fd9e0e55dc9a2e0232b89427d2c4b614]

url:    https://github.com/intel-lab-lkp/linux/commits/Jackie-Liu/kfence-fix-pool-cleanup-on-metadata-allocation-failure/20261026-202302
base:   7be4bc52fd9e0e55dc9a2e0232b89427d2c4b614
patch link:    https://lore.kernel.org/r/58e3baebbf4e454725e6bde8b7a267fb71cfdaae.1793017074.git.liuyun01%40kylinos.cn
patch subject: [PATCH 3/3] riscv: keep booting if KFENCE pool reservation fails
config: riscv-randconfig-1001-20261029 (https://download.01.org/0day-ci/archive/20261029/202610290904.wbrEL97y-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 15.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261029/202610290904.wbrEL97y-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/202610290904.wbrEL97y-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from arch/riscv/mm/init.c:30:
   arch/riscv/include/asm/kfence.h: In function 'kfence_protect_page':
>> arch/riscv/include/asm/kfence.h:21:22: error: implicit declaration of function 'virt_to_kpte'; did you mean 'virt_to_page'? [-Wimplicit-function-declaration]
      21 |         pte_t *pte = virt_to_kpte(addr);
         |                      ^~~~~~~~~~~~
         |                      virt_to_page
>> arch/riscv/include/asm/kfence.h:21:22: error: initialization of 'pte_t *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
>> arch/riscv/include/asm/kfence.h:24:17: error: implicit declaration of function 'set_pte'; did you mean 'set_pgd'? [-Wimplicit-function-declaration]
      24 |                 set_pte(pte, __pte(pte_val(ptep_get(pte)) & ~_PAGE_PRESENT));
         |                 ^~~~~~~
         |                 set_pgd
   In file included from arch/riscv/include/asm/thread_info.h:11,
                    from include/linux/thread_info.h:62,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/riscv/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:107,
                    from include/linux/spinlock.h:56,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:7,
                    from include/linux/mm.h:8,
                    from arch/riscv/mm/init.c:10:
>> arch/riscv/include/asm/kfence.h:24:44: error: implicit declaration of function 'ptep_get' [-Wimplicit-function-declaration]
      24 |                 set_pte(pte, __pte(pte_val(ptep_get(pte)) & ~_PAGE_PRESENT));
         |                                            ^~~~~~~~
   arch/riscv/include/asm/page.h:75:37: note: in definition of macro '__pte'
      75 | #define __pte(x)        ((pte_t) { (x) })
         |                                     ^
   arch/riscv/include/asm/kfence.h:24:36: note: in expansion of macro 'pte_val'
      24 |                 set_pte(pte, __pte(pte_val(ptep_get(pte)) & ~_PAGE_PRESENT));
         |                                    ^~~~~~~
>> arch/riscv/include/asm/page.h:71:29: error: request for member 'pte' in something not a structure or union
      71 | #define pte_val(x)      ((x).pte)
         |                             ^
   arch/riscv/include/asm/page.h:75:37: note: in definition of macro '__pte'
      75 | #define __pte(x)        ((pte_t) { (x) })
         |                                     ^
   arch/riscv/include/asm/kfence.h:24:36: note: in expansion of macro 'pte_val'
      24 |                 set_pte(pte, __pte(pte_val(ptep_get(pte)) & ~_PAGE_PRESENT));
         |                                    ^~~~~~~
>> arch/riscv/include/asm/page.h:71:29: error: request for member 'pte' in something not a structure or union
      71 | #define pte_val(x)      ((x).pte)
         |                             ^
   arch/riscv/include/asm/page.h:75:37: note: in definition of macro '__pte'
      75 | #define __pte(x)        ((pte_t) { (x) })
         |                                     ^
   arch/riscv/include/asm/kfence.h:26:36: note: in expansion of macro 'pte_val'
      26 |                 set_pte(pte, __pte(pte_val(ptep_get(pte)) | _PAGE_PRESENT));
         |                                    ^~~~~~~
>> arch/riscv/include/asm/kfence.h:27:17: error: implicit declaration of function 'mark_new_valid_map' [-Wimplicit-function-declaration]
      27 |                 mark_new_valid_map();
         |                 ^~~~~~~~~~~~~~~~~~
>> arch/riscv/include/asm/kfence.h:31:9: error: implicit declaration of function 'local_flush_tlb_kernel_range'; did you mean 'local_flush_icache_range'? [-Wimplicit-function-declaration]
      31 |         local_flush_tlb_kernel_range(addr, addr + PAGE_SIZE);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |         local_flush_icache_range


vim +21 arch/riscv/include/asm/kfence.h

47513f243b452a Liu Shixin      2021-06-15  18  
47513f243b452a Liu Shixin      2021-06-15  19  static inline bool kfence_protect_page(unsigned long addr, bool protect)
47513f243b452a Liu Shixin      2021-06-15  20  {
47513f243b452a Liu Shixin      2021-06-15 @21  	pte_t *pte = virt_to_kpte(addr);
47513f243b452a Liu Shixin      2021-06-15  22  
8d6c8c40e733b3 Vivian Wang     2026-03-03  23  	if (protect) {
edf95564726942 Alexandre Ghiti 2023-12-13 @24  		set_pte(pte, __pte(pte_val(ptep_get(pte)) & ~_PAGE_PRESENT));
8d6c8c40e733b3 Vivian Wang     2026-03-03  25  	} else {
edf95564726942 Alexandre Ghiti 2023-12-13  26  		set_pte(pte, __pte(pte_val(ptep_get(pte)) | _PAGE_PRESENT));
8d6c8c40e733b3 Vivian Wang     2026-03-03 @27  		mark_new_valid_map();
8d6c8c40e733b3 Vivian Wang     2026-03-03  28  	}
47513f243b452a Liu Shixin      2021-06-15  29  
b3431a8bb336ce Alexandre Ghiti 2024-12-09  30  	preempt_disable();
b3431a8bb336ce Alexandre Ghiti 2024-12-09 @31  	local_flush_tlb_kernel_range(addr, addr + PAGE_SIZE);
b3431a8bb336ce Alexandre Ghiti 2024-12-09  32  	preempt_enable();
47513f243b452a Liu Shixin      2021-06-15  33  
47513f243b452a Liu Shixin      2021-06-15  34  	return true;
47513f243b452a Liu Shixin      2021-06-15  35  }
47513f243b452a Liu Shixin      2021-06-15  36  

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

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

      reply	other threads:[~2026-10-29  2:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-26 12:23 [PATCH 0/3] kfence: fix pool allocation failure handling Jackie Liu
2026-10-26 12:23 ` [PATCH 1/3] kfence: fix pool cleanup on metadata allocation failure Jackie Liu
2026-10-26 13:08   ` Marco Elver
2026-10-26 12:23 ` [PATCH 2/3] kfence: clear the pool pointer before freeing pages Jackie Liu
2026-10-26 13:10   ` Marco Elver
2026-10-26 12:23 ` [PATCH 3/3] riscv: keep booting if KFENCE pool reservation fails Jackie Liu
2026-10-29  2:28   ` kernel test robot [this message]

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=202610290904.wbrEL97y-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=dvyukov@google.com \
    --cc=elver@google.com \
    --cc=glider@google.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-mm@kvack.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=liu.yun@linux.dev \
    --cc=muchun.song@linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pjw@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox