Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Peter Zijlstra (Intel)" <peterz@infradead.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	"Mike Rapoport (Microsoft)" <rppt@kernel.org>,
	Nikolay Borisov <nik.borisov@suse.com>
Subject: [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
Date: Fri, 6 Jun 2025 03:23:09 +0800	[thread overview]
Message-ID: <202506060355.7UJHIyDa-lkp@intel.com> (raw)

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

             reply	other threads:[~2025-06-05 19:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-05 19:23 kernel test robot [this message]
2025-06-06  8:50 ` [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 Peter Zijlstra

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=202506060355.7UJHIyDa-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=nik.borisov@suse.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=peterz@infradead.org \
    --cc=rppt@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