From: kernel test robot <lkp@intel.com>
To: Shuai Xue <xueshuai@linux.alibaba.com>
Cc: oe-kbuild-all@lists.linux.dev,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: [linux-next:master 4579/4901] arch/x86/kernel/cpu/mce/severity.c:305:22: error: implicit declaration of function 'FIELD_GET'
Date: Thu, 20 Feb 2025 12:21:25 +0800 [thread overview]
Message-ID: <202502201215.ZkIMdQVr-lkp@intel.com> (raw)
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
reply other threads:[~2025-02-20 4:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202502201215.ZkIMdQVr-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=xueshuai@linux.alibaba.com \
/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