public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [daveh-devel:testme 1/1] arch/x86/mm/pat/set_memory.c:2254:22: error: invalid operands to binary | (have 'pgprot_t' {aka 'struct pgprot'} and 'long unsigned int')
@ 2022-09-07 22:17 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-09-07 22:17 UTC (permalink / raw)
  To: Dave Hansen; +Cc: kbuild-all, linux-kernel

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/daveh/devel.git testme
head:   081cfdf8062c89d33ee205da299ea36b7e648a5a
commit: 081cfdf8062c89d33ee205da299ea36b7e648a5a [1/1] x86/mm: Set NX bit when making pages present
config: x86_64-defconfig (https://download.01.org/0day-ci/archive/20220908/202209080608.99NMiui4-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/daveh/devel.git/commit/?id=081cfdf8062c89d33ee205da299ea36b7e648a5a
        git remote add daveh-devel https://git.kernel.org/pub/scm/linux/kernel/git/daveh/devel.git
        git fetch --no-tags daveh-devel testme
        git checkout 081cfdf8062c89d33ee205da299ea36b7e648a5a
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   arch/x86/mm/pat/set_memory.c: In function '__set_pages_p':
>> arch/x86/mm/pat/set_memory.c:2254:22: error: invalid operands to binary | (have 'pgprot_t' {aka 'struct pgprot'} and 'long unsigned int')
    2254 |         cpa.mask_set |= __supported_pte_mask & _PAGE_NX;
         |                      ^~


vim +2254 arch/x86/mm/pat/set_memory.c

  2239	
  2240	static int __set_pages_p(struct page *page, int numpages)
  2241	{
  2242		unsigned long tempaddr = (unsigned long) page_address(page);
  2243		struct cpa_data cpa = { .vaddr = &tempaddr,
  2244					.pgd = NULL,
  2245					.numpages = numpages,
  2246					.mask_set = __pgprot(_PAGE_PRESENT | _PAGE_RW),
  2247					.mask_clr = __pgprot(0),
  2248					.flags = 0};
  2249	
  2250		/*
  2251		 * Avoid W^X mappings that occur if the old
  2252		 * mapping was !_PAGE_RW and !_PAGE_NX.
  2253		 */
> 2254		cpa.mask_set |= __supported_pte_mask & _PAGE_NX;
  2255	
  2256		/*
  2257		 * No alias checking needed for setting present flag. otherwise,
  2258		 * we may need to break large pages for 64-bit kernel text
  2259		 * mappings (this adds to complexity if we want to do this from
  2260		 * atomic context especially). Let's keep it simple!
  2261		 */
  2262		return __change_page_attr_set_clr(&cpa, 0);
  2263	}
  2264	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-09-07 22:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-07 22:17 [daveh-devel:testme 1/1] arch/x86/mm/pat/set_memory.c:2254:22: error: invalid operands to binary | (have 'pgprot_t' {aka 'struct pgprot'} and 'long unsigned int') 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