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]
Message-ID: <202012050214.Cot1Fk27-lkp@intel.com>
Date:   Sat, 5 Dec 2020 02:51:41 +0800
From:   kernel test robot <lkp@...el.com>
To:     Konstantin Komarov <almaz.alexandrovich@...agon-software.com>,
        linux-fsdevel@...r.kernel.org
Cc:     kbuild-all@...ts.01.org, viro@...iv.linux.org.uk,
        linux-kernel@...r.kernel.org, pali@...nel.org, dsterba@...e.cz,
        aaptel@...e.com, willy@...radead.org, rdunlap@...radead.org,
        joe@...ches.com, mark@...mstone.com
Subject: Re: [PATCH v14 09/10] fs/ntfs3: Add NTFS3 in fs/Kconfig and
 fs/Makefile

Hi Konstantin,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.10-rc6 next-20201204]
[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]

url:    https://github.com/0day-ci/linux/commits/Konstantin-Komarov/NTFS-read-write-driver-GPL-implementation-by-Paragon-Software/20201204-235247
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git bbe2ba04c5a92a49db8a42c850a5a2f6481e47eb
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.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://github.com/0day-ci/linux/commit/90b3182a8c96b7a5e9a59ed7a9c9b2d3e22c7ee1
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Konstantin-Komarov/NTFS-read-write-driver-GPL-implementation-by-Paragon-Software/20201204-235247
        git checkout 90b3182a8c96b7a5e9a59ed7a9c9b2d3e22c7ee1
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sh 

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

All warnings (new ones prefixed by >>):

>> fs/ntfs3/lib/lzx_decompress.c:441:1: warning: no previous prototype for 'lzx_decompress' [-Wmissing-prototypes]
     441 | lzx_decompress(struct lzx_decompressor *__restrict d,
         | ^~~~~~~~~~~~~~
>> fs/ntfs3/lib/lzx_decompress.c:509:1: warning: no previous prototype for 'lzx_allocate_decompressor' [-Wmissing-prototypes]
     509 | lzx_allocate_decompressor(size_t max_block_size)
         | ^~~~~~~~~~~~~~~~~~~~~~~~~
>> fs/ntfs3/lib/lzx_decompress.c:550:1: warning: no previous prototype for 'lzx_free_decompressor' [-Wmissing-prototypes]
     550 | lzx_free_decompressor(struct lzx_decompressor *d)
         | ^~~~~~~~~~~~~~~~~~~~~
--
>> fs/ntfs3/lib/xpress_decompress.c:84:1: warning: no previous prototype for 'xpress_decompress' [-Wmissing-prototypes]
      84 | xpress_decompress(struct xpress_decompressor *__restrict d,
         | ^~~~~~~~~~~~~~~~~
>> fs/ntfs3/lib/xpress_decompress.c:155:1: warning: no previous prototype for 'xpress_allocate_decompressor' [-Wmissing-prototypes]
     155 | xpress_allocate_decompressor(void)
         | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> fs/ntfs3/lib/xpress_decompress.c:162:1: warning: no previous prototype for 'xpress_free_decompressor' [-Wmissing-prototypes]
     162 | xpress_free_decompressor(struct xpress_decompressor *d)
         | ^~~~~~~~~~~~~~~~~~~~~~~~

vim +/lzx_decompress +441 fs/ntfs3/lib/lzx_decompress.c

f08c356f4019dd Konstantin Komarov 2020-12-04  439  
f08c356f4019dd Konstantin Komarov 2020-12-04  440  int
f08c356f4019dd Konstantin Komarov 2020-12-04 @441  lzx_decompress(struct lzx_decompressor *__restrict d,
f08c356f4019dd Konstantin Komarov 2020-12-04  442  	       const void *__restrict compressed_data, size_t compressed_size,
f08c356f4019dd Konstantin Komarov 2020-12-04  443  	       void *__restrict uncompressed_data, size_t uncompressed_size)
f08c356f4019dd Konstantin Komarov 2020-12-04  444  {
f08c356f4019dd Konstantin Komarov 2020-12-04  445  	u8 * const out_begin = uncompressed_data;
f08c356f4019dd Konstantin Komarov 2020-12-04  446  	u8 *out_next = out_begin;
f08c356f4019dd Konstantin Komarov 2020-12-04  447  	u8 * const out_end = out_begin + uncompressed_size;
f08c356f4019dd Konstantin Komarov 2020-12-04  448  	struct input_bitstream is;
f08c356f4019dd Konstantin Komarov 2020-12-04  449  	u32 recent_offsets[LZX_NUM_RECENT_OFFSETS] = {1, 1, 1};
f08c356f4019dd Konstantin Komarov 2020-12-04  450  	u32 may_have_e8_byte = 0;
f08c356f4019dd Konstantin Komarov 2020-12-04  451  
f08c356f4019dd Konstantin Komarov 2020-12-04  452  	STATIC_ASSERT(LZX_NUM_RECENT_OFFSETS == 3);
f08c356f4019dd Konstantin Komarov 2020-12-04  453  
f08c356f4019dd Konstantin Komarov 2020-12-04  454  	init_input_bitstream(&is, compressed_data, compressed_size);
f08c356f4019dd Konstantin Komarov 2020-12-04  455  
f08c356f4019dd Konstantin Komarov 2020-12-04  456  	/* Codeword lengths begin as all 0's for delta encoding purposes. */
f08c356f4019dd Konstantin Komarov 2020-12-04  457  	memset(d->maincode_lens, 0, d->num_main_syms);
f08c356f4019dd Konstantin Komarov 2020-12-04  458  	memset(d->lencode_lens, 0, LZX_LENCODE_NUM_SYMBOLS);
f08c356f4019dd Konstantin Komarov 2020-12-04  459  
f08c356f4019dd Konstantin Komarov 2020-12-04  460  	/* Decompress blocks until we have all the uncompressed data. */
f08c356f4019dd Konstantin Komarov 2020-12-04  461  
f08c356f4019dd Konstantin Komarov 2020-12-04  462  	while (out_next != out_end) {
f08c356f4019dd Konstantin Komarov 2020-12-04  463  		int block_type;
f08c356f4019dd Konstantin Komarov 2020-12-04  464  		u32 block_size;
f08c356f4019dd Konstantin Komarov 2020-12-04  465  
f08c356f4019dd Konstantin Komarov 2020-12-04  466  		if (lzx_read_block_header(d, &is, recent_offsets,
f08c356f4019dd Konstantin Komarov 2020-12-04  467  					  &block_type, &block_size))
f08c356f4019dd Konstantin Komarov 2020-12-04  468  			return -1;
f08c356f4019dd Konstantin Komarov 2020-12-04  469  
f08c356f4019dd Konstantin Komarov 2020-12-04  470  		if (block_size < 1 || block_size > out_end - out_next)
f08c356f4019dd Konstantin Komarov 2020-12-04  471  			return -1;
f08c356f4019dd Konstantin Komarov 2020-12-04  472  
f08c356f4019dd Konstantin Komarov 2020-12-04  473  		if (likely(block_type != LZX_BLOCKTYPE_UNCOMPRESSED)) {
f08c356f4019dd Konstantin Komarov 2020-12-04  474  
f08c356f4019dd Konstantin Komarov 2020-12-04  475  			/* Compressed block */
f08c356f4019dd Konstantin Komarov 2020-12-04  476  			if (lzx_decompress_block(d, &is, block_type, block_size,
f08c356f4019dd Konstantin Komarov 2020-12-04  477  						 out_begin, out_next,
f08c356f4019dd Konstantin Komarov 2020-12-04  478  						 recent_offsets))
f08c356f4019dd Konstantin Komarov 2020-12-04  479  				return -1;
f08c356f4019dd Konstantin Komarov 2020-12-04  480  
f08c356f4019dd Konstantin Komarov 2020-12-04  481  			/* If the first E8 byte was in this block, then it must
f08c356f4019dd Konstantin Komarov 2020-12-04  482  			 * have been encoded as a literal using mainsym E8.
f08c356f4019dd Konstantin Komarov 2020-12-04  483  			 */
f08c356f4019dd Konstantin Komarov 2020-12-04  484  			may_have_e8_byte |= d->maincode_lens[0xE8];
f08c356f4019dd Konstantin Komarov 2020-12-04  485  		} else {
f08c356f4019dd Konstantin Komarov 2020-12-04  486  
f08c356f4019dd Konstantin Komarov 2020-12-04  487  			/* Uncompressed block */
f08c356f4019dd Konstantin Komarov 2020-12-04  488  			if (bitstream_read_bytes(&is, out_next, block_size))
f08c356f4019dd Konstantin Komarov 2020-12-04  489  				return -1;
f08c356f4019dd Konstantin Komarov 2020-12-04  490  
f08c356f4019dd Konstantin Komarov 2020-12-04  491  			/* Re-align the bitstream if needed. */
f08c356f4019dd Konstantin Komarov 2020-12-04  492  			if (block_size & 1)
f08c356f4019dd Konstantin Komarov 2020-12-04  493  				bitstream_read_byte(&is);
f08c356f4019dd Konstantin Komarov 2020-12-04  494  
f08c356f4019dd Konstantin Komarov 2020-12-04  495  			/* There may have been an E8 byte in the block. */
f08c356f4019dd Konstantin Komarov 2020-12-04  496  			may_have_e8_byte = 1;
f08c356f4019dd Konstantin Komarov 2020-12-04  497  		}
f08c356f4019dd Konstantin Komarov 2020-12-04  498  		out_next += block_size;
f08c356f4019dd Konstantin Komarov 2020-12-04  499  	}
f08c356f4019dd Konstantin Komarov 2020-12-04  500  
f08c356f4019dd Konstantin Komarov 2020-12-04  501  	/* Postprocess the data unless it cannot possibly contain E8 bytes. */
f08c356f4019dd Konstantin Komarov 2020-12-04  502  	if (may_have_e8_byte)
f08c356f4019dd Konstantin Komarov 2020-12-04  503  		lzx_postprocess(uncompressed_data, uncompressed_size);
f08c356f4019dd Konstantin Komarov 2020-12-04  504  
f08c356f4019dd Konstantin Komarov 2020-12-04  505  	return 0;
f08c356f4019dd Konstantin Komarov 2020-12-04  506  }
f08c356f4019dd Konstantin Komarov 2020-12-04  507  
f08c356f4019dd Konstantin Komarov 2020-12-04  508  struct lzx_decompressor *
f08c356f4019dd Konstantin Komarov 2020-12-04 @509  lzx_allocate_decompressor(size_t max_block_size)
f08c356f4019dd Konstantin Komarov 2020-12-04  510  {
f08c356f4019dd Konstantin Komarov 2020-12-04  511  	u32 window_order;
f08c356f4019dd Konstantin Komarov 2020-12-04  512  	struct lzx_decompressor *d;
f08c356f4019dd Konstantin Komarov 2020-12-04  513  	u32 offset_slot;
f08c356f4019dd Konstantin Komarov 2020-12-04  514  
f08c356f4019dd Konstantin Komarov 2020-12-04  515  	/*
f08c356f4019dd Konstantin Komarov 2020-12-04  516  	 * ntfs uses lzx only as max_block_size == 0x8000
f08c356f4019dd Konstantin Komarov 2020-12-04  517  	 * this value certainly will not fail
f08c356f4019dd Konstantin Komarov 2020-12-04  518  	 * we can remove lzx_get_window_order + ilog2_ceil + bsrw
f08c356f4019dd Konstantin Komarov 2020-12-04  519  	 */
f08c356f4019dd Konstantin Komarov 2020-12-04  520  	WARN_ON(max_block_size != 0x8000);
f08c356f4019dd Konstantin Komarov 2020-12-04  521  
f08c356f4019dd Konstantin Komarov 2020-12-04  522  	window_order = lzx_get_window_order(max_block_size);
f08c356f4019dd Konstantin Komarov 2020-12-04  523  	if (window_order == 0)
f08c356f4019dd Konstantin Komarov 2020-12-04  524  		return ERR_PTR(-EINVAL);
f08c356f4019dd Konstantin Komarov 2020-12-04  525  
f08c356f4019dd Konstantin Komarov 2020-12-04  526  	d = aligned_malloc(sizeof(*d), DECODE_TABLE_ALIGNMENT);
f08c356f4019dd Konstantin Komarov 2020-12-04  527  	if (!d)
f08c356f4019dd Konstantin Komarov 2020-12-04  528  		return NULL;
f08c356f4019dd Konstantin Komarov 2020-12-04  529  
f08c356f4019dd Konstantin Komarov 2020-12-04  530  	d->window_order = window_order;
f08c356f4019dd Konstantin Komarov 2020-12-04  531  	d->num_main_syms = lzx_get_num_main_syms(window_order);
f08c356f4019dd Konstantin Komarov 2020-12-04  532  
f08c356f4019dd Konstantin Komarov 2020-12-04  533  	/* Initialize 'd->extra_offset_bits_minus_aligned'. */
f08c356f4019dd Konstantin Komarov 2020-12-04  534  	STATIC_ASSERT(sizeof(d->extra_offset_bits_minus_aligned) ==
f08c356f4019dd Konstantin Komarov 2020-12-04  535  		      sizeof(lzx_extra_offset_bits));
f08c356f4019dd Konstantin Komarov 2020-12-04  536  	STATIC_ASSERT(sizeof(d->extra_offset_bits) ==
f08c356f4019dd Konstantin Komarov 2020-12-04  537  		      sizeof(lzx_extra_offset_bits));
f08c356f4019dd Konstantin Komarov 2020-12-04  538  	memcpy(d->extra_offset_bits_minus_aligned, lzx_extra_offset_bits,
f08c356f4019dd Konstantin Komarov 2020-12-04  539  	       sizeof(lzx_extra_offset_bits));
f08c356f4019dd Konstantin Komarov 2020-12-04  540  	for (offset_slot = LZX_MIN_ALIGNED_OFFSET_SLOT;
f08c356f4019dd Konstantin Komarov 2020-12-04  541  	     offset_slot < LZX_MAX_OFFSET_SLOTS; offset_slot++) {
f08c356f4019dd Konstantin Komarov 2020-12-04  542  		d->extra_offset_bits_minus_aligned[offset_slot] -=
f08c356f4019dd Konstantin Komarov 2020-12-04  543  				LZX_NUM_ALIGNED_OFFSET_BITS;
f08c356f4019dd Konstantin Komarov 2020-12-04  544  	}
f08c356f4019dd Konstantin Komarov 2020-12-04  545  
f08c356f4019dd Konstantin Komarov 2020-12-04  546  	return d;
f08c356f4019dd Konstantin Komarov 2020-12-04  547  }
f08c356f4019dd Konstantin Komarov 2020-12-04  548  
f08c356f4019dd Konstantin Komarov 2020-12-04  549  void
f08c356f4019dd Konstantin Komarov 2020-12-04 @550  lzx_free_decompressor(struct lzx_decompressor *d)

---
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" (53580 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ