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]
Message-ID: <1faaddcd-7d1f-4dfe-9927-802639074476@intel.com>
Date: Wed, 7 May 2025 10:23:32 -0700
From: Reinette Chatre <reinette.chatre@...el.com>
To: James Morse <james.morse@....com>, <x86@...nel.org>,
	<linux-kernel@...r.kernel.org>
CC: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
	Borislav Petkov <bp@...en8.de>, H Peter Anvin <hpa@...or.com>, Babu Moger
	<Babu.Moger@....com>, <shameerali.kolothum.thodi@...wei.com>, "D Scott
 Phillips OS" <scott@...amperecomputing.com>, <carl@...amperecomputing.com>,
	<lcherian@...vell.com>, <bobo.shaobowang@...wei.com>,
	<tan.shaopeng@...itsu.com>, <baolin.wang@...ux.alibaba.com>, Jamie Iles
	<quic_jiles@...cinc.com>, Xin Hao <xhao@...ux.alibaba.com>,
	<peternewman@...gle.com>, <dfustini@...libre.com>, <amitsinght@...vell.com>,
	David Hildenbrand <david@...hat.com>, Rex Nie <rex.nie@...uarmicro.com>,
	"Dave Martin" <dave.martin@....com>, Koba Ko <kobak@...dia.com>, Shanker
 Donthineni <sdonthineni@...dia.com>, <fenghuay@...dia.com>, Shaopeng Tan
	<tan.shaopeng@...fujitsu.com>, Tony Luck <tony.luck@...el.com>
Subject: Re: [PATCH v9 04/27] x86/resctrl: resctrl_exit() teardown resctrl but
 leave the mount point

Hi James,

On 5/7/25 9:48 AM, James Morse wrote:
> Hi Reinette,
> 
> On 01/05/2025 18:03, Reinette Chatre wrote:
>> On 4/25/25 10:37 AM, James Morse wrote:
>>> @@ -4432,23 +4445,42 @@ static bool __exit resctrl_online_domains_exist(void)
>>>  	return false;
>>>  }
>>>  
>>> -/*
>>> +/**
> 
>> Why make the switch to kernel-doc now? The benefit is not clear considering
>> resctrl_init() is not using kernel-doc.
> 
> Just the ratcheting of 'add a comment' eventually leading to 'put it in kernel-doc'
> once the comment becomes sufficiently long.

I see. Not something to pick on since resctrl surely is not consistent in this regard.

>>> + * from all resctrl_arch_ functions that can do this.
>>> + * resctrl_arch_get_resource() must continue to return struct rdt_resources
>>> + * with the correct rid field to ensure the filesystem can be unmounted.
> 
>> Is this to get through set_mba_sc() and the for_each_alloc_capable_rdt_resource(r)
>> loop in rdt_kill_sb() or is there something more subtle?
> 
> The for_each walkers, which may also get used by the arch code. I don't have an example of
> where this would go wrong, but felt it was worth noting that resctrl_arch_get_resource()
> should not return NULL for all possible resources in this case - resctrl doesn't expect
> that for any entry in the enum. Adding that error handling was too noisy, given that today
> x86 has all the resources.

I see. I also find resctrl_arch_get_resource()'s comment in include/linux/resctrl.h 
supportive of this. Having the extra note here is enforces this requirement.

> 
> Tony suggested that get changed to searching a list if the list of possible resources
> starts to grow.
> 

ack.

Reinette


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ