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]
Date:   Sat, 23 Apr 2022 11:13:28 +0800
From:   kernel test robot <lkp@...el.com>
To:     David Howells <dhowells@...hat.com>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        GNU/Weeb Mailing List <gwml@...r.gnuweeb.org>,
        linux-kernel@...r.kernel.org
Subject: [ammarfaizi2-block:dhowells/linux-fs/netfs-maple 30/44]
 fs/netfs/direct_read.c:198:3: error: expected expression

tree:   https://github.com/ammarfaizi2/linux-block dhowells/linux-fs/netfs-maple
head:   931e50676c6598d0eda1954ead465519ff91874d
commit: d1c47ebbbed8921181b4573ba5736595bc3b787c [30/44] netfs: Support decryption on DIO read
config: i386-randconfig-a015 (https://download.01.org/0day-ci/archive/20220423/202204231010.5DHxVC96-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 5bd87350a5ae429baf8f373cb226a57b62f87280)
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/ammarfaizi2/linux-block/commit/d1c47ebbbed8921181b4573ba5736595bc3b787c
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block dhowells/linux-fs/netfs-maple
        git checkout d1c47ebbbed8921181b4573ba5736595bc3b787c
        # 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=i386 SHELL=/bin/bash fs/

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 >>):

>> fs/netfs/direct_read.c:198:3: error: expected expression
                   unsigned int min_bsize = 1ULL << ctx->min_bshift;
                   ^
>> fs/netfs/direct_read.c:199:54: error: use of undeclared identifier 'min_bsize'
                   unsigned long long start = round_down(rreq->start, min_bsize);
                                                                      ^
   fs/netfs/direct_read.c:201:47: error: use of undeclared identifier 'min_bsize'
                                                  round_up(rreq->start + rreq->len, min_bsize),
                                                                                    ^
   fs/netfs/direct_read.c:201:47: error: use of undeclared identifier 'min_bsize'
   fs/netfs/direct_read.c:199:22: warning: mixing declarations and code is incompatible with standards before C99 [-Wdeclaration-after-statement]
                   unsigned long long start = round_down(rreq->start, min_bsize);
                                      ^
   1 warning and 4 errors generated.


vim +198 fs/netfs/direct_read.c

   116	
   117	/**
   118	 * netfs_direct_read_iter - Perform a direct I/O read
   119	 * @iocb: The I/O control descriptor describing the read
   120	 * @iter: The output buffer (also specifies read length)
   121	 */
   122	ssize_t netfs_direct_read_iter(struct kiocb *iocb, struct iov_iter *iter)
   123	{
   124		struct netfs_io_request *rreq;
   125		struct netfs_i_context *ctx;
   126		ssize_t n, ret;
   127	
   128		_enter("");
   129	
   130		rreq = netfs_alloc_request(iocb->ki_filp->f_mapping, iocb->ki_filp,
   131					   iocb->ki_pos, iov_iter_count(iter),
   132					   NETFS_DIO_READ);
   133		if (IS_ERR(rreq))
   134			return PTR_ERR(rreq);
   135	
   136		ctx = netfs_i_context(rreq->inode);
   137		netfs_stat(&netfs_n_rh_dio_read);
   138		trace_netfs_read(rreq, rreq->start, rreq->len, netfs_read_trace_dio_read);
   139	
   140		rreq->buffering = NETFS_DIRECT;
   141		if (test_bit(NETFS_RREQ_CONTENT_ENCRYPTION, &rreq->flags)) {
   142			static const enum netfs_buffering buffering[2][2] = {
   143				/* [async][aligned] */
   144				[false][false]	= NETFS_BOUNCE_DEC_COPY,
   145				[false][true]	= NETFS_BOUNCE_DEC_TO_DIRECT,
   146				[true ][false]	= NETFS_BOUNCE_DEC_COPY_BV,
   147				[true ][true]	= NETFS_BOUNCE_DEC_TO_DIRECT_BV,
   148			};
   149			bool aligned = netfs_is_crypto_aligned(rreq, iter);
   150			bool async = !is_sync_kiocb(iocb);
   151	
   152			rreq->buffering = buffering[async][aligned];
   153		}
   154	
   155		kdebug("remote_i %llx %llx %llx",
   156		       ctx->remote_i_size, rreq->i_size, i_size_read(netfs_inode(ctx)));
   157	
   158		/* If this is an async op, we have to keep track of the destination
   159		 * buffer for ourselves as the caller's iterator will be trashed when
   160		 * we return.
   161		 *
   162		 * In such a case, extract an iterator to represent as much of the the
   163		 * output buffer as we can manage.  Note that the extraction might not
   164		 * be able to allocate a sufficiently large bvec array and may shorten
   165		 * the request.
   166		 */
   167		switch (rreq->buffering) {
   168		case NETFS_DIRECT:
   169		case NETFS_BOUNCE_DEC_TO_DIRECT:
   170		case NETFS_BOUNCE_DEC_COPY:
   171			rreq->direct_iter = *iter;
   172			rreq->len = iov_iter_count(&rreq->direct_iter);
   173			break;
   174		case NETFS_DIRECT_BV:
   175		case NETFS_BOUNCE_DEC_TO_DIRECT_BV:
   176		case NETFS_BOUNCE_DEC_COPY_BV:
   177			n = extract_iter_to_iter(iter, rreq->len, &rreq->direct_iter,
   178						 &rreq->direct_bv);
   179			if (n < 0) {
   180				ret = n;
   181				goto out;
   182			}
   183			rreq->direct_bv_count = n;
   184			rreq->len = iov_iter_count(&rreq->direct_iter);
   185			break;
   186		default:
   187			BUG();
   188		}
   189	
   190		/* If we're going to use a bounce buffer, we need to set it up.  We
   191		 * will then need to pad the request out to the minimum block size.
   192		 */
   193		switch (rreq->buffering) {
   194		case NETFS_BOUNCE_DEC_TO_DIRECT:
   195		case NETFS_BOUNCE_DEC_COPY:
   196		case NETFS_BOUNCE_DEC_TO_DIRECT_BV:
   197		case NETFS_BOUNCE_DEC_COPY_BV:
 > 198			unsigned int min_bsize = 1ULL << ctx->min_bshift;
 > 199			unsigned long long start = round_down(rreq->start, min_bsize);

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ