All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: arch/arm64/include/asm/mman.h:53 arch_vm_get_page_prot() warn: bitwise AND condition is false here
Date: Mon, 16 Aug 2021 03:12:16 +0800	[thread overview]
Message-ID: <202108160308.VlV871XY-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 3004 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Catalin Marinas <catalin.marinas@arm.com>
CC: Vincenzo Frascino <vincenzo.frascino@arm.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   0aa78d17099b04fd9d36fe338af48ad6fe2d7fca
commit: 9f3419315f3cdc41a7318e4d50ba18a592b30c8c arm64: mte: Add PROT_MTE support to mmap() and mprotect()
date:   12 months ago
:::::: branch date: 13 hours ago
:::::: commit date: 12 months ago
config: arm64-randconfig-m031-20210814 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
arch/arm64/include/asm/mman.h:53 arch_vm_get_page_prot() warn: bitwise AND condition is false here
arch/arm64/include/asm/mman.h:53 arch_vm_get_page_prot() warn: bitwise AND condition is false here

vim +53 arch/arm64/include/asm/mman.h

9f3419315f3cdc Catalin Marinas 2019-11-27  37  
8ef8f360cf30be Dave Martin     2020-03-16  38  static inline pgprot_t arch_vm_get_page_prot(unsigned long vm_flags)
8ef8f360cf30be Dave Martin     2020-03-16  39  {
9f3419315f3cdc Catalin Marinas 2019-11-27  40  	pteval_t prot = 0;
9f3419315f3cdc Catalin Marinas 2019-11-27  41  
9f3419315f3cdc Catalin Marinas 2019-11-27  42  	if (vm_flags & VM_ARM64_BTI)
9f3419315f3cdc Catalin Marinas 2019-11-27  43  		prot |= PTE_GP;
9f3419315f3cdc Catalin Marinas 2019-11-27  44  
9f3419315f3cdc Catalin Marinas 2019-11-27  45  	/*
9f3419315f3cdc Catalin Marinas 2019-11-27  46  	 * There are two conditions required for returning a Normal Tagged
9f3419315f3cdc Catalin Marinas 2019-11-27  47  	 * memory type: (1) the user requested it via PROT_MTE passed to
9f3419315f3cdc Catalin Marinas 2019-11-27  48  	 * mmap() or mprotect() and (2) the corresponding vma supports MTE. We
9f3419315f3cdc Catalin Marinas 2019-11-27  49  	 * register (1) as VM_MTE in the vma->vm_flags and (2) as
9f3419315f3cdc Catalin Marinas 2019-11-27  50  	 * VM_MTE_ALLOWED. Note that the latter can only be set during the
9f3419315f3cdc Catalin Marinas 2019-11-27  51  	 * mmap() call since mprotect() does not accept MAP_* flags.
9f3419315f3cdc Catalin Marinas 2019-11-27  52  	 */
9f3419315f3cdc Catalin Marinas 2019-11-27 @53  	if ((vm_flags & VM_MTE) && (vm_flags & VM_MTE_ALLOWED))
9f3419315f3cdc Catalin Marinas 2019-11-27  54  		prot |= PTE_ATTRINDX(MT_NORMAL_TAGGED);
9f3419315f3cdc Catalin Marinas 2019-11-27  55  
9f3419315f3cdc Catalin Marinas 2019-11-27  56  	return __pgprot(prot);
8ef8f360cf30be Dave Martin     2020-03-16  57  }
8ef8f360cf30be Dave Martin     2020-03-16  58  #define arch_vm_get_page_prot(vm_flags) arch_vm_get_page_prot(vm_flags)
8ef8f360cf30be Dave Martin     2020-03-16  59  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 40439 bytes --]

             reply	other threads:[~2021-08-15 19:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-15 19:12 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-07-02  2:26 arch/arm64/include/asm/mman.h:53 arch_vm_get_page_prot() warn: bitwise AND condition is false here kernel test robot

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=202108160308.VlV871XY-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.