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>] [day] [month] [year] [list]
Message-ID: <202107272004.N06Y3xI5-lkp@intel.com>
Date:   Tue, 27 Jul 2021 20:03:06 +0800
From:   kernel test robot <lkp@...el.com>
To:     Christoph Hellwig <hch@....de>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [hch-misc:dax-support-cleanups 3/10] drivers/dax/super.c:70:6:
 error: redefinition of 'generic_fsdax_supported'

tree:   git://git.infradead.org/users/hch/misc.git dax-support-cleanups
head:   37a8092dc083090f4fbd6a7699561dd959f1e2b8
commit: 77637615c600b1675f4afd2db30233e400aa6b31 [3/10] dax: rename __generic_fsdax_supported to generic_fsdax_supported
config: powerpc64-randconfig-s032-20210727 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 10.3.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.3-341-g8af24329-dirty
        git remote add hch-misc git://git.infradead.org/users/hch/misc.git
        git fetch --no-tags hch-misc dax-support-cleanups
        git checkout 77637615c600b1675f4afd2db30233e400aa6b31
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=powerpc SHELL=/bin/bash drivers/dax/

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

All errors (new ones prefixed by >>):

>> drivers/dax/super.c:70:6: error: redefinition of 'generic_fsdax_supported'
      70 | bool generic_fsdax_supported(struct dax_device *dax_dev,
         |      ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/dax/super.c:16:
   include/linux/dax.h:150:20: note: previous definition of 'generic_fsdax_supported' was here
     150 | static inline bool generic_fsdax_supported(struct dax_device *dax_dev,
         |                    ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/dax/super.c:168:6: error: redefinition of 'bdev_dax_supported'
     168 | bool bdev_dax_supported(struct block_device *bdev, int blocksize)
         |      ^~~~~~~~~~~~~~~~~~
   In file included from drivers/dax/super.c:16:
   include/linux/dax.h:144:20: note: previous definition of 'bdev_dax_supported' was here
     144 | static inline bool bdev_dax_supported(struct block_device *bdev,
         |                    ^~~~~~~~~~~~~~~~~~
   drivers/dax/super.c:449:6: warning: no previous prototype for 'run_dax' [-Wmissing-prototypes]
     449 | void run_dax(struct dax_device *dax_dev)
         |      ^~~~~~~


vim +/generic_fsdax_supported +70 drivers/dax/super.c

    69	
  > 70	bool generic_fsdax_supported(struct dax_device *dax_dev,
    71			struct block_device *bdev, int blocksize, sector_t start,
    72			sector_t sectors)
    73	{
    74		bool dax_enabled = false;
    75		pgoff_t pgoff, pgoff_end;
    76		char buf[BDEVNAME_SIZE];
    77		void *kaddr, *end_kaddr;
    78		pfn_t pfn, end_pfn;
    79		sector_t last_page;
    80		long len, len2;
    81		int err, id;
    82	
    83		if (blocksize != PAGE_SIZE) {
    84			pr_info("%s: error: unsupported blocksize for dax\n",
    85					bdevname(bdev, buf));
    86			return false;
    87		}
    88	
    89		if (!dax_dev) {
    90			pr_debug("%s: error: dax unsupported by block device\n",
    91					bdevname(bdev, buf));
    92			return false;
    93		}
    94	
    95		err = bdev_dax_pgoff(bdev, start, PAGE_SIZE, &pgoff);
    96		if (err) {
    97			pr_info("%s: error: unaligned partition for dax\n",
    98					bdevname(bdev, buf));
    99			return false;
   100		}
   101	
   102		last_page = PFN_DOWN((start + sectors - 1) * 512) * PAGE_SIZE / 512;
   103		err = bdev_dax_pgoff(bdev, last_page, PAGE_SIZE, &pgoff_end);
   104		if (err) {
   105			pr_info("%s: error: unaligned partition for dax\n",
   106					bdevname(bdev, buf));
   107			return false;
   108		}
   109	
   110		id = dax_read_lock();
   111		len = dax_direct_access(dax_dev, pgoff, 1, &kaddr, &pfn);
   112		len2 = dax_direct_access(dax_dev, pgoff_end, 1, &end_kaddr, &end_pfn);
   113	
   114		if (len < 1 || len2 < 1) {
   115			pr_info("%s: error: dax access failed (%ld)\n",
   116					bdevname(bdev, buf), len < 1 ? len : len2);
   117			dax_read_unlock(id);
   118			return false;
   119		}
   120	
   121		if (IS_ENABLED(CONFIG_FS_DAX_LIMITED) && pfn_t_special(pfn)) {
   122			/*
   123			 * An arch that has enabled the pmem api should also
   124			 * have its drivers support pfn_t_devmap()
   125			 *
   126			 * This is a developer warning and should not trigger in
   127			 * production. dax_flush() will crash since it depends
   128			 * on being able to do (page_address(pfn_to_page())).
   129			 */
   130			WARN_ON(IS_ENABLED(CONFIG_ARCH_HAS_PMEM_API));
   131			dax_enabled = true;
   132		} else if (pfn_t_devmap(pfn) && pfn_t_devmap(end_pfn)) {
   133			struct dev_pagemap *pgmap, *end_pgmap;
   134	
   135			pgmap = get_dev_pagemap(pfn_t_to_pfn(pfn), NULL);
   136			end_pgmap = get_dev_pagemap(pfn_t_to_pfn(end_pfn), NULL);
   137			if (pgmap && pgmap == end_pgmap && pgmap->type == MEMORY_DEVICE_FS_DAX
   138					&& pfn_t_to_page(pfn)->pgmap == pgmap
   139					&& pfn_t_to_page(end_pfn)->pgmap == pgmap
   140					&& pfn_t_to_pfn(pfn) == PHYS_PFN(__pa(kaddr))
   141					&& pfn_t_to_pfn(end_pfn) == PHYS_PFN(__pa(end_kaddr)))
   142				dax_enabled = true;
   143			put_dev_pagemap(pgmap);
   144			put_dev_pagemap(end_pgmap);
   145	
   146		}
   147		dax_read_unlock(id);
   148	
   149		if (!dax_enabled) {
   150			pr_info("%s: error: dax support not enabled\n",
   151					bdevname(bdev, buf));
   152			return false;
   153		}
   154		return true;
   155	}
   156	EXPORT_SYMBOL_GPL(generic_fsdax_supported);
   157	

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ