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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 11 Mar 2021 13:19:14 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     kan.liang@...ux.intel.com
Cc:     mingo@...nel.org, linux-kernel@...r.kernel.org, acme@...nel.org,
        tglx@...utronix.de, bp@...en8.de, namhyung@...nel.org,
        jolsa@...hat.com, ak@...ux.intel.com, yao.jin@...ux.intel.com,
        alexander.shishkin@...ux.intel.com, adrian.hunter@...el.com
Subject: Re: [PATCH V2 16/25] perf/x86: Register hybrid PMUs

On Wed, Mar 10, 2021 at 08:37:52AM -0800, kan.liang@...ux.intel.com wrote:
> @@ -4420,6 +4513,27 @@ void intel_cpuc_finish(struct cpu_hw_events *cpuc)
>  static void intel_pmu_cpu_dead(int cpu)
>  {
>  	intel_cpuc_finish(&per_cpu(cpu_hw_events, cpu));
> +
> +	if (is_hybrid()) {
> +		struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu);
> +		struct x86_hybrid_pmu *hybrid_pmu = NULL;
> +		int i;
> +
> +		for (i = 0; i < x86_pmu.num_hybrid_pmus; i++) {
> +			if (cpumask_test_and_clear_cpu(cpu, &x86_pmu.hybrid_pmu[i].supported_cpus)) {
> +				hybrid_pmu = &x86_pmu.hybrid_pmu[i];
> +				break;
> +			}
> +		}
> +		if (WARN_ON_ONCE(!hybrid_pmu))
> +			return;
> +
> +		cpuc->pmu = NULL;
> +		if (cpumask_empty(&hybrid_pmu->supported_cpus)) {
> +			perf_pmu_unregister(&hybrid_pmu->pmu);
> +			hybrid_pmu->pmu.type = -1;
> +		}
> +	}
>  }

CPU_DEAD is the part of hotplug after we've disabled IRQs for the last
time and before we kill ourselves, and you're trying to use mutexes
again!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ