Re: [PATCH v12 09/13] x86/sgx: EPC page allocation routines

From: Borislav Petkov
Date: Wed Jul 04 2018 - 00:26:05 EST


On Tue, Jul 03, 2018 at 10:41:14PM +0200, Thomas Gleixner wrote:
> On Tue, 3 Jul 2018, Jarkko Sakkinen wrote:
> >
> > +#define SGX_NR_TO_SCAN 16
> > +#define SGX_NR_LOW_PAGES 32
> > +#define SGX_NR_HIGH_PAGES 64
> > +
> > bool sgx_enabled __ro_after_init;
> > EXPORT_SYMBOL(sgx_enabled);
> > bool sgx_lc_enabled __ro_after_init;
> > EXPORT_SYMBOL(sgx_lc_enabled);
> > +LIST_HEAD(sgx_active_page_list);
> > +EXPORT_SYMBOL(sgx_active_page_list);
> > +DEFINE_SPINLOCK(sgx_active_page_list_lock);
> > +EXPORT_SYMBOL(sgx_active_page_list_lock);
>
> Why is all of this exported. If done right then no call site has to fiddle
> with the list and the lock at all.

... and also, why are the other exports not EXPORT_SYMBOL_GPL?

--
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.