Re: [PATCH] dma-mapping: Lift address space checks out of debug code
From: kbuild test robot
Date: Wed Oct 02 2019 - 20:05:31 EST
Hi Kees,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[cannot apply to v5.4-rc1 next-20191002]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Kees-Cook/dma-mapping-Lift-address-space-checks-out-of-debug-code/20191003-060622
config: i386-randconfig-c004-201939 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-13) 7.4.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>
All errors (new ones prefixed by >>):
In file included from arch/x86/include/asm/bug.h:83:0,
from include/linux/bug.h:5,
from include/linux/debug_locks.h:7,
from include/linux/lockdep.h:28,
from include/linux/spinlock_types.h:18,
from include/linux/mutex.h:16,
from include/linux/kernfs.h:12,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/of.h:17,
from include/linux/irqdomain.h:35,
from include/linux/acpi.h:13,
from drivers/gpu/drm/i915/i915_drv.c:30:
include/linux/dma-mapping.h: In function 'dma_map_single_attrs':
>> include/linux/dma-mapping.h:588:3: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t {aka unsigned int}' [-Werror=format=]
"%s %s: driver maps %lu bytes from %s area\n",
^
include/asm-generic/bug.h:92:17: note: in definition of macro '__WARN_printf'
__warn_printk(arg); \
^~~
include/asm-generic/bug.h:155:3: note: in expansion of macro 'WARN'
WARN(1, format); \
^~~~
include/linux/dma-mapping.h:587:2: note: in expansion of macro 'WARN_ONCE'
WARN_ONCE(is_vmalloc_addr(ptr) || !virt_addr_valid(ptr),
^~~~~~~~~
cc1: all warnings being treated as errors
vim +588 include/linux/dma-mapping.h
582
583 static inline dma_addr_t dma_map_single_attrs(struct device *dev, void *ptr,
584 size_t size, enum dma_data_direction dir, unsigned long attrs)
585 {
586 /* DMA must never operate on stack or other remappable places. */
587 WARN_ONCE(is_vmalloc_addr(ptr) || !virt_addr_valid(ptr),
> 588 "%s %s: driver maps %lu bytes from %s area\n",
589 dev ? dev_driver_string(dev) : "unknown driver",
590 dev ? dev_name(dev) : "unknown device", size,
591 is_vmalloc_addr(ptr) ? "vmalloc" : "invalid");
592
593 return dma_map_page_attrs(dev, virt_to_page(ptr), offset_in_page(ptr),
594 size, dir, attrs);
595 }
596
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip