All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 06/43] asm-generic: instrument usercopy in cacheflush.h
Date: Wed, 15 Dec 2021 22:13:57 +0800	[thread overview]
Message-ID: <202112152204.YealkDtu-lkp@intel.com> (raw)
In-Reply-To: <20211214162050.660953-7-glider@google.com>

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

Hi Alexander,

I love your patch! Perhaps something to improve:

[auto build test WARNING on tip/x86/mm]
[also build test WARNING on linus/master v5.16-rc5]
[cannot apply to tip/x86/core hnaz-mm/master next-20211214]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Alexander-Potapenko/Add-KernelMemorySanitizer-infrastructure/20211215-003033
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 35fa745286ac44ee26ed100c2bd2553368ad193b
config: h8300-randconfig-s032-20211214 (https://download.01.org/0day-ci/archive/20211215/202112152204.YealkDtu-lkp(a)intel.com/config)
compiler: h8300-linux-gcc (GCC) 11.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://github.com/0day-ci/linux/commit/a9bc41d306e2e13721a1569145cbfe7323a60aca
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Alexander-Potapenko/Add-KernelMemorySanitizer-infrastructure/20211215-003033
        git checkout a9bc41d306e2e13721a1569145cbfe7323a60aca
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=h8300 SHELL=/bin/bash

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


sparse warnings: (new ones prefixed by >>)
   mm/nommu.c:52:5: sparse: sparse: symbol 'heap_stack_gap' was not declared. Should it be static?
>> mm/nommu.c:1674:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void [noderef] __user *to @@     got void * @@
   mm/nommu.c:1674:25: sparse:     expected void [noderef] __user *to
   mm/nommu.c:1674:25: sparse:     got void *
>> mm/nommu.c:1677:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const [noderef] __user *from @@     got void * @@
   mm/nommu.c:1677:25: sparse:     expected void const [noderef] __user *from
   mm/nommu.c:1677:25: sparse:     got void *
>> mm/nommu.c:1677:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const [noderef] __user *from @@     got void * @@
   mm/nommu.c:1677:25: sparse:     expected void const [noderef] __user *from
   mm/nommu.c:1677:25: sparse:     got void *
   mm/nommu.c:519:9: sparse: sparse: context imbalance in '__put_nommu_region' - wrong count at exit
   mm/nommu.c:540:13: sparse: sparse: context imbalance in 'put_nommu_region' - unexpected unlock

vim +1674 mm/nommu.c

f1820361f83d55 Kirill A. Shutemov    2014-04-07  1655  
d3f5ffcacd1528 John Hubbard          2020-12-14  1656  int __access_remote_vm(struct mm_struct *mm, unsigned long addr, void *buf,
d3f5ffcacd1528 John Hubbard          2020-12-14  1657  		       int len, unsigned int gup_flags)
0ec76a110f432e David Howells         2006-09-27  1658  {
0ec76a110f432e David Howells         2006-09-27  1659  	struct vm_area_struct *vma;
442486ec109678 Lorenzo Stoakes       2016-10-13  1660  	int write = gup_flags & FOLL_WRITE;
0ec76a110f432e David Howells         2006-09-27  1661  
d8ed45c5dcd455 Michel Lespinasse     2020-06-08  1662  	if (mmap_read_lock_killable(mm))
1e426fe28261b0 Konstantin Khlebnikov 2019-07-11  1663  		return 0;
0ec76a110f432e David Howells         2006-09-27  1664  
0ec76a110f432e David Howells         2006-09-27  1665  	/* the access must start within one of the target process's mappings */
0159b141d8b1f9 David Howells         2006-09-27  1666  	vma = find_vma(mm, addr);
0159b141d8b1f9 David Howells         2006-09-27  1667  	if (vma) {
0ec76a110f432e David Howells         2006-09-27  1668  		/* don't overrun this mapping */
0ec76a110f432e David Howells         2006-09-27  1669  		if (addr + len >= vma->vm_end)
0ec76a110f432e David Howells         2006-09-27  1670  			len = vma->vm_end - addr;
0ec76a110f432e David Howells         2006-09-27  1671  
0ec76a110f432e David Howells         2006-09-27  1672  		/* only read or write mappings where it is permitted */
d00c7b993712e4 David Howells         2006-09-27  1673  		if (write && vma->vm_flags & VM_MAYWRITE)
7959722b951cff Jie Zhang             2010-01-06 @1674  			copy_to_user_page(vma, NULL, addr,
7959722b951cff Jie Zhang             2010-01-06  1675  					 (void *) addr, buf, len);
d00c7b993712e4 David Howells         2006-09-27  1676  		else if (!write && vma->vm_flags & VM_MAYREAD)
7959722b951cff Jie Zhang             2010-01-06 @1677  			copy_from_user_page(vma, NULL, addr,
7959722b951cff Jie Zhang             2010-01-06  1678  					    buf, (void *) addr, len);
0ec76a110f432e David Howells         2006-09-27  1679  		else
0ec76a110f432e David Howells         2006-09-27  1680  			len = 0;
0ec76a110f432e David Howells         2006-09-27  1681  	} else {
0ec76a110f432e David Howells         2006-09-27  1682  		len = 0;
0ec76a110f432e David Howells         2006-09-27  1683  	}
0ec76a110f432e David Howells         2006-09-27  1684  
d8ed45c5dcd455 Michel Lespinasse     2020-06-08  1685  	mmap_read_unlock(mm);
f55f199b7d76a0 Mike Frysinger        2011-03-29  1686  
f55f199b7d76a0 Mike Frysinger        2011-03-29  1687  	return len;
f55f199b7d76a0 Mike Frysinger        2011-03-29  1688  }
f55f199b7d76a0 Mike Frysinger        2011-03-29  1689  

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

  parent reply	other threads:[~2021-12-15 14:13 UTC|newest]

Thread overview: 89+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-14 16:20 [PATCH 00/43] Add KernelMemorySanitizer infrastructure Alexander Potapenko
2021-12-14 16:20 ` [PATCH 01/43] arch/x86: add missing include to sparsemem.h Alexander Potapenko
2021-12-14 16:20 ` [PATCH 02/43] stackdepot: reserve 5 extra bits in depot_stack_handle_t Alexander Potapenko
2021-12-14 16:20 ` [PATCH 03/43] kasan: common: adapt to the new prototype of __stack_depot_save() Alexander Potapenko
2021-12-14 16:20 ` [PATCH 04/43] instrumented.h: allow instrumenting both sides of copy_from_user() Alexander Potapenko
2021-12-14 16:20 ` [PATCH 05/43] asm: x86: instrument usercopy in get_user() and __put_user_size() Alexander Potapenko
2021-12-14 23:04   ` kernel test robot
2022-03-17 18:22     ` Alexander Potapenko
2021-12-15  1:12   ` kernel test robot
2021-12-15  2:54   ` kernel test robot
2021-12-15 14:34   ` kernel test robot
2021-12-14 16:20 ` [PATCH 06/43] asm-generic: instrument usercopy in cacheflush.h Alexander Potapenko
2021-12-15  8:22   ` kernel test robot
2021-12-15 14:13   ` kernel test robot [this message]
2021-12-14 16:20 ` [PATCH 07/43] compiler_attributes.h: add __disable_sanitizer_instrumentation Alexander Potapenko
2021-12-15 13:24   ` Mark Rutland
2021-12-15 13:33     ` Marco Elver
2021-12-14 16:20 ` [PATCH 08/43] kmsan: add ReST documentation Alexander Potapenko
2021-12-14 16:20 ` [PATCH 09/43] kmsan: introduce __no_sanitize_memory and __no_kmsan_checks Alexander Potapenko
2021-12-15 13:27   ` Mark Rutland
2022-03-18 14:01     ` Alexander Potapenko
2021-12-14 16:20 ` [PATCH 10/43] kmsan: pgtable: reduce vmalloc space Alexander Potapenko
2021-12-15 13:36   ` Mark Rutland
2022-03-18 14:14     ` Alexander Potapenko
2021-12-14 16:20 ` [PATCH 11/43] libnvdimm/pfn_dev: increase MAX_STRUCT_PAGE_SIZE Alexander Potapenko
2021-12-14 16:20 ` [PATCH 12/43] kcsan: clang: retire CONFIG_KCSAN_KCOV_BROKEN Alexander Potapenko
2021-12-15 13:33   ` Mark Rutland
2021-12-15 13:39     ` Marco Elver
2021-12-15 14:43       ` Mark Rutland
2022-03-18 14:34         ` Alexander Potapenko
2021-12-14 16:20 ` [PATCH 13/43] kmsan: add KMSAN runtime core Alexander Potapenko
2021-12-14 16:34   ` Greg Kroah-Hartman
2021-12-16 10:33     ` Alexander Potapenko
2021-12-17 16:22       ` Greg Kroah-Hartman
2022-03-21 14:12         ` Alexander Potapenko
2021-12-14 22:23   ` kernel test robot
2021-12-14 22:23     ` kernel test robot
2022-01-03 16:27   ` Dmitry Vyukov
2022-03-21 13:17     ` Alexander Potapenko
2021-12-14 16:20 ` [PATCH 14/43] MAINTAINERS: add entry for KMSAN Alexander Potapenko
2021-12-14 16:20 ` [PATCH 15/43] kmsan: mm: maintain KMSAN metadata for page operations Alexander Potapenko
2021-12-14 16:20 ` [PATCH 16/43] kmsan: mm: call KMSAN hooks from SLUB code Alexander Potapenko
2022-01-07 17:22   ` Vlastimil Babka
2022-03-25 13:15     ` Alexander Potapenko
2021-12-14 16:20 ` [PATCH 17/43] kmsan: handle task creation and exiting Alexander Potapenko
2021-12-14 16:20 ` [PATCH 18/43] kmsan: unpoison @tlb in arch_tlb_gather_mmu() Alexander Potapenko
2021-12-14 16:20 ` [PATCH 19/43] kmsan: init: call KMSAN initialization routines Alexander Potapenko
2021-12-14 16:20 ` [PATCH 20/43] instrumented.h: add KMSAN support Alexander Potapenko
2021-12-15 10:05   ` kernel test robot
2021-12-14 16:20 ` [PATCH 21/43] kmsan: mark noinstr as __no_sanitize_memory Alexander Potapenko
2021-12-15 13:49   ` Mark Rutland
2021-12-14 16:20 ` [PATCH 22/43] kmsan: initialize the output of READ_ONCE_NOCHECK() Alexander Potapenko
2021-12-14 16:20 ` [PATCH 23/43] kmsan: make READ_ONCE_TASK_STACK() return initialized values Alexander Potapenko
2021-12-14 16:20 ` [PATCH 24/43] kmsan: disable KMSAN instrumentation for certain kernel parts Alexander Potapenko
2021-12-15 13:53   ` Mark Rutland
2021-12-14 16:20 ` [PATCH 25/43] kmsan: skip shadow checks in files doing context switches Alexander Potapenko
2021-12-15 14:13   ` Mark Rutland
2021-12-15 16:28     ` Alexander Potapenko
2021-12-15 17:22       ` Mark Rutland
2021-12-14 16:20 ` [PATCH 26/43] kmsan: virtio: check/unpoison scatterlist in vring_map_one_sg() Alexander Potapenko
2022-01-06 12:46   ` Michael S. Tsirkin
2021-12-14 16:20 ` [PATCH 27/43] x86: kmsan: add iomem support Alexander Potapenko
2021-12-14 16:20 ` [PATCH 28/43] kmsan: dma: unpoison DMA mappings Alexander Potapenko
2021-12-14 16:20 ` [PATCH 29/43] kmsan: handle memory sent to/from USB Alexander Potapenko
2021-12-14 16:20 ` [PATCH 30/43] kmsan: add tests for KMSAN Alexander Potapenko
2021-12-14 16:20 ` [PATCH 31/43] kmsan: disable strscpy() optimization under KMSAN Alexander Potapenko
2021-12-14 16:20 ` [PATCH 32/43] crypto: kmsan: disable accelerated configs " Alexander Potapenko
2021-12-14 16:20 ` [PATCH 33/43] kmsan: disable physical page merging in biovec Alexander Potapenko
2021-12-15 14:17   ` Mark Rutland
2021-12-15 16:30     ` Alexander Potapenko
2021-12-14 16:20 ` [PATCH 34/43] kmsan: block: skip bio block merging logic for KMSAN Alexander Potapenko
2021-12-14 16:20 ` [PATCH 35/43] x86: kmsan: use __msan_ string functions where possible Alexander Potapenko
2021-12-14 16:20 ` [PATCH 36/43] x86: kmsan: sync metadata pages on page fault Alexander Potapenko
2021-12-14 22:43   ` kernel test robot
2021-12-14 22:43     ` kernel test robot
2021-12-14 16:20 ` [PATCH 37/43] x86: kasan: kmsan: support CONFIG_GENERIC_CSUM on x86, enable it for KASAN/KMSAN Alexander Potapenko
2021-12-14 16:20 ` [PATCH 38/43] x86: fs: kmsan: disable CONFIG_DCACHE_WORD_ACCESS Alexander Potapenko
2021-12-14 16:20 ` [PATCH 39/43] x86: kmsan: handle register passing from uninstrumented code Alexander Potapenko
2021-12-17 21:51   ` Thomas Gleixner
2021-12-20 14:35     ` Alexander Potapenko
2021-12-14 16:20 ` [PATCH 40/43] kmsan: kcov: unpoison area->list in kcov_remote_area_put() Alexander Potapenko
2021-12-14 16:20 ` [PATCH 41/43] security: kmsan: fix interoperability with auto-initialization Alexander Potapenko
2021-12-14 16:38   ` Greg Kroah-Hartman
2021-12-14 17:00     ` Alexander Potapenko
2021-12-14 17:33       ` Greg Kroah-Hartman
2021-12-14 16:20 ` [PATCH 42/43] objtool: kmsan: list KMSAN API functions as uaccess-safe Alexander Potapenko
2021-12-14 16:20 ` [PATCH 43/43] x86: kmsan: enable KMSAN builds for x86 Alexander Potapenko
2021-12-14 16:36 ` [PATCH 00/43] Add KernelMemorySanitizer infrastructure Greg Kroah-Hartman
2021-12-16 10:12   ` Alexander Potapenko

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=202112152204.YealkDtu-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@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.