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: Mon, 08 Apr 2024 23:23:21 -0500
From: "Haitao Huang" <haitao.huang@...ux.intel.com>
To: "hpa@...or.com" <hpa@...or.com>, "tim.c.chen@...ux.intel.com"
 <tim.c.chen@...ux.intel.com>, "linux-sgx@...r.kernel.org"
 <linux-sgx@...r.kernel.org>, "x86@...nel.org" <x86@...nel.org>,
 "dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
 "jarkko@...nel.org" <jarkko@...nel.org>, "cgroups@...r.kernel.org"
 <cgroups@...r.kernel.org>, "linux-kernel@...r.kernel.org"
 <linux-kernel@...r.kernel.org>, "mkoutny@...e.com" <mkoutny@...e.com>,
 "tglx@...utronix.de" <tglx@...utronix.de>, "Mehta, Sohil"
 <sohil.mehta@...el.com>, "tj@...nel.org" <tj@...nel.org>, "mingo@...hat.com"
 <mingo@...hat.com>, "bp@...en8.de" <bp@...en8.de>, "Huang, Kai"
 <kai.huang@...el.com>
Cc: "mikko.ylinen@...ux.intel.com" <mikko.ylinen@...ux.intel.com>,
 "seanjc@...gle.com" <seanjc@...gle.com>, "anakrish@...rosoft.com"
 <anakrish@...rosoft.com>, "Zhang, Bo" <zhanb@...rosoft.com>,
 "kristen@...ux.intel.com" <kristen@...ux.intel.com>, "yangjie@...rosoft.com"
 <yangjie@...rosoft.com>, "Li, Zhiquan1" <zhiquan1.li@...el.com>,
 "chrisyan@...rosoft.com" <chrisyan@...rosoft.com>
Subject: Re: [PATCH v10 12/14] x86/sgx: Turn on per-cgroup EPC reclamation

On Mon, 08 Apr 2024 17:37:10 -0500, Huang, Kai <kai.huang@...el.com> wrote:

>
>
> On 9/04/2024 6:03 am, Haitao Huang wrote:
>>>>
>>  The misc root cgroup is a static similar to sgx_cg_root. So  
>> misc_cg_root()  won't be NULL
>> However, based on how css_misc() was check NULL, I suppose  
>> sgx_get_current_cg() may be NULL when cgroup is disabled (again not  
>> 100% sure but we handle it anyway)
>
> Could you help to check?  Sorry I am busy on something else thus won't  
> be able to do any actual check.
>
It's always non-NULL based on testing.

It's hard for me to say definitely by reading the code. But IIUC  
cgroup_disable command-line only blocks operations in /sys/fs/cgroup so  
user space can't set up controllers and config limits, etc., for the  
diasabled ones. Each task->cgroups would still have a non-NULL pointer to  
the static root object for each cgroup that is enabled by KConfig, so  
get_current_misc_cg() thus  sgx_get_current_cg() should not return NULL  
regardless 'cgroup_disable=misc'.

Maybe @Michal or @tj can confirm?

Thanks
Haitao


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ