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: <a86e72d1-1a1d-4348-9e2d-34b799571518@arm.com>
Date: Fri, 25 Apr 2025 16:56:15 +0100
From: James Morse <james.morse@....com>
To: "Shaopeng Tan (Fujitsu)" <tan.shaopeng@...itsu.com>,
 "x86@...nel.org" <x86@...nel.org>,
 "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Cc: Reinette Chatre <reinette.chatre@...el.com>,
 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"
 <shameerali.kolothum.thodi@...wei.com>,
 D Scott Phillips OS <scott@...amperecomputing.com>,
 "carl@...amperecomputing.com" <carl@...amperecomputing.com>,
 "lcherian@...vell.com" <lcherian@...vell.com>,
 "bobo.shaobowang@...wei.com" <bobo.shaobowang@...wei.com>,
 "baolin.wang@...ux.alibaba.com" <baolin.wang@...ux.alibaba.com>,
 Jamie Iles <quic_jiles@...cinc.com>, Xin Hao <xhao@...ux.alibaba.com>,
 "peternewman@...gle.com" <peternewman@...gle.com>,
 "dfustini@...libre.com" <dfustini@...libre.com>,
 "amitsinght@...vell.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" <fenghuay@...dia.com>
Subject: Re: [PATCH v8 02/21] x86/resctrl: Remove the limit on the number of
 CLOSID

Hi Shaopeng Tan,

On 25/04/2025 03:56, Shaopeng Tan (Fujitsu) wrote:
>> From: Amit Singh Tomar <amitsinght@...vell.com>
>>
>> Resctrl allocates and finds free CLOSID values using the bits of a u32.
>> This restricts the number of control groups that can be created by user-space.
>>
>> MPAM has an architectural limit of 2^16 CLOSID values, Intel x86 could be
>> extended beyond 32 values. There is at least one MPAM platform which
>> supports more than 32 CLOSID values.
>>
>> Replace the fixed size bitmap with calls to the bitmap API to allocate an array of
>> a sufficient size.
>>
>> ffs() returns '1' for bit 0, hence the existing code subtracts 1 from the index to
>> get the CLOSID value. find_first_bit() returns the bit number which does not
>> need adjusting.

>> diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c
>> b/arch/x86/kernel/cpu/resctrl/rdtgroup.c
>> index 776c8e347654..4e0308040c6e 100644
>> --- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c
>> +++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c

>> @@ -2765,20 +2775,22 @@ static int rdt_get_tree(struct fs_context *fc)
>>  		goto out_ctx;
>>  	}

> Not relevant to this patch, but some of the code around here needs improvement. Maybe consider fixing it together?

>        ret = schemata_list_create();
>        if (ret) {
> -              schemata_list_destroy();
> -              goto out_ctx;
> +             goto out_schemata_free;
>        }

Hmmm, that doesn't make a difference, but it does save a line. As I'm not changing that
code in this series, I don't want to touch it as part of this series. (its already getting
too big!)

It got written like that because list_create() doesn't do all the cleanup when it fails,
this makes it the odd one out..

If you think this version is better, please send a patch!


Thanks,

James

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ