* [daveh-devel:kpte 2/6] include/asm-generic/pgalloc.h:144:21: warning: variable 'ptdesc' is uninitialized when used here
@ 2025-08-29 15:52 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2025-08-29 15:52 UTC (permalink / raw)
To: Dave Hansen; +Cc: llvm, oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/daveh/devel.git kpte
head: d5eaa925a3150c716e8ec564c51069fbdd303fbc
commit: ccbd04de39826d130b67374e68599e128b53acab [2/6] mm: Actually mark kernel page table pages
config: x86_64-buildonly-randconfig-004-20250829 (https://download.01.org/0day-ci/archive/20250829/202508292320.plYGOdi2-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250829/202508292320.plYGOdi2-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/202508292320.plYGOdi2-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from kernel/fork.c:110:
In file included from arch/x86/include/asm/pgalloc.h:13:
>> include/asm-generic/pgalloc.h:144:21: warning: variable 'ptdesc' is uninitialized when used here [-Wuninitialized]
144 | ptdesc_set_kernel(ptdesc);
| ^~~~~~
include/asm-generic/pgalloc.h:139:23: note: initialize the variable 'ptdesc' to silence this warning
139 | struct ptdesc *ptdesc;
| ^
| = NULL
include/asm-generic/pgalloc.h:179:21: warning: variable 'ptdesc' is uninitialized when used here [-Wuninitialized]
179 | ptdesc_set_kernel(ptdesc);
| ^~~~~~
include/asm-generic/pgalloc.h:175:23: note: initialize the variable 'ptdesc' to silence this warning
175 | struct ptdesc *ptdesc;
| ^
| = NULL
include/asm-generic/pgalloc.h:235:21: warning: variable 'ptdesc' is uninitialized when used here [-Wuninitialized]
235 | ptdesc_set_kernel(ptdesc);
| ^~~~~~
include/asm-generic/pgalloc.h:231:23: note: initialize the variable 'ptdesc' to silence this warning
231 | struct ptdesc *ptdesc;
| ^
| = NULL
include/asm-generic/pgalloc.h:281:21: warning: variable 'ptdesc' is uninitialized when used here [-Wuninitialized]
281 | ptdesc_set_kernel(ptdesc);
| ^~~~~~
include/asm-generic/pgalloc.h:277:23: note: initialize the variable 'ptdesc' to silence this warning
277 | struct ptdesc *ptdesc;
| ^
| = NULL
4 warnings generated.
vim +/ptdesc +144 include/asm-generic/pgalloc.h
124
125 #ifndef __HAVE_ARCH_PMD_ALLOC_ONE
126 /**
127 * pmd_alloc_one - allocate memory for a PMD-level page table
128 * @mm: the mm_struct of the current context
129 *
130 * Allocate memory for a page table and ptdesc and runs pagetable_pmd_ctor().
131 *
132 * Allocations use %GFP_PGTABLE_USER in user context and
133 * %GFP_PGTABLE_KERNEL in kernel context.
134 *
135 * Return: pointer to the allocated memory or %NULL on error
136 */
137 static inline pmd_t *pmd_alloc_one_noprof(struct mm_struct *mm, unsigned long addr)
138 {
139 struct ptdesc *ptdesc;
140 gfp_t gfp = GFP_PGTABLE_USER;
141
142 if (mm == &init_mm) {
143 gfp = GFP_PGTABLE_KERNEL;
> 144 ptdesc_set_kernel(ptdesc);
145 }
146 ptdesc = pagetable_alloc_noprof(gfp, 0);
147 if (!ptdesc)
148 return NULL;
149 if (!pagetable_pmd_ctor(mm, ptdesc)) {
150 pagetable_free(ptdesc);
151 return NULL;
152 }
153 return ptdesc_address(ptdesc);
154 }
155 #define pmd_alloc_one(...) alloc_hooks(pmd_alloc_one_noprof(__VA_ARGS__))
156 #endif
157
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
* [daveh-devel:kpte 2/6] include/asm-generic/pgalloc.h:144:21: warning: variable 'ptdesc' is uninitialized when used here
@ 2025-08-29 16:33 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2025-08-29 16:33 UTC (permalink / raw)
To: Dave Hansen; +Cc: llvm, oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/daveh/devel.git kpte
head: d5eaa925a3150c716e8ec564c51069fbdd303fbc
commit: ccbd04de39826d130b67374e68599e128b53acab [2/6] mm: Actually mark kernel page table pages
config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20250829/202508291824.iykihj3B-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
rustc: rustc 1.88.0 (6b00bc388 2025-06-23)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250829/202508291824.iykihj3B-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/202508291824.iykihj3B-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from kernel/fork.c:110:
In file included from arch/x86/include/asm/pgalloc.h:13:
>> include/asm-generic/pgalloc.h:144:21: warning: variable 'ptdesc' is uninitialized when used here [-Wuninitialized]
144 | ptdesc_set_kernel(ptdesc);
| ^~~~~~
include/asm-generic/pgalloc.h:139:23: note: initialize the variable 'ptdesc' to silence this warning
139 | struct ptdesc *ptdesc;
| ^
| = NULL
include/asm-generic/pgalloc.h:179:21: warning: variable 'ptdesc' is uninitialized when used here [-Wuninitialized]
179 | ptdesc_set_kernel(ptdesc);
| ^~~~~~
include/asm-generic/pgalloc.h:175:23: note: initialize the variable 'ptdesc' to silence this warning
175 | struct ptdesc *ptdesc;
| ^
| = NULL
include/asm-generic/pgalloc.h:235:21: warning: variable 'ptdesc' is uninitialized when used here [-Wuninitialized]
235 | ptdesc_set_kernel(ptdesc);
| ^~~~~~
include/asm-generic/pgalloc.h:231:23: note: initialize the variable 'ptdesc' to silence this warning
231 | struct ptdesc *ptdesc;
| ^
| = NULL
include/asm-generic/pgalloc.h:281:21: warning: variable 'ptdesc' is uninitialized when used here [-Wuninitialized]
281 | ptdesc_set_kernel(ptdesc);
| ^~~~~~
include/asm-generic/pgalloc.h:277:23: note: initialize the variable 'ptdesc' to silence this warning
277 | struct ptdesc *ptdesc;
| ^
| = NULL
4 warnings generated.
vim +/ptdesc +144 include/asm-generic/pgalloc.h
124
125 #ifndef __HAVE_ARCH_PMD_ALLOC_ONE
126 /**
127 * pmd_alloc_one - allocate memory for a PMD-level page table
128 * @mm: the mm_struct of the current context
129 *
130 * Allocate memory for a page table and ptdesc and runs pagetable_pmd_ctor().
131 *
132 * Allocations use %GFP_PGTABLE_USER in user context and
133 * %GFP_PGTABLE_KERNEL in kernel context.
134 *
135 * Return: pointer to the allocated memory or %NULL on error
136 */
137 static inline pmd_t *pmd_alloc_one_noprof(struct mm_struct *mm, unsigned long addr)
138 {
139 struct ptdesc *ptdesc;
140 gfp_t gfp = GFP_PGTABLE_USER;
141
142 if (mm == &init_mm) {
143 gfp = GFP_PGTABLE_KERNEL;
> 144 ptdesc_set_kernel(ptdesc);
145 }
146 ptdesc = pagetable_alloc_noprof(gfp, 0);
147 if (!ptdesc)
148 return NULL;
149 if (!pagetable_pmd_ctor(mm, ptdesc)) {
150 pagetable_free(ptdesc);
151 return NULL;
152 }
153 return ptdesc_address(ptdesc);
154 }
155 #define pmd_alloc_one(...) alloc_hooks(pmd_alloc_one_noprof(__VA_ARGS__))
156 #endif
157
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-08-29 16:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-29 15:52 [daveh-devel:kpte 2/6] include/asm-generic/pgalloc.h:144:21: warning: variable 'ptdesc' is uninitialized when used here kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2025-08-29 16:33 kernel test robot
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).