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:   Tue, 28 Mar 2017 21:18:29 -0700
From:   Andi Kleen <ak@...ux.intel.com>
To:     kan.liang@...el.com
Cc:     peterz@...radead.org, tglx@...utronix.de, mingo@...hat.com,
        linux-kernel@...r.kernel.org, bp@...en8.de, acme@...nel.org,
        eranian@...gle.com, jolsa@...nel.org
Subject: Re: [PATCH V4 2/2] perf/x86: add sysfs entry to freeze counter on SMI

> +	if (x86_pmu.attr_freeze_on_smi == val)
> +		return count;
> +
> +	mutex_lock(&freeze_on_smi_mutex);

I don't think the mutex is really needed, but if it was it would 
need to include the previous check too to be atomic.

> +
> +	get_online_cpus();
> +
> +	flip_smm_bit(&val);
> +	smp_call_function(flip_smm_bit, &val, 1);
> +
> +	put_online_cpus();

This is on_each_cpu() 

> +
> +	x86_pmu.attr_freeze_on_smi = val;
> +
> +	mutex_unlock(&freeze_on_smi_mutex);


-Andi

Powered by blists - more mailing lists