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>] [day] [month] [year] [list]
Message-ID: <202211041643.J58xvn1k-lkp@intel.com>
Date:   Fri, 4 Nov 2022 16:31:47 +0800
From:   kernel test robot <lkp@...el.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
        linux-kernel@...r.kernel.org, x86@...nel.org,
        Ravi Bangoria <ravi.bangoria@....com>
Subject: [tip:perf/core 1/2] kernel/events/core.c:11252:4: warning: cast from
 'int (*)(struct perf_cpu_pmu_context *)' to 'remote_function_f' (aka 'int
 (*)(void *)') converts to incompatible function type

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf/core
head:   571f97f7d51fa81e6cc0e00f0f6314792ce533a3
commit: bd27568117664b8b3e259721393df420ed51f57b [1/2] perf: Rewrite core context handling
config: powerpc-randconfig-r002-20221104
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 2bbafe04fe785a9469bea5a3737f8d7d3ce4aca2)
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 powerpc cross compiling tool for clang build
        # apt-get install binutils-powerpc-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=bd27568117664b8b3e259721393df420ed51f57b
        git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
        git fetch --no-tags tip perf/core
        git checkout bd27568117664b8b3e259721393df420ed51f57b
        # 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=powerpc SHELL=/bin/bash kernel/events/

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

All warnings (new ones prefixed by >>):

   kernel/events/core.c:4218:29: warning: variable 'task_ctx' set but not used [-Wunused-but-set-variable]
           struct perf_event_context *task_ctx = NULL;
                                      ^
>> kernel/events/core.c:11252:4: warning: cast from 'int (*)(struct perf_cpu_pmu_context *)' to 'remote_function_f' (aka 'int (*)(void *)') converts to incompatible function type [-Wcast-function-type-strict]
                           (remote_function_f)perf_mux_hrtimer_restart, cpc);
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   2 warnings generated.


vim +11252 kernel/events/core.c

 11221	
 11222	static ssize_t
 11223	perf_event_mux_interval_ms_store(struct device *dev,
 11224					 struct device_attribute *attr,
 11225					 const char *buf, size_t count)
 11226	{
 11227		struct pmu *pmu = dev_get_drvdata(dev);
 11228		int timer, cpu, ret;
 11229	
 11230		ret = kstrtoint(buf, 0, &timer);
 11231		if (ret)
 11232			return ret;
 11233	
 11234		if (timer < 1)
 11235			return -EINVAL;
 11236	
 11237		/* same value, noting to do */
 11238		if (timer == pmu->hrtimer_interval_ms)
 11239			return count;
 11240	
 11241		mutex_lock(&mux_interval_mutex);
 11242		pmu->hrtimer_interval_ms = timer;
 11243	
 11244		/* update all cpuctx for this PMU */
 11245		cpus_read_lock();
 11246		for_each_online_cpu(cpu) {
 11247			struct perf_cpu_pmu_context *cpc;
 11248			cpc = per_cpu_ptr(pmu->cpu_pmu_context, cpu);
 11249			cpc->hrtimer_interval = ns_to_ktime(NSEC_PER_MSEC * timer);
 11250	
 11251			cpu_function_call(cpu,
 11252				(remote_function_f)perf_mux_hrtimer_restart, cpc);
 11253		}
 11254		cpus_read_unlock();
 11255		mutex_unlock(&mux_interval_mutex);
 11256	
 11257		return count;
 11258	}
 11259	static DEVICE_ATTR_RW(perf_event_mux_interval_ms);
 11260	

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

View attachment "config" of type "text/plain" (138015 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ