[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YxbD7oWO1D6JmyER@kernel.org>
Date: Tue, 6 Sep 2022 06:52:14 +0300
From: Jarkko Sakkinen <jarkko@...nel.org>
To: Dave Hansen <dave.hansen@...el.com>
Cc: linux-sgx@...r.kernel.org,
Haitao Huang <haitao.huang@...ux.intel.com>,
Vijay Dhanraj <vijay.dhanraj@...el.com>,
Reinette Chatre <reinette.chatre@...el.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Kai Huang <kai.huang@...el.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
"H. Peter Anvin" <hpa@...or.com>,
"open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH RFC] x86/sgx: Use a heap allocated list head for
unsanitized pages
On Mon, Sep 05, 2022 at 08:20:18PM -0700, Dave Hansen wrote:
> On 9/5/22 20:12, Jarkko Sakkinen wrote:
> > Allocate the list head for the unsanitized pages from heap, and transfer
> > its to ownership to ksgxd, which takes care of destroying it. Remove
> > sgx_dirty_page_list, as a global list is no longer required.
> >
> > Signed-off-by: Jarkko Sakkinen <jarkko@...nel.org>
> > ---
> > Depends on https://lore.kernel.org/linux-sgx/20220906000221.34286-1-jarkko@kernel.org/T/#t
> > Would this be plausible?
> > ---
> > arch/x86/kernel/cpu/sgx/main.c | 44 ++++++++++++++++++++++++----------
> > 1 file changed, 31 insertions(+), 13 deletions(-)
>
> What's the benefit? I guess it saves 16 bytes of kernel image for ~20
> lines of code. Does it add more than 16 bytes to kernel text? ;)
That's why I asked, and added RFC. It was so small step that I thought to
try it out.
I agree that it does not save memory for any significant amount but it
does take a bit way from driver global data, which is IMHO most of the
time +1 (simplifies state). Not saying that enough to pick this but
perhaps it will find its place as part of a patch set. By itself it
does not stand, I agree.
BR, Jarkko
Powered by blists - more mailing lists