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 v6 31/39] kasan, vmalloc: only tag normal vmalloc allocations
Date: Tue, 25 Jan 2022 15:56:44 +0800	[thread overview]
Message-ID: <202201251520.0CgVaz6r-lkp@intel.com> (raw)
In-Reply-To: <fbfd9939a4dc375923c9a5c6b9e7ab05c26b8c6b.1643047180.git.andreyknvl@google.com>

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

Hi,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.17-rc1 next-20220124]
[cannot apply to arm64/for-next/core rostedt-trace/for-next]
[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/andrey-konovalov-linux-dev/kasan-vmalloc-arm64-add-vmalloc-tagging-support-for-SW-HW_TAGS/20220125-021005
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git dd81e1c7d5fb126e5fbc5c9e334d7b3ec29a16a0
config: microblaze-randconfig-s032-20220124 (https://download.01.org/0day-ci/archive/20220125/202201251520.0CgVaz6r-lkp(a)intel.com/config)
compiler: microblaze-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/e53c62ef4d4998f3bdd75ec887bc39a1ef2dd740
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review andrey-konovalov-linux-dev/kasan-vmalloc-arm64-add-vmalloc-tagging-support-for-SW-HW_TAGS/20220125-021005
        git checkout e53c62ef4d4998f3bdd75ec887bc39a1ef2dd740
        # 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=microblaze 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/vmalloc.c:2224:49: sparse: sparse: incorrect type in argument 3 (different base types) @@     expected restricted kasan_vmalloc_flags_t [usertype] flags @@     got unsigned int @@
   mm/vmalloc.c:2224:49: sparse:     expected restricted kasan_vmalloc_flags_t [usertype] flags
   mm/vmalloc.c:2224:49: sparse:     got unsigned int
   mm/vmalloc.c:2463:53: sparse: sparse: incorrect type in argument 3 (different base types) @@     expected restricted kasan_vmalloc_flags_t [usertype] flags @@     got unsigned int @@
   mm/vmalloc.c:2463:53: sparse:     expected restricted kasan_vmalloc_flags_t [usertype] flags
   mm/vmalloc.c:2463:53: sparse:     got unsigned int
   mm/vmalloc.c:3148:29: sparse: sparse: invalid assignment: |=
   mm/vmalloc.c:3148:29: sparse:    left side has type restricted kasan_vmalloc_flags_t
   mm/vmalloc.c:3148:29: sparse:    right side has type unsigned int
   mm/vmalloc.c:3165:21: sparse: sparse: invalid assignment: |=
   mm/vmalloc.c:3165:21: sparse:    left side has type restricted kasan_vmalloc_flags_t
   mm/vmalloc.c:3165:21: sparse:    right side has type unsigned int
   mm/vmalloc.c:3167:29: sparse: sparse: invalid assignment: |=
   mm/vmalloc.c:3167:29: sparse:    left side has type restricted kasan_vmalloc_flags_t
   mm/vmalloc.c:3167:29: sparse:    right side has type unsigned int

vim +2224 mm/vmalloc.c

  2176	
  2177	/**
  2178	 * vm_map_ram - map pages linearly into kernel virtual address (vmalloc space)
  2179	 * @pages: an array of pointers to the pages to be mapped
  2180	 * @count: number of pages
  2181	 * @node: prefer to allocate data structures on this node
  2182	 *
  2183	 * If you use this function for less than VMAP_MAX_ALLOC pages, it could be
  2184	 * faster than vmap so it's good.  But if you mix long-life and short-life
  2185	 * objects with vm_map_ram(), it could consume lots of address space through
  2186	 * fragmentation (especially on a 32bit machine).  You could see failures in
  2187	 * the end.  Please use this function for short-lived objects.
  2188	 *
  2189	 * Returns: a pointer to the address that has been mapped, or %NULL on failure
  2190	 */
  2191	void *vm_map_ram(struct page **pages, unsigned int count, int node)
  2192	{
  2193		unsigned long size = (unsigned long)count << PAGE_SHIFT;
  2194		unsigned long addr;
  2195		void *mem;
  2196	
  2197		if (likely(count <= VMAP_MAX_ALLOC)) {
  2198			mem = vb_alloc(size, GFP_KERNEL);
  2199			if (IS_ERR(mem))
  2200				return NULL;
  2201			addr = (unsigned long)mem;
  2202		} else {
  2203			struct vmap_area *va;
  2204			va = alloc_vmap_area(size, PAGE_SIZE,
  2205					VMALLOC_START, VMALLOC_END, node, GFP_KERNEL);
  2206			if (IS_ERR(va))
  2207				return NULL;
  2208	
  2209			addr = va->va_start;
  2210			mem = (void *)addr;
  2211		}
  2212	
  2213		if (vmap_pages_range(addr, addr + size, PAGE_KERNEL,
  2214					pages, PAGE_SHIFT) < 0) {
  2215			vm_unmap_ram(mem, count);
  2216			return NULL;
  2217		}
  2218	
  2219		/*
  2220		 * Mark the pages as accessible, now that they are mapped.
  2221		 * With hardware tag-based KASAN, marking is skipped for
  2222		 * non-VM_ALLOC mappings, see __kasan_unpoison_vmalloc().
  2223		 */
> 2224		mem = kasan_unpoison_vmalloc(mem, size, KASAN_VMALLOC_PROT_NORMAL);
  2225	
  2226		return mem;
  2227	}
  2228	EXPORT_SYMBOL(vm_map_ram);
  2229	

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

  parent reply	other threads:[~2022-01-25  7:56 UTC|newest]

Thread overview: 113+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-24 18:02 [PATCH v6 00/39] kasan, vmalloc, arm64: add vmalloc tagging support for SW/HW_TAGS andrey.konovalov
2022-01-24 18:02 ` andrey.konovalov
2022-01-24 18:02 ` [PATCH v6 01/39] kasan, page_alloc: deduplicate should_skip_kasan_poison andrey.konovalov
2022-01-24 18:02   ` andrey.konovalov
2022-01-24 18:02 ` [PATCH v6 02/39] kasan, page_alloc: move tag_clear_highpage out of kernel_init_free_pages andrey.konovalov
2022-01-24 18:02   ` andrey.konovalov
2022-01-24 18:02 ` [PATCH v6 03/39] kasan, page_alloc: merge kasan_free_pages into free_pages_prepare andrey.konovalov
2022-01-24 18:02   ` andrey.konovalov
2022-01-24 18:02 ` [PATCH v6 04/39] kasan, page_alloc: simplify kasan_poison_pages call site andrey.konovalov
2022-01-24 18:02   ` andrey.konovalov
2022-01-24 18:02 ` [PATCH v6 05/39] kasan, page_alloc: init memory of skipped pages on free andrey.konovalov
2022-01-24 18:02   ` andrey.konovalov
2022-01-24 18:02 ` [PATCH v6 06/39] kasan: drop skip_kasan_poison variable in free_pages_prepare andrey.konovalov
2022-01-24 18:02   ` andrey.konovalov
2022-01-24 18:02 ` [PATCH v6 07/39] mm: clarify __GFP_ZEROTAGS comment andrey.konovalov
2022-01-24 18:02   ` andrey.konovalov
2022-01-24 18:02 ` [PATCH v6 08/39] kasan: only apply __GFP_ZEROTAGS when memory is zeroed andrey.konovalov
2022-01-24 18:02   ` andrey.konovalov
2022-01-24 18:02 ` [PATCH v6 09/39] kasan, page_alloc: refactor init checks in post_alloc_hook andrey.konovalov
2022-01-24 18:02   ` andrey.konovalov
2022-01-24 18:02 ` [PATCH v6 10/39] kasan, page_alloc: merge kasan_alloc_pages into post_alloc_hook andrey.konovalov
2022-01-24 18:02   ` andrey.konovalov
2022-01-24 18:02 ` [PATCH v6 11/39] kasan, page_alloc: combine tag_clear_highpage calls in post_alloc_hook andrey.konovalov
2022-01-24 18:02   ` andrey.konovalov
2022-01-24 18:02 ` [PATCH v6 12/39] kasan, page_alloc: move SetPageSkipKASanPoison " andrey.konovalov
2022-01-24 18:02   ` andrey.konovalov
2022-01-24 18:02 ` [PATCH v6 13/39] kasan, page_alloc: move kernel_init_free_pages " andrey.konovalov
2022-01-24 18:02   ` andrey.konovalov
2022-01-24 18:02 ` [PATCH v6 14/39] kasan, page_alloc: rework kasan_unpoison_pages call site andrey.konovalov
2022-01-24 18:02   ` andrey.konovalov
2022-01-24 18:02 ` [PATCH v6 15/39] kasan: clean up metadata byte definitions andrey.konovalov
2022-01-24 18:02   ` andrey.konovalov
2022-01-24 18:02 ` [PATCH v6 16/39] kasan: define KASAN_VMALLOC_INVALID for SW_TAGS andrey.konovalov
2022-01-24 18:02   ` andrey.konovalov
2022-01-24 18:04 ` [PATCH v6 17/39] kasan, x86, arm64, s390: rename functions for modules shadow andrey.konovalov
2022-01-24 18:04   ` andrey.konovalov
2022-01-24 18:04 ` [PATCH v6 18/39] kasan, vmalloc: drop outdated VM_KASAN comment andrey.konovalov
2022-01-24 18:04   ` andrey.konovalov
2022-01-24 18:04 ` [PATCH v6 19/39] kasan: reorder vmalloc hooks andrey.konovalov
2022-01-24 18:04   ` andrey.konovalov
2022-01-24 18:04 ` [PATCH v6 20/39] kasan: add wrappers for " andrey.konovalov
2022-01-24 18:04   ` andrey.konovalov
2022-01-24 18:04 ` [PATCH v6 21/39] kasan, vmalloc: reset tags in vmalloc functions andrey.konovalov
2022-01-24 18:04   ` andrey.konovalov
2022-01-24 18:04 ` [PATCH v6 22/39] kasan, fork: reset pointer tags of vmapped stacks andrey.konovalov
2022-01-24 18:04   ` andrey.konovalov
2022-01-24 18:04 ` [PATCH v6 23/39] kasan, arm64: " andrey.konovalov
2022-01-24 18:04   ` andrey.konovalov
2022-01-24 18:04 ` [PATCH v6 24/39] kasan, vmalloc: add vmalloc tagging for SW_TAGS andrey.konovalov
2022-01-24 18:04   ` andrey.konovalov
2022-01-24 18:04 ` [PATCH v6 25/39] kasan, vmalloc, arm64: mark vmalloc mappings as pgprot_tagged andrey.konovalov
2022-01-24 18:04   ` andrey.konovalov
2022-01-24 18:05 ` [PATCH v6 26/39] kasan, vmalloc: unpoison VM_ALLOC pages after mapping andrey.konovalov
2022-01-24 18:05   ` andrey.konovalov
2022-01-24 18:05 ` [PATCH v6 27/39] kasan, mm: only define ___GFP_SKIP_KASAN_POISON with HW_TAGS andrey.konovalov
2022-01-24 18:05   ` andrey.konovalov
2022-03-23 11:48   ` Vlastimil Babka
2022-03-23 11:48     ` Vlastimil Babka
2022-03-23 13:02     ` Sebastian Andrzej Siewior
2022-03-23 13:02       ` Sebastian Andrzej Siewior
2022-03-23 13:19       ` Vlastimil Babka
2022-03-23 13:19         ` Vlastimil Babka
2022-03-23 13:36       ` Andrey Konovalov
2022-03-23 13:36         ` Andrey Konovalov
2022-03-23 13:57         ` Vlastimil Babka
2022-03-23 13:57           ` Vlastimil Babka
2022-03-23 15:11           ` Matthew Wilcox
2022-03-23 15:11             ` Matthew Wilcox
2022-03-25 21:13         ` Andrew Morton
2022-03-25 21:13           ` Andrew Morton
2022-01-24 18:05 ` [PATCH v6 28/39] kasan, page_alloc: allow skipping unpoisoning for HW_TAGS andrey.konovalov
2022-01-24 18:05   ` andrey.konovalov
2022-01-24 18:05 ` [PATCH v6 29/39] kasan, page_alloc: allow skipping memory init " andrey.konovalov
2022-01-24 18:05   ` andrey.konovalov
2022-01-24 18:05 ` [PATCH v6 30/39] kasan, vmalloc: add vmalloc tagging " andrey.konovalov
2022-01-24 18:05   ` andrey.konovalov
2022-01-25  3:17   ` kernel test robot
2022-01-24 18:05 ` [PATCH v6 31/39] kasan, vmalloc: only tag normal vmalloc allocations andrey.konovalov
2022-01-24 18:05   ` andrey.konovalov
2022-01-25  4:19   ` kernel test robot
2022-01-25  7:56   ` kernel test robot [this message]
2022-03-08 15:17   ` Vasily Gorbik
2022-03-08 15:17     ` Vasily Gorbik
2022-03-08 15:30     ` Andrey Konovalov
2022-03-08 15:30       ` Andrey Konovalov
2022-03-08 15:48       ` Vasily Gorbik
2022-03-08 15:48         ` Vasily Gorbik
2022-01-24 18:05 ` [PATCH v6 32/39] kasan, arm64: don't tag executable " andrey.konovalov
2022-01-24 18:05   ` andrey.konovalov
2022-01-24 18:05 ` [PATCH v6 33/39] kasan: mark kasan_arg_stacktrace as __initdata andrey.konovalov
2022-01-24 18:05   ` andrey.konovalov
2022-01-24 18:05 ` [PATCH v6 34/39] kasan: clean up feature flags for HW_TAGS mode andrey.konovalov
2022-01-24 18:05   ` andrey.konovalov
2022-01-24 18:05 ` [PATCH v6 35/39] kasan: add kasan.vmalloc command line flag andrey.konovalov
2022-01-24 18:05   ` andrey.konovalov
2022-01-24 18:05 ` [PATCH v6 36/39] kasan: allow enabling KASAN_VMALLOC and SW/HW_TAGS andrey.konovalov
2022-01-24 18:05   ` andrey.konovalov
2022-01-24 18:05 ` [PATCH v6 37/39] arm64: select KASAN_VMALLOC for SW/HW_TAGS modes andrey.konovalov
2022-01-24 18:05   ` andrey.konovalov
2022-01-24 18:05 ` [PATCH v6 38/39] kasan: documentation updates andrey.konovalov
2022-01-24 18:05   ` andrey.konovalov
2022-01-24 18:05 ` [PATCH v6 39/39] kasan: improve vmalloc tests andrey.konovalov
2022-01-24 18:05   ` andrey.konovalov
2022-01-24 18:09 ` [PATCH v6 00/39] kasan, vmalloc, arm64: add vmalloc tagging support for SW/HW_TAGS Marco Elver
2022-01-24 18:09   ` Marco Elver
2022-01-24 18:32   ` Andrey Konovalov
2022-01-24 18:32     ` Andrey Konovalov
2022-04-28 14:13 ` Qian Cai
2022-04-28 14:13   ` Qian Cai
2022-04-28 15:28   ` Andrey Konovalov
2022-04-28 15:28     ` Andrey Konovalov
2022-04-28 16:12     ` Qian Cai
2022-04-28 16:12       ` Qian Cai

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=202201251520.0CgVaz6r-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.