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: <202108250251.uf24Z9hr-lkp@intel.com>
Date:   Wed, 25 Aug 2021 02:42:59 +0800
From:   kernel test robot <lkp@...el.com>
To:     David Howells <dhowells@...hat.com>
Cc:     clang-built-linux@...glegroups.com, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org
Subject: [dhowells-fs:netfs-folio-regions 13/33] fs/ceph/addr.c:310:3: error:
 field designator 'is_cache_enabled' does not refer to any field in type
 'const struct netfs_request_ops'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git netfs-folio-regions
head:   bee78a1e3c9ae86d025b0b8f44c2553228fd9d2c
commit: 7261c29990677f14498f0aa1749db277a581b9c3 [13/33] netfs: Add a netfs inode context
config: i386-randconfig-a012-20210824 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d26000e4cc2bc65e207a84fa26cb6e374d60aa12)
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/dhowells/linux-fs.git/commit/?id=7261c29990677f14498f0aa1749db277a581b9c3
        git remote add dhowells-fs https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
        git fetch --no-tags dhowells-fs netfs-folio-regions
        git checkout 7261c29990677f14498f0aa1749db277a581b9c3
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross 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 >>):

   clang-14: warning: optimization flag '-falign-jumps=0' is not supported [-Wignored-optimization-argument]
   In file included from fs/ceph/addr.c:4:
   In file included from include/linux/backing-dev.h:13:
   In file included from include/linux/fs.h:6:
   In file included from include/linux/wait_bit.h:8:
   In file included from include/linux/wait.h:9:
   In file included from include/linux/spinlock.h:51:
   In file included from include/linux/preempt.h:78:
   In file included from arch/x86/include/asm/preempt.h:7:
   In file included from include/linux/thread_info.h:60:
   arch/x86/include/asm/thread_info.h:172:13: warning: calling '__builtin_frame_address' with a nonzero argument is unsafe [-Wframe-address]
           oldframe = __builtin_frame_address(1);
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/x86/include/asm/thread_info.h:174:11: warning: calling '__builtin_frame_address' with a nonzero argument is unsafe [-Wframe-address]
                   frame = __builtin_frame_address(2);
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from fs/ceph/addr.c:17:
   In file included from fs/ceph/super.h:21:
   In file included from include/linux/ceph/libceph.h:24:
   In file included from include/linux/ceph/osd_client.h:14:
   In file included from include/linux/ceph/osdmap.h:7:
   include/linux/ceph/decode.h:236:33: warning: taking address of packed member 'in_addr' of class or structure 'ceph_entity_addr' may result in an unaligned pointer value [-Waddress-of-packed-member]
           __be16 ss_family = *(__be16 *)&a->in_addr.ss_family;
                                          ^~~~~~~~~~~~~~~~~~~~
>> fs/ceph/addr.c:310:3: error: field designator 'is_cache_enabled' does not refer to any field in type 'const struct netfs_request_ops'
           .is_cache_enabled       = ceph_is_cache_enabled,
            ^
>> fs/ceph/addr.c:347:37: error: too many arguments to function call, expected 2, have 4
           return netfs_readpage(file, folio, &ceph_netfs_read_ops, NULL);
                  ~~~~~~~~~~~~~~              ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/netfs.h:258:12: note: 'netfs_readpage' declared here
   extern int netfs_readpage(struct file *, struct page *);
              ^
   fs/ceph/addr.c:378:25: error: too many arguments to function call, expected 1, have 3
           netfs_readahead(ractl, &ceph_netfs_read_ops, (void *)(uintptr_t)got);
           ~~~~~~~~~~~~~~~        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/netfs.h:257:13: note: 'netfs_readahead' declared here
   extern void netfs_readahead(struct readahead_control *);
               ^
   fs/ceph/addr.c:1261:10: error: too many arguments to function call, expected 7, have 9
                                 &ceph_netfs_read_ops, NULL);
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/netfs.h:259:12: note: 'netfs_write_begin' declared here
   extern int netfs_write_begin(struct file *, struct address_space *,
              ^
   3 warnings and 4 errors generated.


vim +310 fs/ceph/addr.c

49870056005ca9 Jeff Layton   2020-07-09  307  
7261c29990677f David Howells 2021-06-29  308  static const struct netfs_request_ops ceph_netfs_read_ops = {
f0702876e152f0 Jeff Layton   2020-06-01  309  	.init_rreq		= ceph_init_rreq,
f0702876e152f0 Jeff Layton   2020-06-01 @310  	.is_cache_enabled	= ceph_is_cache_enabled,
f0702876e152f0 Jeff Layton   2020-06-01  311  	.begin_cache_operation	= ceph_begin_cache_operation,
f0702876e152f0 Jeff Layton   2020-06-01  312  	.issue_op		= ceph_netfs_issue_op,
f0702876e152f0 Jeff Layton   2020-06-01  313  	.expand_readahead	= ceph_netfs_expand_readahead,
f0702876e152f0 Jeff Layton   2020-06-01  314  	.clamp_length		= ceph_netfs_clamp_length,
d801327d9500c7 Jeff Layton   2020-06-05  315  	.check_write_begin	= ceph_netfs_check_write_begin,
49870056005ca9 Jeff Layton   2020-07-09  316  	.cleanup		= ceph_readahead_cleanup,
f0702876e152f0 Jeff Layton   2020-06-01  317  };
f0702876e152f0 Jeff Layton   2020-06-01  318  
f0702876e152f0 Jeff Layton   2020-06-01  319  /* read a single page, without unlocking it. */
f8a58a6c511659 David Howells 2021-08-11  320  static int ceph_readpage(struct file *file, struct page *subpage)
f0702876e152f0 Jeff Layton   2020-06-01  321  {
f8a58a6c511659 David Howells 2021-08-11  322  	struct folio *folio = page_folio(subpage);
f0702876e152f0 Jeff Layton   2020-06-01  323  	struct inode *inode = file_inode(file);
f0702876e152f0 Jeff Layton   2020-06-01  324  	struct ceph_inode_info *ci = ceph_inode(inode);
f0702876e152f0 Jeff Layton   2020-06-01  325  	struct ceph_vino vino = ceph_vino(inode);
f8a58a6c511659 David Howells 2021-08-11  326  	size_t len = folio_size(folio);
f8a58a6c511659 David Howells 2021-08-11  327  	u64 off = folio_file_pos(folio);
f0702876e152f0 Jeff Layton   2020-06-01  328  
f0702876e152f0 Jeff Layton   2020-06-01  329  	if (ci->i_inline_version != CEPH_INLINE_NONE) {
f0702876e152f0 Jeff Layton   2020-06-01  330  		/*
f0702876e152f0 Jeff Layton   2020-06-01  331  		 * Uptodate inline data should have been added
f0702876e152f0 Jeff Layton   2020-06-01  332  		 * into page cache while getting Fcr caps.
f0702876e152f0 Jeff Layton   2020-06-01  333  		 */
f0702876e152f0 Jeff Layton   2020-06-01  334  		if (off == 0) {
f8a58a6c511659 David Howells 2021-08-11  335  			folio_unlock(folio);
f0702876e152f0 Jeff Layton   2020-06-01  336  			return -EINVAL;
f0702876e152f0 Jeff Layton   2020-06-01  337  		}
f8a58a6c511659 David Howells 2021-08-11  338  		zero_user_segment(&folio->page, 0, folio_size(folio));
f8a58a6c511659 David Howells 2021-08-11  339  		folio_mark_uptodate(folio);
f8a58a6c511659 David Howells 2021-08-11  340  		folio_unlock(folio);
f0702876e152f0 Jeff Layton   2020-06-01  341  		return 0;
f0702876e152f0 Jeff Layton   2020-06-01  342  	}
f0702876e152f0 Jeff Layton   2020-06-01  343  
f8a58a6c511659 David Howells 2021-08-11  344  	dout("readpage ino %llx.%llx file %p off %llu len %zu folio %p index %lu\n",
f8a58a6c511659 David Howells 2021-08-11  345  	     vino.ino, vino.snap, file, off, len, folio, folio_index(folio));
f0702876e152f0 Jeff Layton   2020-06-01  346  
f8a58a6c511659 David Howells 2021-08-11 @347  	return netfs_readpage(file, folio, &ceph_netfs_read_ops, NULL);
f0702876e152f0 Jeff Layton   2020-06-01  348  }
f0702876e152f0 Jeff Layton   2020-06-01  349  

:::::: The code at line 310 was first introduced by commit
:::::: f0702876e152f0443911514aec8b2bf563a2432b ceph: convert ceph_readpage to netfs_readpage

:::::: TO: Jeff Layton <jlayton@...nel.org>
:::::: CC: Ilya Dryomov <idryomov@...il.com>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ