* [linux-next:master 4579/4901] arch/x86/kernel/cpu/mce/severity.c:305:22: error: implicit declaration of function 'FIELD_GET'
@ 2025-02-20 4:21 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-02-20 4:21 UTC (permalink / raw)
To: Shuai Xue; +Cc: 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: 8936cec5cb6e27649b86fabf383d7ce4113bba49
commit: 599382062e7b91fb049e339db93c3a0b840d2b6e [4579/4901] x86/mce: add EX_TYPE_EFAULT_REG as in-kernel recovery context to fix copy-from-user operations regression
config: x86_64-buildonly-randconfig-004-20250220 (https://download.01.org/0day-ci/archive/20250220/202502201215.ZkIMdQVr-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250220/202502201215.ZkIMdQVr-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/202502201215.ZkIMdQVr-lkp@intel.com/
Note: the linux-next/master HEAD 8936cec5cb6e27649b86fabf383d7ce4113bba49 builds fine.
It may have been fixed somewhere.
All errors (new ones prefixed by >>):
arch/x86/kernel/cpu/mce/severity.c: In function 'error_context':
>> arch/x86/kernel/cpu/mce/severity.c:305:22: error: implicit declaration of function 'FIELD_GET' [-Werror=implicit-function-declaration]
305 | fixup_type = FIELD_GET(EX_DATA_TYPE_MASK, e->data);
| ^~~~~~~~~
cc1: some warnings being treated as errors
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-20 4:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-20 4:21 [linux-next:master 4579/4901] arch/x86/kernel/cpu/mce/severity.c:305:22: error: implicit declaration of function 'FIELD_GET' 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