Re: [PATCH] x86/coco: export cc_mkenc API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 05, 2022 at 12:27:50PM +0200, Riccardo Schirone wrote:
> Adding Kirill in CC as well.
> 
> On Tue, Apr 05, 2022 at 11:18:57AM +0200, Borislav Petkov wrote:
> > On Tue, Apr 05, 2022 at 09:55:09AM +0200, Riccardo Schirone wrote:
> > > The reason why I thought this change made sense is just because I think the
> > > two operations should be mostly the same and if one can do one operation, he
> > > should be able to access also the other as they are defined in the same header
> > > file.
> > 
> > Does this subthread answer your question:
> > 
> > https://lore.kernel.org/r/87bkzqw1vr.ffs@tglx
> > 
> > ?
> > 
> 
> Not really, as the only answer I saw is:
> 
> > > I guess we can get away not exporting pgprot_encrypted(), but this
> > > asymmetry bothers me :)
> > 
> > Well, no. We export only stuff which is needed. Exporting just because
> > is a NONO.
> 
> I understand that only the minimum set of really used functions should be
> exported, but cc_mkenc() and cc_mkdec() do mostly the same thing so it feels
> strange.
> 
> Kirill, is there any reason to not exporting cc_mkenc() apart from the fact that
> it is not currently used anywhere else in the in-kernel code? Like, external
> modules are not supposed to use cc_mkenc()/pgprot_encrypted()? I see
> pgprot_encrypted() used only in fs/proc/vmcore.c outside of arch/x86.

The answer you quote is the resason I removed the EXPORT_SYMBOL().

-- 
 Kirill A. Shutemov



[Index of Archives]     [Linux ia64]     [Linux Kernel]     [DCCP]     [Linux ARM]     [Yosemite News]     [Linux SCSI]     [Linux Hams]
  Powered by Linux