Content-Type: multipart/mixed; boundary="===============7618025320792953362==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH v3 2/2] misc: open-dice: Add driver to expose DICE data to userspace Date: Tue, 14 Dec 2021 11:25:34 +0800 Message-ID: <202112141128.lBBmmIuE-lkp@intel.com> In-Reply-To: <20211213195833.772892-3-dbrazdil@google.com> List-Id: --===============7618025320792953362== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi David, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on robh/for-next] [also build test WARNING on char-misc/char-misc-testing soc/for-next v5.16-= rc5] [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/David-Brazdil/Driver-for-O= pen-Profile-for-DICE/20211214-040051 base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-= next config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20211214/2= 02112141128.lBBmmIuE-lkp(a)intel.com/config) compiler: sh4-linux-gcc (GCC) 11.2.0 reproduce (this is a W=3D1 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/6fb8e9472d98abcc2dfabd43e= 95fc4ec5819ecd0 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review David-Brazdil/Driver-for-Open-Prof= ile-for-DICE/20211214-040051 git checkout 6fb8e9472d98abcc2dfabd43e95fc4ec5819ecd0 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= O=3Dbuild_dir ARCH=3Dsh SHELL=3D/bin/bash drivers/misc/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): drivers/misc/open-dice.c:74: warning: Function parameter or member 'filp= ' not described in 'open_dice_read' drivers/misc/open-dice.c:74: warning: Function parameter or member 'ptr'= not described in 'open_dice_read' drivers/misc/open-dice.c:74: warning: Function parameter or member 'len'= not described in 'open_dice_read' drivers/misc/open-dice.c:74: warning: Function parameter or member 'off'= not described in 'open_dice_read' >> drivers/misc/open-dice.c:74: warning: expecting prototype for Returns th= e size of the reserved memory region. The user(). Prototype was for open_di= ce_read() instead drivers/misc/open-dice.c:84: warning: Function parameter or member 'filp= ' not described in 'open_dice_write' drivers/misc/open-dice.c:84: warning: Function parameter or member 'ptr'= not described in 'open_dice_write' drivers/misc/open-dice.c:84: warning: Function parameter or member 'len'= not described in 'open_dice_write' drivers/misc/open-dice.c:84: warning: Function parameter or member 'off'= not described in 'open_dice_write' >> drivers/misc/open-dice.c:84: warning: expecting prototype for Triggers a= wipe of the reserved memory region. The user(). Prototype was for open_dic= e_write() instead >> drivers/misc/open-dice.c:89: warning: This comment starts with '/**', bu= t isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Creates a mapping of the reserved memory region in a user address spa= ce. vim +74 drivers/misc/open-dice.c 67 = 68 /** 69 * Returns the size of the reserved memory region. The user-provided= pointer is 70 * never dereferenced. 71 */ 72 static ssize_t open_dice_read(struct file *filp, char __user *ptr, s= ize_t len, 73 loff_t *off) > 74 { 75 return open_dice_size(to_open_dice_drvdata(filp)); 76 } 77 = 78 /** 79 * Triggers a wipe of the reserved memory region. The user-provided = pointer is 80 * never dereferenced. 81 */ 82 static ssize_t open_dice_write(struct file *filp, const char __user = *ptr, 83 size_t len, loff_t *off) > 84 { 85 return open_dice_wipe(to_open_dice_drvdata(filp)); 86 } 87 = 88 /** > 89 * Creates a mapping of the reserved memory region in a user address= space. 90 */ 91 static int open_dice_mmap(struct file *filp, struct vm_area_struct *= vma) 92 { 93 struct open_dice_drvdata *drvdata =3D to_open_dice_drvdata(filp); 94 = 95 /* Do not allow userspace to modify the underlying data. */ 96 if ((vma->vm_flags & VM_WRITE) && (vma->vm_flags & VM_SHARED)) 97 return -EPERM; 98 = 99 /* Create write-combine mapping so all clients observe a wipe. */ 100 vma->vm_page_prot =3D pgprot_writecombine(vma->vm_page_prot); 101 vma->vm_flags |=3D VM_DONTCOPY | VM_DONTDUMP; 102 return vm_iomap_memory(vma, drvdata->rmem->base, drvdata->rmem->siz= e); 103 } 104 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============7618025320792953362==--