* [linux-next:master 4579/5164] arch/x86/kernel/cpu/mce/severity.c:305:15: error: call to undeclared function 'FIELD_GET'; ISO C99 and later do not support implicit function declarations
@ 2025-02-21 4:25 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-02-21 4:25 UTC (permalink / raw)
To: Shuai Xue
Cc: llvm, oe-kbuild-all, Andrew Morton, Linux Memory Management List
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 50a0c754714aa3ea0b0e62f3765eb666a1579f24
commit: 599382062e7b91fb049e339db93c3a0b840d2b6e [4579/5164] x86/mce: add EX_TYPE_EFAULT_REG as in-kernel recovery context to fix copy-from-user operations regression
config: i386-buildonly-randconfig-006-20250221 (https://download.01.org/0day-ci/archive/20250221/202502211226.wBvLAdwM-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250221/202502211226.wBvLAdwM-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/202502211226.wBvLAdwM-lkp@intel.com/
Note: the linux-next/master HEAD 50a0c754714aa3ea0b0e62f3765eb666a1579f24 builds fine.
It may have been fixed somewhere.
All errors (new ones prefixed by >>):
In file included from arch/x86/kernel/cpu/mce/severity.c:16:
In file included from arch/x86/include/asm/traps.h:6:
In file included from include/linux/kprobes.h:28:
In file included from include/linux/ftrace.h:13:
In file included from include/linux/kallsyms.h:13:
In file included from include/linux/mm.h:2318:
include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
>> arch/x86/kernel/cpu/mce/severity.c:305:15: error: call to undeclared function 'FIELD_GET'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
305 | fixup_type = FIELD_GET(EX_DATA_TYPE_MASK, e->data);
| ^
1 warning and 1 error generated.
vim +/FIELD_GET +305 arch/x86/kernel/cpu/mce/severity.c
275
276 /*
277 * If mcgstatus indicated that ip/cs on the stack were
278 * no good, then "m->cs" will be zero and we will have
279 * to assume the worst case (IN_KERNEL) as we actually
280 * have no idea what we were executing when the machine
281 * check hit.
282 * If we do have a good "m->cs" (or a faked one in the
283 * case we were executing in VM86 mode) we can use it to
284 * distinguish an exception taken in user from from one
285 * taken in the kernel.
286 */
287 static noinstr int error_context(struct mce *m, struct pt_regs *regs)
288 {
289 const struct exception_table_entry *e;
290 int fixup_type, imm;
291 bool copy_user;
292
293 if ((m->cs & 3) == 3)
294 return IN_USER;
295
296 if (!mc_recoverable(m->mcgstatus))
297 return IN_KERNEL;
298
299 e = search_exception_tables(m->ip);
300 if (!e)
301 return IN_KERNEL;
302
303 /* Allow instrumentation around external facilities usage. */
304 instrumentation_begin();
> 305 fixup_type = FIELD_GET(EX_DATA_TYPE_MASK, e->data);
306 imm = FIELD_GET(EX_DATA_IMM_MASK, e->data);
307 copy_user = is_copy_from_user(regs);
308 instrumentation_end();
309
310 switch (fixup_type) {
311 case EX_TYPE_UACCESS:
312 if (!copy_user)
313 return IN_KERNEL;
314 m->kflags |= MCE_IN_KERNEL_COPYIN | MCE_IN_KERNEL_RECOV;
315 return IN_KERNEL_RECOV;
316 case EX_TYPE_IMM_REG:
317 if (!copy_user || imm != -EFAULT)
318 return IN_KERNEL;
319 m->kflags |= MCE_IN_KERNEL_COPYIN | MCE_IN_KERNEL_RECOV;
320 return IN_KERNEL_RECOV;
321 case EX_TYPE_FAULT_MCE_SAFE:
322 case EX_TYPE_DEFAULT_MCE_SAFE:
323 m->kflags |= MCE_IN_KERNEL_RECOV;
324 return IN_KERNEL_RECOV;
325
326 default:
327 return IN_KERNEL;
328 }
329 }
330
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-02-21 4:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-21 4:25 [linux-next:master 4579/5164] arch/x86/kernel/cpu/mce/severity.c:305:15: error: call to undeclared function 'FIELD_GET'; ISO C99 and later do not support implicit function declarations 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