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: <202210120553.KOXHa2Dz-lkp@intel.com>
Date:   Wed, 12 Oct 2022 05:42:12 +0800
From:   kernel test robot <lkp@...el.com>
To:     Dan Williams <dan.j.williams@...el.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [djbw-nvdimm:libnvdimm-pending 15/24] drivers/dax/mapping.c:60:24:
 error: 'PMD_ORDER' undeclared; did you mean 'MAX_ORDER'?

Hi Dan,

FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/djbw/nvdimm.git libnvdimm-pending
head:   4a35ce1717f356ac1862763eef5c0220c043637a
commit: 0ad87c01088f4723666daf5e22873efec7b747c3 [15/24] devdax: Move address_space helpers to the DAX core
config: riscv-randconfig-r011-20221010
compiler: riscv64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/djbw/nvdimm.git/commit/?id=0ad87c01088f4723666daf5e22873efec7b747c3
        git remote add djbw-nvdimm https://git.kernel.org/pub/scm/linux/kernel/git/djbw/nvdimm.git
        git fetch --no-tags djbw-nvdimm libnvdimm-pending
        git checkout 0ad87c01088f4723666daf5e22873efec7b747c3
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/

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

All errors (new ones prefixed by >>):

   drivers/dax/mapping.c: In function 'dax_entry_order':
>> drivers/dax/mapping.c:60:24: error: 'PMD_ORDER' undeclared (first use in this function); did you mean 'MAX_ORDER'?
      60 |                 return PMD_ORDER;
         |                        ^~~~~~~~~
         |                        MAX_ORDER
   drivers/dax/mapping.c:60:24: note: each undeclared identifier is reported only once for each function it appears in
   drivers/dax/mapping.c: In function 'dax_entry_waitqueue':
>> drivers/dax/mapping.c:128:27: error: 'PG_PMD_COLOUR' undeclared (first use in this function)
     128 |                 index &= ~PG_PMD_COLOUR;
         |                           ^~~~~~~~~~~~~
   drivers/dax/mapping.c: In function 'dax_grab_mapping_entry':
   drivers/dax/mapping.c:604:62: error: 'PG_PMD_COLOUR' undeclared (first use in this function)
     604 |                                             xas->xa_index & ~PG_PMD_COLOUR,
         |                                                              ^~~~~~~~~~~~~
>> drivers/dax/mapping.c:605:45: error: 'PG_PMD_NR' undeclared (first use in this function); did you mean 'HPAGE_PMD_NR'?
     605 |                                             PG_PMD_NR, false);
         |                                             ^~~~~~~~~
         |                                             HPAGE_PMD_NR
   drivers/dax/mapping.c: In function 'dax_insert_entry':
   drivers/dax/mapping.c:868:63: error: 'PG_PMD_COLOUR' undeclared (first use in this function)
     868 |                         unmap_mapping_pages(mapping, index & ~PG_PMD_COLOUR,
         |                                                               ^~~~~~~~~~~~~
   drivers/dax/mapping.c:869:41: error: 'PG_PMD_NR' undeclared (first use in this function); did you mean 'HPAGE_PMD_NR'?
     869 |                                         PG_PMD_NR, false);
         |                                         ^~~~~~~~~
         |                                         HPAGE_PMD_NR
   drivers/dax/mapping.c: In function 'dax_writeback_one':
>> drivers/dax/mapping.c:980:17: error: implicit declaration of function 'pfn_mkclean_range' [-Werror=implicit-function-declaration]
     980 |                 pfn_mkclean_range(pfn, count, index, vma);
         |                 ^~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for DAX
   Depends on [n]: MMU [=n]
   Selected by [m]:
   - BLK_DEV_PMEM [=m] && LIBNVDIMM [=m]


vim +60 drivers/dax/mapping.c

    56	
    57	static unsigned int dax_entry_order(void *entry)
    58	{
    59		if (xa_to_value(entry) & DAX_PMD)
  > 60			return PMD_ORDER;
    61		return 0;
    62	}
    63	
    64	static unsigned long dax_is_pmd_entry(void *entry)
    65	{
    66		return xa_to_value(entry) & DAX_PMD;
    67	}
    68	
    69	static bool dax_is_pte_entry(void *entry)
    70	{
    71		return !(xa_to_value(entry) & DAX_PMD);
    72	}
    73	
    74	static int dax_is_zero_entry(void *entry)
    75	{
    76		return xa_to_value(entry) & DAX_ZERO_PAGE;
    77	}
    78	
    79	static int dax_is_empty_entry(void *entry)
    80	{
    81		return xa_to_value(entry) & DAX_EMPTY;
    82	}
    83	
    84	/*
    85	 * true if the entry that was found is of a smaller order than the entry
    86	 * we were looking for
    87	 */
    88	static bool dax_is_conflict(void *entry)
    89	{
    90		return entry == XA_RETRY_ENTRY;
    91	}
    92	
    93	/*
    94	 * DAX page cache entry locking
    95	 */
    96	struct exceptional_entry_key {
    97		struct xarray *xa;
    98		pgoff_t entry_start;
    99	};
   100	
   101	struct wait_exceptional_entry_queue {
   102		wait_queue_entry_t wait;
   103		struct exceptional_entry_key key;
   104	};
   105	
   106	/**
   107	 * enum dax_wake_mode: waitqueue wakeup behaviour
   108	 * @WAKE_ALL: wake all waiters in the waitqueue
   109	 * @WAKE_NEXT: wake only the first waiter in the waitqueue
   110	 */
   111	enum dax_wake_mode {
   112		WAKE_ALL,
   113		WAKE_NEXT,
   114	};
   115	
   116	static wait_queue_head_t *dax_entry_waitqueue(struct xa_state *xas, void *entry,
   117						      struct exceptional_entry_key *key)
   118	{
   119		unsigned long hash;
   120		unsigned long index = xas->xa_index;
   121	
   122		/*
   123		 * If 'entry' is a PMD, align the 'index' that we use for the wait
   124		 * queue to the start of that PMD.  This ensures that all offsets in
   125		 * the range covered by the PMD map to the same bit lock.
   126		 */
   127		if (dax_is_pmd_entry(entry))
 > 128			index &= ~PG_PMD_COLOUR;
   129		key->xa = xas->xa;
   130		key->entry_start = index;
   131	
   132		hash = hash_long((unsigned long)xas->xa ^ index, DAX_WAIT_TABLE_BITS);
   133		return wait_table + hash;
   134	}
   135	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (135648 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ