lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202209080608.99NMiui4-lkp@intel.com>
Date:   Thu, 8 Sep 2022 06:17:30 +0800
From:   kernel test robot <lkp@...el.com>
To:     Dave Hansen <dave.hansen@...ux.intel.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [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')

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@...el.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ