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  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:   Thu, 13 Aug 2020 00:35:18 +0800
From:   kernel test robot <lkp@...el.com>
To:     Valentin Schneider <valentin.schneider@....com>,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Cc:     kbuild-all@...ts.01.org, mingo@...nel.org, peterz@...radead.org,
        vincent.guittot@...aro.org, dietmar.eggemann@....com,
        morten.rasmussen@....com, Quentin Perret <qperret@...gle.com>
Subject: Re: [PATCH v5 06/17] sched/debug: Output SD flag names rather than
 their values

Hi Valentin,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on tip/sched/core]
[also build test WARNING on tip/auto-latest linux/master linus/master v5.8 next-20200812]
[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/Valentin-Schneider/sched-Instrument-sched-domain-flags/20200812-205638
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 949bcb8135a96a6923e676646bd29cbe69e8350f
config: i386-randconfig-s001-20200811 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.2-168-g9554805c-dirty
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 

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


sparse warnings: (new ones prefixed by >>)

   kernel/sched/debug.c:327:9: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct sched_domain *[assigned] sd @@     got struct sched_domain [noderef] __rcu *parent @@
   kernel/sched/debug.c:327:9: sparse:     expected struct sched_domain *[assigned] sd
   kernel/sched/debug.c:327:9: sparse:     got struct sched_domain [noderef] __rcu *parent
   kernel/sched/debug.c:334:9: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct sched_domain *[assigned] sd @@     got struct sched_domain [noderef] __rcu *parent @@
   kernel/sched/debug.c:334:9: sparse:     expected struct sched_domain *[assigned] sd
   kernel/sched/debug.c:334:9: sparse:     got struct sched_domain [noderef] __rcu *parent
   kernel/sched/debug.c:486:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/debug.c:486:22: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/debug.c:486:22: sparse:    struct task_struct *
   kernel/sched/debug.c:694:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct task_struct *tsk @@     got struct task_struct [noderef] __rcu *curr @@
   kernel/sched/debug.c:694:9: sparse:     expected struct task_struct *tsk
   kernel/sched/debug.c:694:9: sparse:     got struct task_struct [noderef] __rcu *curr
   kernel/sched/debug.c:694:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct task_struct *tsk @@     got struct task_struct [noderef] __rcu *curr @@
   kernel/sched/debug.c:694:9: sparse:     expected struct task_struct *tsk
   kernel/sched/debug.c:694:9: sparse:     got struct task_struct [noderef] __rcu *curr
>> kernel/sched/debug.c:279:17: sparse: sparse: non size-preserving pointer to integer cast
>> kernel/sched/debug.c:279:17: sparse: sparse: non size-preserving integer to pointer cast

vim +279 kernel/sched/debug.c

   247	
   248	static int sd_ctl_doflags(struct ctl_table *table, int write,
   249			      void *buffer, size_t *lenp, loff_t *ppos)
   250	{
   251		unsigned long flags = *(unsigned long *)table->data;
   252		size_t data_size = 0;
   253		size_t len = 0;
   254		char *tmp;
   255		int idx;
   256	
   257		if (write)
   258			return 0;
   259	
   260		for_each_set_bit(idx, &flags, __SD_FLAG_CNT) {
   261			char *name = sd_flag_debug[idx].name;
   262	
   263			/* Name plus whitespace */
   264			data_size += strlen(name) + 1;
   265		}
   266	
   267		if (*ppos > data_size) {
   268			*lenp = 0;
   269			return 0;
   270		}
   271	
   272		tmp = kcalloc(data_size + 1, sizeof(tmp), GFP_KERNEL);
   273		for_each_set_bit(idx, &flags, __SD_FLAG_CNT) {
   274			char *name = sd_flag_debug[idx].name;
   275	
   276			len += snprintf(tmp + len, strlen(name) + 2, "%s ", name);
   277		}
   278	
 > 279		tmp += *ppos;
   280		len -= *ppos;
   281	
   282		if (len > *lenp)
   283			len = *lenp;
   284		if (len)
   285			memcpy(buffer, tmp, len);
   286		if (len < *lenp) {
   287			((char *)buffer)[len] = '\n';
   288			len++;
   289		}
   290	
   291		*lenp = len;
   292		*ppos += len;
   293	
   294		kfree(tmp);
   295	
   296		return 0;
   297	}
   298	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (35386 bytes)

Powered by blists - more mailing lists