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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202204231250.LYIILAXn-lkp@intel.com>
Date:   Sat, 23 Apr 2022 12:26:14 +0800
From:   kernel test robot <lkp@...el.com>
To:     Junwen Wu <wudaemon@....com>, akpm@...ux-foundation.org,
        keescook@...omium.org, adobriyan@...il.com, fweimer@...hat.com,
        ddiss@...e.de
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        linux-fsdevel@...r.kernel.org, Junwen Wu <wudaemon@....com>
Subject: Re: [PATCH v1] proc: limit schedstate node write operation

Hi Junwen,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on hnaz-mm/master]
[also build test WARNING on kees/for-next/pstore linus/master linux/master v5.18-rc3 next-20220422]
[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/intel-lab-lkp/linux/commits/Junwen-Wu/proc-limit-schedstate-node-write-operation/20220423-103457
base:   https://github.com/hnaz/linux-mm master
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20220423/202204231250.LYIILAXn-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 11.2.0
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/intel-lab-lkp/linux/commit/e7bc039b7c0aa4e9a5bb3ae2340769a451f795db
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Junwen-Wu/proc-limit-schedstate-node-write-operation/20220423-103457
        git checkout e7bc039b7c0aa4e9a5bb3ae2340769a451f795db
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross W=1 O=build_dir ARCH=alpha SHELL=/bin/bash fs/

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

All warnings (new ones prefixed by >>):

   fs/proc/base.c: In function 'sched_write':
>> fs/proc/base.c:1468:13: warning: 'strcmp' of a string of length 5 and an array of size 5 evaluates to nonzero [-Wstring-compare]
    1468 |         if (strcmp(ubuf, "reset") == 0) {
         |             ^~~~~~~~~~~~~~~~~~~~~


vim +/strcmp +1468 fs/proc/base.c

  1454	
  1455	static ssize_t
  1456	sched_write(struct file *file, const char __user *buf,
  1457		    size_t count, loff_t *offset)
  1458	{
  1459		struct inode *inode = file_inode(file);
  1460		struct task_struct *p;
  1461		char ubuf[5];
  1462	
  1463		memset(ubuf, 0, sizeof(ubuf));
  1464		if (count > 5)
  1465			count = 0;
  1466		if (copy_from_user(ubuf, buf, count))
  1467			return -EFAULT;
> 1468		if (strcmp(ubuf, "reset") == 0) {
  1469			p = get_proc_task(inode);
  1470			if (!p)
  1471				return -ESRCH;
  1472			proc_sched_set_task(p);
  1473	
  1474			put_task_struct(p);
  1475		}
  1476	
  1477		return count;
  1478	}
  1479	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ