public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* Re: [RFC PATCH] getvalues(2) prototype
       [not found] <20220322192712.709170-1-mszeredi@redhat.com>
@ 2022-03-22 23:32 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-03-22 23:32 UTC (permalink / raw)
  To: Miklos Szeredi; +Cc: llvm, kbuild-all

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-22 23:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20220322192712.709170-1-mszeredi@redhat.com>
2022-03-22 23:32 ` [RFC PATCH] getvalues(2) prototype kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox