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, 8 Mar 2016 11:36:58 -0800 (PST)
From:	Vikas Shivappa <vikas.shivappa@...el.com>
To:	Thomas Gleixner <tglx@...utronix.de>
cc:	Vikas Shivappa <vikas.shivappa@...el.com>,
	Vikas Shivappa <vikas.shivappa@...ux.intel.com>,
	linux-kernel@...r.kernel.org, x86@...nel.org, hpa@...or.com,
	mingo@...nel.org, peterz@...radead.org, ravi.v.shankar@...el.com,
	tony.luck@...el.com, fenghua.yu@...el.com, h.peter.anvin@...el.com
Subject: Re: [PATCH 3/6] x86/mbm: Intel Memory B/W Monitoring enumeration
 and init



On Tue, 8 Mar 2016, Thomas Gleixner wrote:

> On Thu, 3 Mar 2016, Thomas Gleixner wrote:
>> On Thu, 3 Mar 2016, Vikas Shivappa wrote:
>>
>>>
>>>
>>> On Wed, 2 Mar 2016, Thomas Gleixner wrote:
>>>
>>>> On Wed, 2 Mar 2016, Vikas Shivappa wrote:
>>>>> +	if (cqm_enabled && mbm_enabled)
>>>>> +		intel_cqm_events_group.attrs = intel_cmt_mbm_events_attr;
>>>>> +	else if (!cqm_enabled && mbm_enabled)
>>>>> +		intel_cqm_events_group.attrs = intel_mbm_events_attr;
>>>>> +	else if (cqm_enabled && !mbm_enabled)
>>>>> +		intel_cqm_events_group.attrs = intel_cqm_events_attr;
>>>>> +
>>>>>  	ret = perf_pmu_register(&intel_cqm_pmu, "intel_cqm", -1);
>>>>>  	if (ret) {
>>>>>  		pr_err("Intel CQM perf registration failed: %d\n", ret);
>>>>>  		goto out;
>>>>
>>>> So what cleans up mbm_local and mbm_total in that case?
>>>
>>> I put all the cleanup code in the cqm_cleanup .. - please see copy below
>>
>> Ok, missed that.
>>
>>> @@ -1331,6 +1427,39 @@ static void cqm_cleanup(void)
>>>                 kfree(cqm_rmid_ptrs[r]);
>>>
>>>         kfree(cqm_rmid_ptrs);
>>> +       kfree(mbm_local);
>>> +       kfree(mbm_total);
>>> +       mbm_enabled = false;
>>> +       cqm_enabled = false;
>>> +}
>
> After looking at it closely, you really need a separate mbm_cleanup()
> function, so you can utilize it from mbm_init() and in the exit path.

Will fix and seperate the mbm and cqm cleanups..

Thanks,
Vikas

>
> Thanks,
>
> 	tglx
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ