[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202504180628.qlDJEl1e-lkp@intel.com>
Date: Fri, 18 Apr 2025 06:31:15 +0800
From: kernel test robot <lkp@...el.com>
To: Dan Williams <dan.j.williams@...el.com>, dave.hansen@...ux.intel.com
Cc: oe-kbuild-all@...ts.linux.dev, x86@...nel.org,
Kees Cook <kees@...nel.org>, Ingo Molnar <mingo@...nel.org>,
Naveen N Rao <naveen@...nel.org>,
Vishal Annapurve <vannapurve@...gle.com>,
Kirill Shutemov <kirill.shutemov@...ux.intel.com>,
Nikolay Borisov <nik.borisov@...e.com>, stable@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-coco@...ts.linux.dev
Subject: Re: [PATCH v3 2/2] x86/devmem: Drop /dev/mem access for confidential
guests
Hi Dan,
kernel test robot noticed the following build errors:
[auto build test ERROR on 0af2f6be1b4281385b618cb86ad946eded089ac8]
url: https://github.com/intel-lab-lkp/linux/commits/Dan-Williams/x86-devmem-Remove-duplicate-range_is_allowed-definition/20250418-031657
base: 0af2f6be1b4281385b618cb86ad946eded089ac8
patch link: https://lore.kernel.org/r/174491712829.1395340.5054725417641299524.stgit%40dwillia2-xfh.jf.intel.com
patch subject: [PATCH v3 2/2] x86/devmem: Drop /dev/mem access for confidential guests
config: arc-randconfig-001-20250418 (https://download.01.org/0day-ci/archive/20250418/202504180628.qlDJEl1e-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250418/202504180628.qlDJEl1e-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504180628.qlDJEl1e-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/char/mem.c: In function 'open_port':
>> drivers/char/mem.c:604:13: error: implicit declaration of function 'cc_platform_has' [-Wimplicit-function-declaration]
604 | cc_platform_has(CC_ATTR_GUEST_MEM_ENCRYPT))
| ^~~~~~~~~~~~~~~
>> drivers/char/mem.c:604:29: error: 'CC_ATTR_GUEST_MEM_ENCRYPT' undeclared (first use in this function)
604 | cc_platform_has(CC_ATTR_GUEST_MEM_ENCRYPT))
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/char/mem.c:604:29: note: each undeclared identifier is reported only once for each function it appears in
vim +/cc_platform_has +604 drivers/char/mem.c
586
587 static int open_port(struct inode *inode, struct file *filp)
588 {
589 int rc;
590
591 if (!capable(CAP_SYS_RAWIO))
592 return -EPERM;
593
594 rc = security_locked_down(LOCKDOWN_DEV_MEM);
595 if (rc)
596 return rc;
597
598 /*
599 * Enforce encrypted mapping consistency and avoid unaccepted
600 * memory conflicts, "lockdown" /dev/mem for confidential
601 * guests.
602 */
603 if (IS_ENABLED(CONFIG_STRICT_DEVMEM) &&
> 604 cc_platform_has(CC_ATTR_GUEST_MEM_ENCRYPT))
605 return -EPERM;
606
607 if (iminor(inode) != DEVMEM_MINOR)
608 return 0;
609
610 /*
611 * Use a unified address space to have a single point to manage
612 * revocations when drivers want to take over a /dev/mem mapped
613 * range.
614 */
615 filp->f_mapping = iomem_get_mapping();
616
617 return 0;
618 }
619
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists