All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Miklos Szeredi <mszeredi@redhat.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org
Subject: Re: [RFC PATCH] getvalues(2) prototype
Date: Wed, 23 Mar 2022 07:32:53 +0800	[thread overview]
Message-ID: <202203230743.V7IZ7cFy-lkp@intel.com> (raw)
In-Reply-To: <20220322192712.709170-1-mszeredi@redhat.com>

Hi Miklos,

[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on linux/master]
[also build test ERROR on linus/master v5.17]
[cannot apply to tip/x86/asm next-20220322]
[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/Miklos-Szeredi/getvalues-2-prototype/20220323-032854
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 2c271fe77d52a0555161926c232cd5bc07178b39
config: arm-pxa255-idp_defconfig (https://download.01.org/0day-ci/archive/20220323/202203230743.V7IZ7cFy-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 902f4708fe1d03b0de7e5315ef875006a6adc319)
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 arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://github.com/0day-ci/linux/commit/73262ccc914519ef252ba28b67b914b32d18ef4b
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Miklos-Szeredi/getvalues-2-prototype/20220323-032854
        git checkout 73262ccc914519ef252ba28b67b914b32d18ef4b
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

>> fs/values.c:14:15: error: field has incomplete type 'struct iovec'
           struct iovec value_in;          /* in */
                        ^
   include/linux/syscalls.h:18:8: note: forward declaration of 'struct iovec'
   struct iovec;
          ^
   fs/values.c:15:15: error: field has incomplete type 'struct iovec'
           struct iovec value_out;         /* out */
                        ^
   include/linux/syscalls.h:18:8: note: forward declaration of 'struct iovec'
   struct iovec;
          ^
   fs/values.c:23:15: error: field has incomplete type 'struct iovec'
           struct iovec vec;
                        ^
   include/linux/syscalls.h:18:8: note: forward declaration of 'struct iovec'
   struct iovec;
          ^
>> fs/values.c:72:15: error: variable has incomplete type 'struct iovec'
           struct iovec iov = {
                        ^
   include/linux/syscalls.h:18:8: note: forward declaration of 'struct iovec'
   struct iovec;
          ^
   4 errors generated.


vim +14 fs/values.c

    11	
    12	struct name_val {
    13		const char __user *name;	/* in */
  > 14		struct iovec value_in;		/* in */
    15		struct iovec value_out;		/* out */
    16		__u32 error;			/* out */
    17		__u32 reserved;
    18	};
    19	
    20	struct val_iter {
    21		struct name_val __user *curr;
    22		size_t num;
    23		struct iovec vec;
    24		char name[256];
    25		size_t bufsize;
    26		struct seq_file seq;
    27		const char *prefix;
    28		const char *sub;
    29	};
    30	
    31	struct val_desc {
    32		const char *name;
    33		union {
    34			int idx;
    35			int (*get)(struct val_iter *vi, const struct path *path);
    36		};
    37	};
    38	
    39	static int val_get(struct val_iter *vi)
    40	{
    41		struct name_val nameval;
    42		long err;
    43	
    44		if (copy_from_user(&nameval, vi->curr, sizeof(nameval)))
    45			return -EFAULT;
    46	
    47		err = strncpy_from_user(vi->name, nameval.name, sizeof(vi->name));
    48		if (err < 0)
    49			return err;
    50		if (err == sizeof(vi->name))
    51			return -ERANGE;
    52	
    53		if (nameval.value_in.iov_base)
    54			vi->vec = nameval.value_in;
    55	
    56		vi->seq.size = min(vi->vec.iov_len, vi->bufsize);
    57		vi->seq.count = 0;
    58	
    59		return 0;
    60	}
    61	
    62	static int val_next(struct val_iter *vi)
    63	{
    64		vi->curr++;
    65		vi->num--;
    66	
    67		return vi->num ? val_get(vi) : 0;
    68	}
    69	
    70	static int val_end(struct val_iter *vi, size_t count)
    71	{
  > 72		struct iovec iov = {
    73			.iov_base = vi->vec.iov_base,
    74			.iov_len = count,
    75		};
    76	
    77		if (copy_to_user(&vi->curr->value_out, &iov, sizeof(iov)))
    78			return -EFAULT;
    79	
    80		vi->vec.iov_base += count;
    81		vi->vec.iov_len -= count;
    82	
    83		return val_next(vi);
    84	}
    85	

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

  parent reply	other threads:[~2022-03-22 23:33 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-22 19:27 [RFC PATCH] getvalues(2) prototype Miklos Szeredi
2022-03-22 19:30 ` Miklos Szeredi
2022-03-22 20:36 ` Casey Schaufler
2022-03-22 20:53   ` Casey Schaufler
2022-03-23  7:14   ` Greg KH
2022-03-22 23:32 ` kernel test robot [this message]
2022-03-23  7:16 ` Greg KH
2022-03-23 10:26   ` Bernd Schubert
2022-03-23 11:42     ` Greg KH
2022-03-23 12:06       ` Bernd Schubert
2022-03-23 12:13         ` Greg KH
2022-03-23 19:29     ` J. Bruce Fields
2022-03-23 11:42 ` Christian Brauner
2022-03-23 13:24   ` Miklos Szeredi
2022-03-23 13:38     ` Greg KH
2022-03-23 15:23       ` Miklos Szeredi
2022-03-24  6:56         ` Greg KH
2022-03-23 13:51     ` Casey Schaufler
2022-03-23 14:00       ` Miklos Szeredi
2022-03-23 22:39         ` Casey Schaufler
2022-03-23 22:19     ` Theodore Ts'o
2022-03-24  6:34       ` Christoph Hellwig
2022-03-24  8:44       ` Miklos Szeredi
2022-03-24 16:15         ` Eric W. Biederman
2022-03-25  8:46         ` Karel Zak
2022-03-25  8:54           ` Greg KH
2022-03-25  9:25             ` Karel Zak
2022-03-26  4:19               ` Theodore Ts'o
2022-03-25 18:40           ` Linus Torvalds
2022-03-25 11:02         ` Cyril Hrubis
2022-03-23 22:58 ` Dave Chinner
2022-03-23 23:17   ` Casey Schaufler
2022-03-24  8:57   ` Miklos Szeredi
2022-03-24 10:34     ` Amir Goldstein
2022-03-24 20:31     ` Dave Chinner
2022-03-25  9:10       ` Karel Zak
2022-03-25 16:42       ` Trond Myklebust
2022-03-27 21:03         ` Dave Chinner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202203230743.V7IZ7cFy-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=llvm@lists.linux.dev \
    --cc=mszeredi@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.