lkml.org 
[lkml]   [2022]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v12 19/46] x86/kernel: Make the .bss..decrypted section shared in RMP table
    On Thu, Jun 16, 2022 at 04:41:05PM +0000, Sean Christopherson wrote:
    > > I worry that another use of cc_platform_has() could creep in at some point
    > > and cause the same issue. Not sure how bad it would be, performance-wise, to
    > > remove the jump table optimization for arch/x86/coco/core.c.

    Is there a gcc switch for that?

    > One thought would be to initialize "vendor" to a bogus value, disallow calls to
    > cc_set_vendor() until after the kernel as gotten to a safe point, and then WARN
    > (or panic?) if cc_platform_has() is called before "vendor" is explicitly set.
    > New calls can still get in, but they'll be much easier to detect and less likely
    > to escape initial testing.

    The invalid vendor thing makes sense but I don't think it'll help in
    this case.

    We set vendor in sme_enable() which comes before the

    __startup_64 -> sme_postprocess_startup

    path you're hitting.

    We could do only the aspect of checking whether it hasn't been set yet
    and warn then, in order to make the usage more robust...

    --
    Regards/Gruss,
    Boris.

    https://people.kernel.org/tglx/notes-about-netiquette

    \
     
     \ /
      Last update: 2022-07-01 18:52    [W:2.399 / U:0.208 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site