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]
Date:   Thu, 13 Oct 2022 23:30:17 +0800
From:   kernel test robot <lkp@...el.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org, Ravi Bangoria <ravi.bangoria@....com>
Subject: [peterz-queue:perf/core 5/6] drivers/perf/arm_pmu.c:888:14: error:
 incompatible function pointer types initializing 'bool (*)(struct pmu *,
 int)' (aka '_Bool (*)(struct pmu *, int)') with an expression of type 'int
 (struct perf_event *)'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git perf/core
head:   a7560340a5a83514ad5117aec2c770956e1813f3
commit: aab8cdf010eb30b0214da37cb770b4f965637a97 [5/6] perf: Rewrite core context handling
config: arm-buildonly-randconfig-r006-20221012
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920)
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://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?id=aab8cdf010eb30b0214da37cb770b4f965637a97
        git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
        git fetch --no-tags peterz-queue perf/core
        git checkout aab8cdf010eb30b0214da37cb770b4f965637a97
        # 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 drivers/

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 >>):

>> drivers/perf/arm_pmu.c:888:14: error: incompatible function pointer types initializing 'bool (*)(struct pmu *, int)' (aka '_Bool (*)(struct pmu *, int)') with an expression of type 'int (struct perf_event *)' [-Wincompatible-function-pointer-types]
                   .filter         = armpmu_filter,
                                     ^~~~~~~~~~~~~
   1 error generated.


vim +888 drivers/perf/arm_pmu.c

   863	
   864	static struct arm_pmu *__armpmu_alloc(gfp_t flags)
   865	{
   866		struct arm_pmu *pmu;
   867		int cpu;
   868	
   869		pmu = kzalloc(sizeof(*pmu), flags);
   870		if (!pmu)
   871			goto out;
   872	
   873		pmu->hw_events = alloc_percpu_gfp(struct pmu_hw_events, flags);
   874		if (!pmu->hw_events) {
   875			pr_info("failed to allocate per-cpu PMU data.\n");
   876			goto out_free_pmu;
   877		}
   878	
   879		pmu->pmu = (struct pmu) {
   880			.pmu_enable	= armpmu_enable,
   881			.pmu_disable	= armpmu_disable,
   882			.event_init	= armpmu_event_init,
   883			.add		= armpmu_add,
   884			.del		= armpmu_del,
   885			.start		= armpmu_start,
   886			.stop		= armpmu_stop,
   887			.read		= armpmu_read,
 > 888			.filter		= armpmu_filter,
   889			.attr_groups	= pmu->attr_groups,
   890			/*
   891			 * This is a CPU PMU potentially in a heterogeneous
   892			 * configuration (e.g. big.LITTLE). This is not an uncore PMU,
   893			 * and we have taken ctx sharing into account (e.g. with our
   894			 * pmu::filter callback and pmu::event_init group validation).
   895			 */
   896			.capabilities	= PERF_PMU_CAP_HETEROGENEOUS_CPUS | PERF_PMU_CAP_EXTENDED_REGS,
   897		};
   898	
   899		pmu->attr_groups[ARMPMU_ATTR_GROUP_COMMON] =
   900			&armpmu_common_attr_group;
   901	
   902		for_each_possible_cpu(cpu) {
   903			struct pmu_hw_events *events;
   904	
   905			events = per_cpu_ptr(pmu->hw_events, cpu);
   906			raw_spin_lock_init(&events->pmu_lock);
   907			events->percpu_pmu = pmu;
   908		}
   909	
   910		return pmu;
   911	
   912	out_free_pmu:
   913		kfree(pmu);
   914	out:
   915		return NULL;
   916	}
   917	

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ