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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 12 Dec 2022 08:52:47 +0800
From:   kernel test robot <lkp@...el.com>
To:     "Fabio M. De Francesco" <fmdefrancesco@...il.com>,
        Evgeniy Dushistov <dushistov@...l.ru>,
        Al Viro <viro@...iv.linux.org.uk>,
        Ira Weiny <ira.weiny@...el.com>, linux-kernel@...r.kernel.org,
        bpf@...r.kernel.org, linux-fsdevel@...r.kernel.org
Cc:     llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
        "Fabio M. De Francesco" <fmdefrancesco@...il.com>
Subject: Re: [PATCH 3/3] fs/ufs: Replace kmap() with kmap_local_page()

Hi Fabio,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on viro-vfs/for-next]
[also build test WARNING on linus/master v6.1 next-20221208]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Fabio-M-De-Francesco/fs-ufs-replace-kmap-with-kmap_local_page/20221212-053252
base:   https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git for-next
patch link:    https://lore.kernel.org/r/20221211213111.30085-4-fmdefrancesco%40gmail.com
patch subject: [PATCH 3/3] fs/ufs: Replace kmap() with kmap_local_page()
config: s390-buildonly-randconfig-r006-20221211
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 6e4cea55f0d1104408b26ac574566a0e4de48036)
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
        # install s390 cross compiling tool for clang build
        # apt-get install binutils-s390x-linux-gnu
        # https://github.com/intel-lab-lkp/linux/commit/8d46ed8ea1eddf657427f71a7d7f52a7767186dd
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Fabio-M-De-Francesco/fs-ufs-replace-kmap-with-kmap_local_page/20221212-053252
        git checkout 8d46ed8ea1eddf657427f71a7d7f52a7767186dd
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash fs/ufs/

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

All warnings (new ones prefixed by >>):

>> fs/ufs/dir.c:210:22: warning: variable 'kaddr' is uninitialized when used here [-Wuninitialized]
           ufs_put_page(*page, kaddr);
                               ^~~~~
   fs/ufs/dir.c:196:13: note: initialize the variable 'kaddr' to silence this warning
           char *kaddr;
                      ^
                       = NULL
   1 warning generated.

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for DEBUG_MAPLE_TREE
   Depends on [n]: DEBUG_KERNEL [=n]
   Selected by [m]:
   - TEST_MAPLE_TREE [=m] && RUNTIME_TESTING_MENU [=y]


vim +/kaddr +210 fs/ufs/dir.c

   186	
   187	/*
   188	 * Calls to ufs_get_page()/ufs_put_page() must be nested according to the
   189	 * rules documented in kmap_local_page()/kunmap_local().
   190	 *
   191	 * NOTE: ufs_find_entry() and ufs_dotdot() act as calls to ufs_get_page()
   192	 * and must be treated accordingly for nesting purposes.
   193	 */
   194	static void *ufs_get_page(struct inode *dir, unsigned long n, struct page **page)
   195	{
   196		char *kaddr;
   197	
   198		struct address_space *mapping = dir->i_mapping;
   199		*page = read_mapping_page(mapping, n, NULL);
   200		if (!IS_ERR(*page)) {
   201			kmap_local_page(*page);
   202			if (unlikely(!PageChecked(*page))) {
   203				if (!ufs_check_page(*page, kaddr))
   204					goto fail;
   205			}
   206		}
   207		return *page;
   208	
   209	fail:
 > 210		ufs_put_page(*page, kaddr);
   211		return ERR_PTR(-EIO);
   212	}
   213	

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ