* [peterz-queue:x86/urgent 4/5] arch/x86/kernel/alternative.c:264:14: error: call to undeclared function 'its_alloc'; ISO C99 and later do not support implicit function declarations
@ 2025-06-05 19:23 kernel test robot
2025-06-06 8:50 ` Peter Zijlstra
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2025-06-05 19:23 UTC (permalink / raw)
To: Peter Zijlstra (Intel)
Cc: llvm, oe-kbuild-all, Mike Rapoport (Microsoft), Nikolay Borisov
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git x86/urgent
head: e87348e4a2daaf44da409991ca751e8844b27ef8
commit: 01c48b9466bf0ecf95821e3ea1a58b876c4e8aaf [4/5] x86/its: explicitly manage permissions for ITS pages
config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20250606/202506060355.7UJHIyDa-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
rustc: rustc 1.78.0 (9b00956e5 2024-04-29)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250606/202506060355.7UJHIyDa-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/202506060355.7UJHIyDa-lkp@intel.com/
All errors (new ones prefixed by >>):
>> arch/x86/kernel/alternative.c:264:14: error: call to undeclared function 'its_alloc'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
264 | its_page = its_alloc();
| ^
>> arch/x86/kernel/alternative.c:264:12: error: incompatible integer to pointer conversion assigning to 'void *' from 'int' [-Wint-conversion]
264 | its_page = its_alloc();
| ^ ~~~~~~~~~~~
2 errors generated.
vim +/its_alloc +264 arch/x86/kernel/alternative.c
e52c1dc7455d32 Peter Zijlstra 2025-04-23 262
872df34d7c51a7 Peter Zijlstra 2024-10-14 263 if (!its_page || (its_offset + size - 1) >= PAGE_SIZE) {
872df34d7c51a7 Peter Zijlstra 2024-10-14 @264 its_page = its_alloc();
872df34d7c51a7 Peter Zijlstra 2024-10-14 265 if (!its_page) {
872df34d7c51a7 Peter Zijlstra 2024-10-14 266 pr_err("ITS page allocation failed\n");
872df34d7c51a7 Peter Zijlstra 2024-10-14 267 return NULL;
872df34d7c51a7 Peter Zijlstra 2024-10-14 268 }
872df34d7c51a7 Peter Zijlstra 2024-10-14 269 memset(its_page, INT3_INSN_OPCODE, PAGE_SIZE);
872df34d7c51a7 Peter Zijlstra 2024-10-14 270 its_offset = 32;
872df34d7c51a7 Peter Zijlstra 2024-10-14 271 }
872df34d7c51a7 Peter Zijlstra 2024-10-14 272
872df34d7c51a7 Peter Zijlstra 2024-10-14 273 /*
872df34d7c51a7 Peter Zijlstra 2024-10-14 274 * If the indirect branch instruction will be in the lower half
872df34d7c51a7 Peter Zijlstra 2024-10-14 275 * of a cacheline, then update the offset to reach the upper half.
872df34d7c51a7 Peter Zijlstra 2024-10-14 276 */
872df34d7c51a7 Peter Zijlstra 2024-10-14 277 if ((its_offset + size - 1) % 64 < 32)
872df34d7c51a7 Peter Zijlstra 2024-10-14 278 its_offset = ((its_offset - 1) | 0x3F) + 33;
872df34d7c51a7 Peter Zijlstra 2024-10-14 279
872df34d7c51a7 Peter Zijlstra 2024-10-14 280 thunk = its_page + its_offset;
872df34d7c51a7 Peter Zijlstra 2024-10-14 281 its_offset += size;
872df34d7c51a7 Peter Zijlstra 2024-10-14 282
872df34d7c51a7 Peter Zijlstra 2024-10-14 283 return its_init_thunk(thunk, reg);
872df34d7c51a7 Peter Zijlstra 2024-10-14 284 }
872df34d7c51a7 Peter Zijlstra 2024-10-14 285
:::::: The code at line 264 was first introduced by commit
:::::: 872df34d7c51a79523820ea6a14860398c639b87 x86/its: Use dynamic thunks for indirect branches
:::::: TO: Peter Zijlstra <peterz@infradead.org>
:::::: CC: Dave Hansen <dave.hansen@linux.intel.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [peterz-queue:x86/urgent 4/5] arch/x86/kernel/alternative.c:264:14: error: call to undeclared function 'its_alloc'; ISO C99 and later do not support implicit function declarations
2025-06-05 19:23 [peterz-queue:x86/urgent 4/5] arch/x86/kernel/alternative.c:264:14: error: call to undeclared function 'its_alloc'; ISO C99 and later do not support implicit function declarations kernel test robot
@ 2025-06-06 8:50 ` Peter Zijlstra
0 siblings, 0 replies; 2+ messages in thread
From: Peter Zijlstra @ 2025-06-06 8:50 UTC (permalink / raw)
To: kernel test robot
Cc: llvm, oe-kbuild-all, Mike Rapoport (Microsoft), Nikolay Borisov
On Fri, Jun 06, 2025 at 03:23:09AM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git x86/urgent
> head: e87348e4a2daaf44da409991ca751e8844b27ef8
> commit: 01c48b9466bf0ecf95821e3ea1a58b876c4e8aaf [4/5] x86/its: explicitly manage permissions for ITS pages
> config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20250606/202506060355.7UJHIyDa-lkp@intel.com/config)
> compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
> rustc: rustc 1.78.0 (9b00956e5 2024-04-29)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250606/202506060355.7UJHIyDa-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/202506060355.7UJHIyDa-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
> >> arch/x86/kernel/alternative.c:264:14: error: call to undeclared function 'its_alloc'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
> 264 | its_page = its_alloc();
> | ^
*sigh*... obviously I failed both typing and compiling before pushing
things out. Lets try this again ;-)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-06-06 8:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-05 19:23 [peterz-queue:x86/urgent 4/5] arch/x86/kernel/alternative.c:264:14: error: call to undeclared function 'its_alloc'; ISO C99 and later do not support implicit function declarations kernel test robot
2025-06-06 8:50 ` Peter Zijlstra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox