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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 12 Nov 2021 17:02:13 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Stephane Eranian <eranian@...gle.com>
Cc:     linux-kernel@...r.kernel.org, kim.phillips@....com,
        acme@...hat.com, jolsa@...hat.com, songliubraving@...com,
        mpe@...erman.id.au, maddy@...ux.ibm.com
Subject: Re: [PATCH v2 03/13] perf/x86/amd: add AMD Fam19h Branch Sampling
 support

On Thu, Nov 11, 2021 at 12:44:05AM -0800, Stephane Eranian wrote:
> diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c
> index 38b2c779146f..28559557f966 100644
> --- a/arch/x86/events/core.c
> +++ b/arch/x86/events/core.c
> @@ -683,11 +683,16 @@ void x86_pmu_disable_all(void)
>  
>  		if (!test_bit(idx, cpuc->active_mask))
>  			continue;
> +
> +		if (is_amd_brs(hwc))
> +			amd_brs_disable();
> +
>  		rdmsrl(x86_pmu_config_addr(idx), val);
>  		if (!(val & ARCH_PERFMON_EVENTSEL_ENABLE))
>  			continue;
>  		val &= ~ARCH_PERFMON_EVENTSEL_ENABLE;
>  		wrmsrl(x86_pmu_config_addr(idx), val);
> +
>  		if (is_counter_pair(hwc))
>  			wrmsrl(x86_pmu_config_addr(idx + 1), 0);
>  	}

Please, stick that in amd_pmu_disable_all().

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ