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] [day] [month] [year] [list]
Message-ID: <f4e77744-cb32-4cea-a23f-3cd1a2ae9d79@arm.com>
Date: Tue, 13 Jan 2026 17:18:19 +0000
From: Ben Horgan <ben.horgan@....com>
To: Zeng Heng <zengheng4@...wei.com>, jonathan.cameron@...wei.com
Cc: amitsinght@...vell.com, baisheng.gao@...soc.com,
 baolin.wang@...ux.alibaba.com, carl@...amperecomputing.com,
 catalin.marinas@....com, corbet@....net, dave.martin@....com,
 david@...nel.org, dfustini@...libre.com, fenghuay@...dia.com,
 gshan@...hat.com, james.morse@....com, joey.gouly@....com, kobak@...dia.com,
 kvmarm@...ts.linux.dev, lcherian@...vell.com,
 linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
 maz@...nel.org, oupton@...nel.org, peternewman@...gle.com,
 punit.agrawal@....qualcomm.com, quic_jiles@...cinc.com,
 reinette.chatre@...el.com, rohit.mathew@....com,
 scott@...amperecomputing.com, sdonthineni@...dia.com,
 suzuki.poulose@....com, tan.shaopeng@...itsu.com, will@...nel.org,
 xhao@...ux.alibaba.com, wangkefeng.wang@...wei.com
Subject: Re: [PATCH v2 18/45] arm_mpam: resctrl: Implement
 resctrl_arch_reset_all_ctrls()

Hi Zeng,

On 1/9/26 03:45, Zeng Heng wrote:
>> From: James Morse <james.morse@....com>
>> Date: Fri, 5 Dec 2025 21:58:32 +0000
>> Subject: [PATCH v2 18/45] arm_mpam: resctrl: Implement resctrl_arch_reset_all_ctrls()
>>
>> We already have a helper for resetting an mpam class and component.  Hook
>> it up to resctrl_arch_reset_all_ctrls() and the domain offline path.
>>
>> Signed-off-by: James Morse <james.morse@....com>
>> Signed-off-by: Ben Horgan <ben.horgan@....com>
>> ---
>>  drivers/resctrl/mpam_devices.c  |  6 +++---
>>  drivers/resctrl/mpam_internal.h |  7 +++++++
>>  drivers/resctrl/mpam_resctrl.c  | 15 +++++++++++++++
>>  3 files changed, 25 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/resctrl/mpam_resctrl.c b/drivers/resctrl/mpam_resctrl.c
>> index bc4f1c80eab..d32e8700245 100644
>> --- a/drivers/resctrl/mpam_resctrl.c
>> +++ b/drivers/resctrl/mpam_resctrl.c
>> @@ -353,6 +366,8 @@ void mpam_resctrl_offline_cpu(unsigned int cpu)
>>
>>  		ctrl_dom_empty = true;
>>  		if (exposed_alloc_capable) {
>> +			mpam_reset_component_locked(dom->ctrl_comp);
>> +
>>  			ctrl_d = &dom->resctrl_ctrl_dom;
>>  			ctrl_dom_empty = mpam_resctrl_offline_domain_hdr(cpu, &ctrl_d->hdr);
>>  			if (ctrl_dom_empty)
> 
> mpam_cpu_offline() already directly calls mpam_reset_ris() to reset the
> MPAM MSC that is about to go offline. So why here still need
> mpam_resctrl_offline_cpu() to invoke mpam_reset_component_locked(),
> which ends up calling mpam_reset_ris() again?
> 
> Please point it out if I might have overlooked anything, thank you.

Yeah, this doesn't look right. A component will usually have affinity
with more than one cpu and if we weren't doing the reset elsewhere we
should only be doing the component level reset when the last of those
cpus goes offline. I'll give this cpu offline/online code another look over.

> 
> 
> Best Regards,
> Zeng Heng
> 

Thanks,

Ben


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ