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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202106272217.smfprcHM-lkp@intel.com>
Date:   Sun, 27 Jun 2021 22:28:26 +0800
From:   kernel test robot <lkp@...el.com>
To:     Julian Braha <julianbraha@...il.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linux Memory Management List <linux-mm@...ck.org>
Subject: arch/csky/kernel/perf_event.c:878:6: sparse: sparse: symbol
 'csky_pmu_event_set_period' was not declared. Should it be static?

Hi Stephen,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   625acffd7ae2c52898d249e6c5c39f348db0d8df
commit: 7d37cb2c912dc5c25ffac784a4f9b98c06c6bd08 lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS
date:   3 months ago
config: csky-randconfig-s032-20210627 (attached as .config)
compiler: csky-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7d37cb2c912dc5c25ffac784a4f9b98c06c6bd08
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 7d37cb2c912dc5c25ffac784a4f9b98c06c6bd08
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=csky SHELL=/bin/bash

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 >>)
>> arch/csky/kernel/perf_event.c:878:6: sparse: sparse: symbol 'csky_pmu_event_set_period' was not declared. Should it be static?
>> arch/csky/kernel/perf_event.c:1178:34: sparse: sparse: incorrect type in argument 4 (different address spaces) @@     expected void [noderef] __percpu *percpu_dev_id @@     got struct pmu_hw_events * @@
   arch/csky/kernel/perf_event.c:1178:34: sparse:     expected void [noderef] __percpu *percpu_dev_id
   arch/csky/kernel/perf_event.c:1178:34: sparse:     got struct pmu_hw_events *
>> arch/csky/kernel/perf_event.c:1195:38: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __percpu * @@     got struct pmu_hw_events * @@
   arch/csky/kernel/perf_event.c:1195:38: sparse:     expected void [noderef] __percpu *
   arch/csky/kernel/perf_event.c:1195:38: sparse:     got struct pmu_hw_events *
>> arch/csky/kernel/perf_event.c:1293:5: sparse: sparse: symbol 'csky_pmu_device_probe' was not declared. Should it be static?

vim +/csky_pmu_event_set_period +878 arch/csky/kernel/perf_event.c

f50fd2d8524c15 Guo Ren 2019-01-02  877  
f622fbf205966a Mao Han 2019-06-04 @878  int  csky_pmu_event_set_period(struct perf_event *event)
f622fbf205966a Mao Han 2019-06-04  879  {
f622fbf205966a Mao Han 2019-06-04  880  	struct hw_perf_event *hwc = &event->hw;
f622fbf205966a Mao Han 2019-06-04  881  	s64 left = local64_read(&hwc->period_left);
f622fbf205966a Mao Han 2019-06-04  882  	s64 period = hwc->sample_period;
f622fbf205966a Mao Han 2019-06-04  883  	int ret = 0;
f622fbf205966a Mao Han 2019-06-04  884  
f622fbf205966a Mao Han 2019-06-04  885  	if (unlikely(left <= -period)) {
f622fbf205966a Mao Han 2019-06-04  886  		left = period;
f622fbf205966a Mao Han 2019-06-04  887  		local64_set(&hwc->period_left, left);
f622fbf205966a Mao Han 2019-06-04  888  		hwc->last_period = period;
f622fbf205966a Mao Han 2019-06-04  889  		ret = 1;
f622fbf205966a Mao Han 2019-06-04  890  	}
f622fbf205966a Mao Han 2019-06-04  891  
f622fbf205966a Mao Han 2019-06-04  892  	if (unlikely(left <= 0)) {
f622fbf205966a Mao Han 2019-06-04  893  		left += period;
f622fbf205966a Mao Han 2019-06-04  894  		local64_set(&hwc->period_left, left);
f622fbf205966a Mao Han 2019-06-04  895  		hwc->last_period = period;
f622fbf205966a Mao Han 2019-06-04  896  		ret = 1;
f622fbf205966a Mao Han 2019-06-04  897  	}
f622fbf205966a Mao Han 2019-06-04  898  
f622fbf205966a Mao Han 2019-06-04  899  	if (left > (s64)csky_pmu.max_period)
f622fbf205966a Mao Han 2019-06-04  900  		left = csky_pmu.max_period;
f622fbf205966a Mao Han 2019-06-04  901  
f622fbf205966a Mao Han 2019-06-04  902  	/*
f622fbf205966a Mao Han 2019-06-04  903  	 * The hw event starts counting from this event offset,
f622fbf205966a Mao Han 2019-06-04  904  	 * mark it to be able to extract future "deltas":
f622fbf205966a Mao Han 2019-06-04  905  	 */
f622fbf205966a Mao Han 2019-06-04  906  	local64_set(&hwc->prev_count, (u64)(-left));
f622fbf205966a Mao Han 2019-06-04  907  
f622fbf205966a Mao Han 2019-06-04  908  	if (hw_raw_write_mapping[hwc->idx] != NULL)
f622fbf205966a Mao Han 2019-06-04  909  		hw_raw_write_mapping[hwc->idx]((u64)(-left) &
f622fbf205966a Mao Han 2019-06-04  910  						csky_pmu.max_period);
f622fbf205966a Mao Han 2019-06-04  911  
f622fbf205966a Mao Han 2019-06-04  912  	cpwcr(HPOFSR, ~BIT(hwc->idx) & cprcr(HPOFSR));
f622fbf205966a Mao Han 2019-06-04  913  
f622fbf205966a Mao Han 2019-06-04  914  	perf_event_update_userpage(event);
f622fbf205966a Mao Han 2019-06-04  915  
f622fbf205966a Mao Han 2019-06-04  916  	return ret;
f622fbf205966a Mao Han 2019-06-04  917  }
f622fbf205966a Mao Han 2019-06-04  918  

:::::: The code at line 878 was first introduced by commit
:::::: f622fbf205966a8e911f81a00db17997dd171404 csky: Add pmu interrupt support

:::::: TO: Mao Han <han_mao@...ky.com>
:::::: CC: Guo Ren <ren_guo@...ky.com>

---
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" (32889 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ