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]
Date:   Fri, 9 Sep 2022 09:12:53 +0800
From:   kernel test robot <lkp@...el.com>
To:     Waiman Long <longman@...hat.com>, Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Juri Lelli <juri.lelli@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
        Daniel Bristot de Oliveira <bristot@...hat.com>,
        Valentin Schneider <vschneid@...hat.com>,
        Tejun Heo <tj@...nel.org>, Zefan Li <lizefan.x@...edance.com>,
        Johannes Weiner <hannes@...xchg.org>,
        Will Deacon <will@...nel.org>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org,
        Lai Jiangshan <jiangshanlai@...il.com>,
        Waiman Long <longman@...hat.com>
Subject: Re: [PATCH v8 4/7] sched: Introduce affinity_context structure

Hi Waiman,

I love your patch! Yet something to improve:

[auto build test ERROR on linux/master]
[also build test ERROR on linus/master v6.0-rc4]
[cannot apply to tip/sched/core tip/master next-20220908]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Waiman-Long/sched-Persistent-user-requested-affinity/20220909-034411
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 506357871c18e06565840d71c2ef9f818e19f460
config: arm-randconfig-r033-20220907 (https://download.01.org/0day-ci/archive/20220909/202209090937.23d2iFjb-lkp@intel.com/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 1546df49f5a6d09df78f569e4137ddb365a3e827)
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/intel-lab-lkp/linux/commit/039ce835b17cfa35f47f3cb5fd4938e57643cb63
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Waiman-Long/sched-Persistent-user-requested-affinity/20220909-034411
        git checkout 039ce835b17cfa35f47f3cb5fd4938e57643cb63
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash kernel/sched/

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

All errors (new ones prefixed by >>):

   kernel/sched/core.c:6602:35: warning: no previous prototype for function 'schedule_user' [-Wmissing-prototypes]
   asmlinkage __visible void __sched schedule_user(void)
                                     ^
   kernel/sched/core.c:6602:22: note: declare 'static' if the function is not intended to be used outside of this translation unit
   asmlinkage __visible void __sched schedule_user(void)
                        ^
                        static 
>> kernel/sched/core.c:8104:40: error: too few arguments to function call, expected 3, have 2
           retval = __set_cpus_allowed_ptr(p, ctx);
                    ~~~~~~~~~~~~~~~~~~~~~~       ^
   kernel/sched/core.c:3555:19: note: '__set_cpus_allowed_ptr' declared here
   static inline int __set_cpus_allowed_ptr(struct task_struct *p,
                     ^
   kernel/sched/core.c:8972:26: warning: unused variable 'ac' [-Wunused-variable]
           struct affinity_context ac;
                                   ^
   2 warnings and 1 error generated.


vim +8104 kernel/sched/core.c

  8079	
  8080	static int
  8081	__sched_setaffinity(struct task_struct *p, struct affinity_context *ctx)
  8082	{
  8083		int retval;
  8084		cpumask_var_t cpus_allowed, new_mask;
  8085	
  8086		if (!alloc_cpumask_var(&cpus_allowed, GFP_KERNEL))
  8087			return -ENOMEM;
  8088	
  8089		if (!alloc_cpumask_var(&new_mask, GFP_KERNEL)) {
  8090			retval = -ENOMEM;
  8091			goto out_free_cpus_allowed;
  8092		}
  8093	
  8094		cpuset_cpus_allowed(p, cpus_allowed);
  8095		cpumask_and(new_mask, ctx->new_mask, cpus_allowed);
  8096	
  8097		ctx->new_mask = new_mask;
  8098		ctx->flags |= SCA_CHECK;
  8099	
  8100		retval = dl_task_check_affinity(p, new_mask);
  8101		if (retval)
  8102			goto out_free_new_mask;
  8103	again:
> 8104		retval = __set_cpus_allowed_ptr(p, ctx);
  8105		if (retval)
  8106			goto out_free_new_mask;
  8107	
  8108		cpuset_cpus_allowed(p, cpus_allowed);
  8109		if (!cpumask_subset(new_mask, cpus_allowed)) {
  8110			/*
  8111			 * We must have raced with a concurrent cpuset update.
  8112			 * Just reset the cpumask to the cpuset's cpus_allowed.
  8113			 */
  8114			cpumask_copy(new_mask, cpus_allowed);
  8115			goto again;
  8116		}
  8117	
  8118	out_free_new_mask:
  8119		free_cpumask_var(new_mask);
  8120	out_free_cpus_allowed:
  8121		free_cpumask_var(cpus_allowed);
  8122		return retval;
  8123	}
  8124	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ