CC: [email protected]
CC: Mike Rapoport <[email protected]>
CC: [email protected]
TO: "Yu-cheng Yu" <[email protected]>
CC: Mike Rapoport <[email protected]>
CC: "Kirill A. Shutemov" <[email protected]>
CC: Rick Edgecombe <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git cet/kvm
head:   e2f9808bd7530f44cd5d95332036bb660b66b8db
commit: 280ad6edcdca10e519d23349b18fa3e46330654c [18/49] mm: Add guard pages 
around a shadow stack.
:::::: branch date: 26 hours ago
:::::: commit date: 9 days ago
config: x86_64-randconfig-m001 
(https://download.01.org/0day-ci/archive/20220218/[email protected]/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>

New smatch warnings:
arch/x86/mm/mmap.c:271 vm_start_gap() warn: bitwise AND condition is false here
arch/x86/mm/mmap.c:289 vm_end_gap() warn: bitwise AND condition is false here

Old smatch warnings:
arch/x86/mm/mmap.c:168 arch_vma_name() warn: bitwise AND condition is false here

vim +271 arch/x86/mm/mmap.c

280ad6edcdca10e Yu-cheng Yu 2022-01-30  263  
280ad6edcdca10e Yu-cheng Yu 2022-01-30  264  unsigned long vm_start_gap(struct 
vm_area_struct *vma)
280ad6edcdca10e Yu-cheng Yu 2022-01-30  265  {
280ad6edcdca10e Yu-cheng Yu 2022-01-30  266     unsigned long vm_start = 
vma->vm_start;
280ad6edcdca10e Yu-cheng Yu 2022-01-30  267     unsigned long gap = 0;
280ad6edcdca10e Yu-cheng Yu 2022-01-30  268  
280ad6edcdca10e Yu-cheng Yu 2022-01-30  269     if (vma->vm_flags & 
VM_GROWSDOWN)
280ad6edcdca10e Yu-cheng Yu 2022-01-30  270             gap = stack_guard_gap;
280ad6edcdca10e Yu-cheng Yu 2022-01-30 @271     else if (vma->vm_flags & 
VM_SHADOW_STACK)
280ad6edcdca10e Yu-cheng Yu 2022-01-30  272             gap = 
SHADOW_STACK_GUARD_GAP;
280ad6edcdca10e Yu-cheng Yu 2022-01-30  273  
280ad6edcdca10e Yu-cheng Yu 2022-01-30  274     if (gap != 0) {
280ad6edcdca10e Yu-cheng Yu 2022-01-30  275             vm_start -= gap;
280ad6edcdca10e Yu-cheng Yu 2022-01-30  276             if (vm_start > 
vma->vm_start)
280ad6edcdca10e Yu-cheng Yu 2022-01-30  277                     vm_start = 0;
280ad6edcdca10e Yu-cheng Yu 2022-01-30  278     }
280ad6edcdca10e Yu-cheng Yu 2022-01-30  279     return vm_start;
280ad6edcdca10e Yu-cheng Yu 2022-01-30  280  }
280ad6edcdca10e Yu-cheng Yu 2022-01-30  281  
280ad6edcdca10e Yu-cheng Yu 2022-01-30  282  unsigned long vm_end_gap(struct 
vm_area_struct *vma)
280ad6edcdca10e Yu-cheng Yu 2022-01-30  283  {
280ad6edcdca10e Yu-cheng Yu 2022-01-30  284     unsigned long vm_end = 
vma->vm_end;
280ad6edcdca10e Yu-cheng Yu 2022-01-30  285     unsigned long gap = 0;
280ad6edcdca10e Yu-cheng Yu 2022-01-30  286  
280ad6edcdca10e Yu-cheng Yu 2022-01-30  287     if (vma->vm_flags & VM_GROWSUP)
280ad6edcdca10e Yu-cheng Yu 2022-01-30  288             gap = stack_guard_gap;
280ad6edcdca10e Yu-cheng Yu 2022-01-30 @289     else if (vma->vm_flags & 
VM_SHADOW_STACK)

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to