public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Dave Hansen <dave.hansen@linux.intel.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.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 long unsigned int')
Date: Thu, 8 Sep 2022 07:22:24 +0800	[thread overview]
Message-ID: <202209080702.1fD2ZwWW-lkp@intel.com> (raw)

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: i386-randconfig-a001 (https://download.01.org/0day-ci/archive/20220908/202209080702.1fD2ZwWW-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=i386 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 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

                 reply	other threads:[~2022-09-07 23: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=202209080702.1fD2ZwWW-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    /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