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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 28 Sep 2021 06:01:38 +0300 From: Jarkko Sakkinen <jarkko@...nel.org> To: Reinette Chatre <reinette.chatre@...el.com>, Dave Hansen <dave.hansen@...ux.intel.com>, Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>, x86@...nel.org, "H. Peter Anvin" <hpa@...or.com>, Jonathan Corbet <corbet@....net> Cc: linux-sgx@...r.kernel.org, linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org Subject: Re: [PATCH v5 2/2] x86/sgx: Add an attribute for the amount of SGX memory in a NUMA node On Thu, 2021-09-23 at 13:39 -0700, Reinette Chatre wrote: > Hi Jarkko, > > On 9/23/2021 1:30 PM, Jarkko Sakkinen wrote: > > So cat you pick these patches to your patch set, and squash > > this fix to it? > > My patch set is focused on SGX selftests while this series target the > x86 tree. I assumed that this series would go into x86 separately and > after they land we can proceed with the SGX selftest work. But now your series has no chance to be applied, given that it contains patches which have discarded given a superior approach. Anyway, node fields are initialized here: if (!node_isset(nid, sgx_numa_mask)) { spin_lock_init(&sgx_numa_nodes[nid].lock); INIT_LIST_HEAD(&sgx_numa_nodes[nid].free_page_list); node_set(nid, sgx_numa_mask); } The correct way to fix the issue is to add sgx_numa_nodes[nid].size = 0; Using kcalloc() would not be very sound, since you would wastefully initialize the pre-existing fields of the struct two times: first with zeros, and then with "real" values. /Jarkko
Powered by blists - more mailing lists