CC: [email protected] In-Reply-To: <[email protected]> References: <[email protected]> TO: David Hildenbrand <[email protected]> TO: [email protected] CC: David Hildenbrand <[email protected]> CC: Arnd Bergmann <[email protected]> CC: "Greg Kroah-Hartman" <[email protected]> CC: "Michael S. Tsirkin" <[email protected]> CC: Jason Wang <[email protected]> CC: "Rafael J. Wysocki" <[email protected]> CC: Andrew Morton <[email protected]> CC: Linux Memory Management List <[email protected]> CC: Dan Williams <[email protected]>
Hi David, I love your patch! Perhaps something to improve: [auto build test WARNING on linux/master] [also build test WARNING on char-misc/char-misc-testing soc/for-next linus/master v5.14-rc5 next-20210811] [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/David-Hildenbrand/virtio-mem-disallow-mapping-virtio-mem-memory-via-dev-mem/20210812-043834 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 349a2d52ffe59b7a0c5876fa7ee9f3eaf188b830 :::::: branch date: 5 hours ago :::::: commit date: 5 hours ago config: i386-randconfig-m021-20210810 (attached as .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]> smatch warnings: drivers/char/mem.c:70 page_is_allowed() warn: should 'pfn << 12' be a 64 bit type? drivers/char/mem.c:87 range_is_allowed() warn: should 'pfn << 12' be a 64 bit type? vim +70 drivers/char/mem.c ^1da177e4c3f41 Linus Torvalds 2005-04-16 63 a4866aa812518e Kees Cook 2017-04-05 64 static inline int page_is_allowed(unsigned long pfn) a4866aa812518e Kees Cook 2017-04-05 65 { 19e42009961255 David Hildenbrand 2021-08-11 66 #ifdef CONFIG_STRICT_DEVMEM 19e42009961255 David Hildenbrand 2021-08-11 67 if (!devmem_is_allowed(pfn)) 19e42009961255 David Hildenbrand 2021-08-11 68 return 0; 19e42009961255 David Hildenbrand 2021-08-11 69 #endif /* CONFIG_STRICT_DEVMEM */ 19e42009961255 David Hildenbrand 2021-08-11 @70 return !iomem_range_contains_excluded(PFN_PHYS(pfn), PAGE_SIZE); a4866aa812518e Kees Cook 2017-04-05 71 } 19e42009961255 David Hildenbrand 2021-08-11 72 e2beb3eae62721 Venki Pallipadi 2008-03-06 73 static inline int range_is_allowed(unsigned long pfn, unsigned long size) ae531c26c5c2a2 Arjan van de Ven 2008-04-24 74 { 19e42009961255 David Hildenbrand 2021-08-11 75 #ifdef CONFIG_STRICT_DEVMEM e2beb3eae62721 Venki Pallipadi 2008-03-06 76 u64 from = ((u64)pfn) << PAGE_SHIFT; e2beb3eae62721 Venki Pallipadi 2008-03-06 77 u64 to = from + size; e2beb3eae62721 Venki Pallipadi 2008-03-06 78 u64 cursor = from; e2beb3eae62721 Venki Pallipadi 2008-03-06 79 e2beb3eae62721 Venki Pallipadi 2008-03-06 80 while (cursor < to) { 39380b80d72723 Jiri Kosina 2016-07-08 81 if (!devmem_is_allowed(pfn)) ae531c26c5c2a2 Arjan van de Ven 2008-04-24 82 return 0; e2beb3eae62721 Venki Pallipadi 2008-03-06 83 cursor += PAGE_SIZE; e2beb3eae62721 Venki Pallipadi 2008-03-06 84 pfn++; ae531c26c5c2a2 Arjan van de Ven 2008-04-24 85 } 19e42009961255 David Hildenbrand 2021-08-11 86 #endif /* CONFIG_STRICT_DEVMEM */ 19e42009961255 David Hildenbrand 2021-08-11 @87 return !iomem_range_contains_excluded(PFN_PHYS(pfn), size); ae531c26c5c2a2 Arjan van de Ven 2008-04-24 88 } ae531c26c5c2a2 Arjan van de Ven 2008-04-24 89 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected]
.config.gz
Description: application/gzip
_______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
