lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201910301705.uLxW2OtK%lkp@intel.com>
Date:   Wed, 30 Oct 2019 17:48:18 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Laurentiu Tudor <laurentiu.tudor@....com>
Cc:     kbuild-all@...ts.01.org, "hch@....de" <hch@....de>,
        "joro@...tes.org" <joro@...tes.org>,
        Ioana Ciocoi Radulescu <ruxandra.radulescu@....com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Ioana Ciornei <ioana.ciornei@....com>,
        Leo Li <leoyang.li@....com>,
        "robin.murphy@....com" <robin.murphy@....com>,
        Diana Madalina Craciun <diana.craciun@....com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        Madalin Bucur <madalin.bucur@....com>,
        Laurentiu Tudor <laurentiu.tudor@....com>
Subject: Re: [PATCH v2 1/3] dma-mapping: introduce new dma unmap and sync api
 variants

Hi Laurentiu,

I love your patch! Yet something to improve:

[auto build test ERROR on net-next/master]
[also build test ERROR on v5.4-rc5 next-20191029]
[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/Laurentiu-Tudor/dma-mapping-introduce-new-dma-unmap-and-sync-variants/20191027-173418
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 503a64635d5ef7351657c78ad77f8b5ff658d5fc
config: um-x86_64_defconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=um SUBARCH=x86_64

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

   In file included from include/linux/skbuff.h:31:0,
                    from include/net/net_namespace.h:38,
                    from include/linux/inet.h:42,
                    from include/linux/sunrpc/msg_prot.h:204,
                    from include/linux/sunrpc/auth.h:16,
                    from include/linux/nfs_fs.h:31,
                    from init/do_mounts.c:23:
   include/linux/dma-mapping.h: In function 'dma_sync_single_for_cpu_desc':
   include/linux/dma-mapping.h:539:1: warning: no return statement in function returning non-void [-Wreturn-type]
    }
    ^
   include/linux/dma-mapping.h: In function 'dma_unmap_single_attrs_desc':
>> include/linux/dma-mapping.h:638:34: error: implicit declaration of function 'get_dma_ops'; did you mean 'get_mm_rss'? [-Werror=implicit-function-declaration]
     const struct dma_map_ops *ops = get_dma_ops(dev);
                                     ^~~~~~~~~~~
                                     get_mm_rss
   include/linux/dma-mapping.h:638:34: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
   cc1: some warnings being treated as errors

vim +638 include/linux/dma-mapping.h

   534	
   535	static inline void *
   536	dma_sync_single_for_cpu_desc(struct device *dev, dma_addr_t addr, size_t size,
   537				     enum dma_data_direction dir)
   538	{
 > 539	}
   540	static inline void dma_sync_single_for_device(struct device *dev,
   541			dma_addr_t addr, size_t size, enum dma_data_direction dir)
   542	{
   543	}
   544	static inline void dma_sync_sg_for_cpu(struct device *dev,
   545			struct scatterlist *sg, int nelems, enum dma_data_direction dir)
   546	{
   547	}
   548	static inline void dma_sync_sg_for_device(struct device *dev,
   549			struct scatterlist *sg, int nelems, enum dma_data_direction dir)
   550	{
   551	}
   552	static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
   553	{
   554		return -ENOMEM;
   555	}
   556	static inline void *dma_alloc_attrs(struct device *dev, size_t size,
   557			dma_addr_t *dma_handle, gfp_t flag, unsigned long attrs)
   558	{
   559		return NULL;
   560	}
   561	static void dma_free_attrs(struct device *dev, size_t size, void *cpu_addr,
   562			dma_addr_t dma_handle, unsigned long attrs)
   563	{
   564	}
   565	static inline void *dmam_alloc_attrs(struct device *dev, size_t size,
   566			dma_addr_t *dma_handle, gfp_t gfp, unsigned long attrs)
   567	{
   568		return NULL;
   569	}
   570	static inline void dmam_free_coherent(struct device *dev, size_t size,
   571			void *vaddr, dma_addr_t dma_handle)
   572	{
   573	}
   574	static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
   575			enum dma_data_direction dir)
   576	{
   577	}
   578	static inline int dma_get_sgtable_attrs(struct device *dev,
   579			struct sg_table *sgt, void *cpu_addr, dma_addr_t dma_addr,
   580			size_t size, unsigned long attrs)
   581	{
   582		return -ENXIO;
   583	}
   584	static inline int dma_mmap_attrs(struct device *dev, struct vm_area_struct *vma,
   585			void *cpu_addr, dma_addr_t dma_addr, size_t size,
   586			unsigned long attrs)
   587	{
   588		return -ENXIO;
   589	}
   590	static inline bool dma_can_mmap(struct device *dev)
   591	{
   592		return false;
   593	}
   594	static inline int dma_supported(struct device *dev, u64 mask)
   595	{
   596		return 0;
   597	}
   598	static inline int dma_set_mask(struct device *dev, u64 mask)
   599	{
   600		return -EIO;
   601	}
   602	static inline int dma_set_coherent_mask(struct device *dev, u64 mask)
   603	{
   604		return -EIO;
   605	}
   606	static inline u64 dma_get_required_mask(struct device *dev)
   607	{
   608		return 0;
   609	}
   610	static inline size_t dma_max_mapping_size(struct device *dev)
   611	{
   612		return 0;
   613	}
   614	static inline unsigned long dma_get_merge_boundary(struct device *dev)
   615	{
   616		return 0;
   617	}
   618	#endif /* CONFIG_HAS_DMA */
   619	
   620	static inline dma_addr_t dma_map_single_attrs(struct device *dev, void *ptr,
   621			size_t size, enum dma_data_direction dir, unsigned long attrs)
   622	{
   623		debug_dma_map_single(dev, ptr, size);
   624		return dma_map_page_attrs(dev, virt_to_page(ptr), offset_in_page(ptr),
   625				size, dir, attrs);
   626	}
   627	
   628	static inline void dma_unmap_single_attrs(struct device *dev, dma_addr_t addr,
   629			size_t size, enum dma_data_direction dir, unsigned long attrs)
   630	{
   631		return dma_unmap_page_attrs(dev, addr, size, dir, attrs);
   632	}
   633	
   634	static inline void *
   635	dma_unmap_single_attrs_desc(struct device *dev, dma_addr_t addr, size_t size,
   636				    enum dma_data_direction dir, unsigned long attrs)
   637	{
 > 638		const struct dma_map_ops *ops = get_dma_ops(dev);
   639		void *ptr = NULL;
   640	
   641		if (ops && ops->get_virt_addr)
   642			ptr = ops->get_virt_addr(dev, addr);
   643	
   644		dma_unmap_single_attrs(dev, addr, size, dir, attrs);
   645	
   646		return ptr;
   647	}
   648	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (8323 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ